From 159c8544e7e169dea4b32375a0c871dfe2fee965 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Tue, 3 Nov 2020 17:46:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ThreeMeetLessonController.java | 9 ++++ .../threemeetlesson/IThreeMeetLessonDao.java | 7 +++ .../threemeetlesson/ThreeMeetLessonDTO.java | 10 +++++ .../ThreeMeetLessonEChartsDTO.java | 43 +++++++++++++++++++ .../IThreeMeetLessonService.java | 7 +++ .../impl/ThreeMeetLessonServiceImpl.java | 8 ++++ .../threemeetlesson-mapper.xml | 17 ++++++++ 7 files changed, 101 insertions(+) create mode 100644 src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonEChartsDTO.java diff --git a/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java b/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java index 8cab8df..9767137 100644 --- a/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java +++ b/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java @@ -13,6 +13,7 @@ import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO; +import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO; import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO; import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService; import io.swagger.annotations.*; @@ -111,6 +112,14 @@ public class ThreeMeetLessonController extends AbstractController { return threeMeetLessonService.countThreeMeetLesson(params); } + @ApiOperation(value = "三会一课数量降序统计", notes = "三会一课数量降序统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("countthreemeetlessondesc") + SuccessResultData> countThreeMeetLessonDesc() throws SearchException { + Map params = requestParams(); + return threeMeetLessonService.countThreeMeetLessonDesc(params); + } + @ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("getcurrentuseridinfo") diff --git a/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java b/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java index d212441..9406f1c 100644 --- a/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java +++ b/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java @@ -6,6 +6,7 @@ import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; import com.cm.common.result.SuccessResultList; import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO; +import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO; import org.springframework.stereotype.Repository; import java.util.List; @@ -80,4 +81,10 @@ public interface IThreeMeetLessonDao { */ Integer countThreeMeetLesson(Map params) throws SearchException; + /** + * 三会一课图表 + * @param params + * @return + */ + List countThreeMeetLessonDesc(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonDTO.java b/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonDTO.java index adf30d3..97fce65 100644 --- a/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonDTO.java +++ b/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonDTO.java @@ -36,6 +36,8 @@ public class ThreeMeetLessonDTO { private String category; @ApiModelProperty(name = "categoryName", value = "类别名称") private String categoryName; + @ApiModelProperty(name = "counts", value = "数量") + private Integer counts; public String getThreeMeetLessonId() { return threeMeetLessonId == null ? "" : threeMeetLessonId; @@ -124,4 +126,12 @@ public class ThreeMeetLessonDTO { public void setCategoryName(String categoryName) { this.categoryName = categoryName; } + + public Integer getCounts() { + return counts; + } + + public void setCounts(Integer counts) { + this.counts = counts; + } } diff --git a/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonEChartsDTO.java b/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonEChartsDTO.java new file mode 100644 index 0000000..62ca4df --- /dev/null +++ b/src/main/java/com/cm/partybuilding/pojo/dtos/threemeetlesson/ThreeMeetLessonEChartsDTO.java @@ -0,0 +1,43 @@ +package com.cm.partybuilding.pojo.dtos.threemeetlesson; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author xwangs + * @create 2020-10-23 16:43 + * @description + */ +@ApiModel +public class ThreeMeetLessonEChartsDTO { + + @ApiModelProperty(name = "categoryNames", value = "三会一课课程名字") + private List categoryNames; + @ApiModelProperty(name = "counts", value = "开展会议的数量") + private List counts; + + public List getCategoryNames() { + if (categoryNames == null) { + return new ArrayList<>(); + } + return categoryNames; + } + + public void setCategoryNames(List categoryNames) { + this.categoryNames = categoryNames; + } + + public List getCounts() { + if (counts == null) { + return new ArrayList<>(); + } + return counts; + } + + public void setCounts(List counts) { + this.counts = counts; + } +} diff --git a/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java b/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java index fbcaac1..89d1841 100644 --- a/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java +++ b/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java @@ -8,6 +8,7 @@ import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO; +import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO; import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO; import java.util.List; @@ -153,4 +154,10 @@ public interface IThreeMeetLessonService { */ SuccessResultData countThreeMeetLesson(Map params) throws SearchException; + /** + * 三会一课图表 + * @param params + * @return + */ + SuccessResultData> countThreeMeetLessonDesc(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java b/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java index 471aa54..004a2e6 100644 --- a/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java +++ b/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java @@ -11,6 +11,7 @@ import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.partybuilding.dao.threemeetlesson.IThreeMeetLessonDao; import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO; +import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO; import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO; import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService; import com.github.pagehelper.PageHelper; @@ -18,6 +19,7 @@ import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -183,6 +185,12 @@ public class ThreeMeetLessonServiceImpl extends AbstractService implements IThre return count == null ? 0 : count; } + @Override + public SuccessResultData> countThreeMeetLessonDesc(Map params) { + List dtos = threeMeetLessonDao.countThreeMeetLessonDesc(params); + return new SuccessResultData<>(dtos); + } + @Override public SuccessResultData countThreeMeetLesson(Map params) throws SearchException { return new SuccessResultData<>(countNumberThreeMeetLesson(params)); diff --git a/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml b/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml index 9755ca9..ba2ab94 100644 --- a/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml +++ b/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml @@ -14,6 +14,7 @@ + @@ -195,4 +196,20 @@ t1.is_delete = 0 + + \ No newline at end of file