package com.usky.iot.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.iot.domain.BaseFacilityArea;
import com.usky.iot.service.BaseFacilityAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author han
 * @since 2023-06-20
 */
@RestController
@RequestMapping("/baseFacilityArea")
public class BaseFacilityAreaController {
    @Autowired
    private BaseFacilityAreaService baseFacilityAreaService;
    /**
     * 设施所属领域根据ID查询
     *
     * @param id   主键ID
     * @return
     */
    @GetMapping("areaSelect")
    public ApiResult<List<BaseFacilityArea>> areaSelect(@RequestParam(value = "id", required = false) Integer id) {
        return ApiResult.success(baseFacilityAreaService.areaSelect(id));
    }
}

