From ad2bdac0b5ce9c29a953ea970d5ed156bb390e76 Mon Sep 17 00:00:00 2001 From: DirectionOfMind <3182967682@qq.com> Date: Tue, 19 Jan 2021 17:42:58 +0800 Subject: [PATCH] fix --- .../controller/IndicatorLibraryController.java | 2 +- .../modules/performance/dao/IndicatorLibraryMapper.java | 4 ++++ .../service/impl/IndicatorLibraryServiceImpl.java | 8 ++++++++ .../mapper/performance/IndicatorLibraryMapper.xml | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) 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 fbfcbd81..25ce047e 100644 --- a/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java +++ b/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java @@ -111,7 +111,7 @@ public class IndicatorLibraryController { @GetMapping("/statistical") @ApiOperation("统计指标") - public R statistical(@RequestParam("indicatorType") @ApiParam(value = "指标分类id",name = "indicatorType") Long indicatorType) { + 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/dao/IndicatorLibraryMapper.java b/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java index c446191c..7dde2eab 100644 --- a/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java +++ b/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java @@ -45,4 +45,8 @@ public interface IndicatorLibraryMapper extends BaseMapper { List statisticalByIndicatorType(Long indicatorType); int deleteIndicatorLibrarysByIndicatorType(@Param("indicatorType") Integer indicatorType); + + int countIndicatorLibrarysByIndicatorType(@Param("indicatorType") Integer indicatorType); + + } \ No newline at end of file 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 83ab7e14..0326f2ac 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 @@ -114,6 +114,14 @@ public class IndicatorLibraryServiceImpl extends ServiceImpl0){ + dtos.add(0,dto); + } return dtos; } diff --git a/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml b/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml index f539794c..ec609282 100644 --- a/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml +++ b/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml @@ -139,5 +139,10 @@ + + +