Newer
Older
huludao / src / main / java / com / newfiber / api / pc / controller / zhz / SitePropertyConfigController.java
package com.newfiber.api.pc.controller.zhz;

import com.newfiber.api.core.annotation.SysLog;
import com.newfiber.api.core.commons.ResultCode;
import com.newfiber.api.core.commons.ResultObj;
import com.newfiber.api.pc.model.zhz.SitePropertyConfig;
import com.newfiber.api.pc.service.SitePropertyConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: 添加预案类别时需要查询的因子数据控制层
 * @author: 张鸿志
 * @date: 2020/12/16 9:28
 * @version: v1.0
 */
@RestController
@RequestMapping("/yinzi")
@Api(value = "SitePropertyConfigController",tags = "添加预案类别时需要查询的因子数据控制层")
public class SitePropertyConfigController {

    @Autowired
    private SitePropertyConfigService sitePropertyConfigService;

    @PostMapping("/queryList")
    @ApiOperation("查找所有的因子数据")
    @SysLog(actionType = "4",value = "查找所有的因子数据")
    public ResultObj<List<SitePropertyConfig>> queryList(){
        return new ResultObj<>(ResultCode.OK,sitePropertyConfigService.selectList(null));
    }


    @PostMapping("/queryAllocatedSiteProperty")
    @ApiOperation("查询所有已分配过的因子数据")
    @SysLog(actionType = "4",value = "查询所有已分配过的因子数据")
    public ResultObj<List<SitePropertyConfig>> queryAllocatedSiteProperty(){
        return new ResultObj<List<SitePropertyConfig>>(ResultCode.OK,sitePropertyConfigService.queryAllocatedSiteProperty());
    }
}