package com.nantian.cloud.dbcapp.controller;


import com.nantian.cloud.dbcapp.service.CollectionService;
import com.nantian.sc.cloud.common.core.util.R;
import com.nantian.sc.cloud.common.log.annotation.SysLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
* @Description: 采集点controller
* @Param: 
* @return: 
* @Author: zfw
* @Date: 2020/12/22
* @Date: 20:05
*/
@CrossOrigin
@RestController
@AllArgsConstructor
@RequestMapping("/collection")
@Api(value = "collection", tags = "采集点")

public class CollectionController {

    private final CollectionService collectionService;


    /**
     * 根据条件获取采集点
     *
     * @param
     * @return R
     */
    @RequestMapping("/total")
    @SysLog("根据条件获取采集点（大屏）")
    @ApiOperation(value = "根据条件获取采集点", notes = "根据条件获取采集点")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "area", value = "地区", required = false, dataType = "string", paramType = "path"),
            @ApiImplicitParam(name = "industry", value = "行业", required = false, dataType = "string", paramType = "path"),
            @ApiImplicitParam(name = "time", value = "周期", required = false, dataType = "string", paramType = "path")
                })
    public R getTotal( String area ,String industry,String time) {
        return R.ok(collectionService.getTotal(area,industry,time),"查询成功");
    }


}
