feiyu02
9 天以前 85ef942e7195abeb71466b7159c3ee30161e1e54
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProductController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.lightshare.service.DataProductService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt
import cn.flightfeather.supervision.model.dataproduct.DataProdOption
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
@@ -42,4 +43,32 @@
    fun problemRecurrence(
        @ApiParam("查询条件") @RequestBody option: DataProdOption,
    ) = dataProductService.problemRecurrence(option)
    @ApiOperation(value = "查询数据产品项及对应的统计状态")
    @GetMapping("/type/query")
    fun findProductType(
        @ApiParam("产品类型", allowableValues = "base, middle, final", format = "base") @RequestParam types: String,
    ) {
    }
    @ApiOperation(value = "查询数据产品记录")
    @PostMapping("/record/query")
    fun findProduct(
        @ApiParam("查询条件") @RequestBody queryOpt: QueryOpt,
        @ApiParam("页码") @RequestParam(value = "page", required = false, defaultValue = "1") page: Int?,
        @ApiParam("单页数据量") @RequestParam(value = "perPage", required = false, defaultValue = "30") perPage: Int?,
    ) {
        // 根据产品类型编号、区域、时段、场景类型、配置id查询
        return dataProductService.findProduct(queryOpt, page ?: 1, perPage ?: 30)
    }
//    @ApiOperation(value = "生成数据产品")
//    @PostMapping("/generate")
//    fun generateProduct() = dataProductService.generateProduct()
}