diff --git a/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java b/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java index 25ce047e..889709d7 100644 --- a/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java +++ b/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java @@ -7,15 +7,14 @@ import com.google.common.collect.Maps; import com.lz.common.utils.PageUtils; import com.lz.common.utils.R; import com.lz.common.utils.StringUtil; +import com.lz.modules.flow.entity.FlowStart; import com.lz.modules.performance.dto.IndicatorLibraryDto; import com.lz.modules.performance.dto.IndicatorLibraryMoveDto; import com.lz.modules.performance.dto.StatisticalIndicatorTypeDto; import com.lz.modules.performance.entity.IndicatorLibrary; import com.lz.modules.performance.req.IndicatorLibraryReq; import com.lz.modules.performance.service.IndicatorLibraryService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.annotations.*; import lombok.extern.slf4j.Slf4j; import org.aopalliance.aop.Advice; import org.apache.ibatis.annotations.Param; @@ -111,6 +110,7 @@ public class IndicatorLibraryController { @GetMapping("/statistical") @ApiOperation("统计指标") + @ApiResponses({@ApiResponse(code = 200, message = "成功", response = StatisticalIndicatorTypeDto.class)}) public R statistical(@RequestParam(name = "indicatorType",required = false) @ApiParam(value = "指标分类id",name = "indicatorType") Long indicatorType) { List dtos = indicatorLibraryService.statisticalByIndicatorType(indicatorType); return R.ok().put("data",dtos); diff --git a/src/main/java/com/lz/modules/performance/dto/StatisticalIndicatorTypeDto.java b/src/main/java/com/lz/modules/performance/dto/StatisticalIndicatorTypeDto.java index b78ff59e..a70c1603 100644 --- a/src/main/java/com/lz/modules/performance/dto/StatisticalIndicatorTypeDto.java +++ b/src/main/java/com/lz/modules/performance/dto/StatisticalIndicatorTypeDto.java @@ -1,6 +1,8 @@ package com.lz.modules.performance.dto; import com.lz.modules.performance.entity.IndicatorType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** @@ -9,11 +11,18 @@ import lombok.Data; * @Date: 2021/1/13 17:20 */ @Data +@ApiModel("统计响应实体") public class StatisticalIndicatorTypeDto { + @ApiModelProperty(value = "名称",name = "name") private String name; + @ApiModelProperty(value = "类型",name = "indicatorType") private Integer indicatorType; + @ApiModelProperty(value = "个数",name = "count") private int count; + + @ApiModelProperty(value = "是否可以删除 0:可以 1:不可以",name = "delete") + private int delete; } diff --git a/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java index 23851cae..c6baa6fd 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java @@ -108,6 +108,7 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl0){ @@ -117,6 +118,7 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl value.getCount()).sum(); dto.setCount(Double.valueOf(sum).intValue());