From fea1a15f61f9b8e53bd235e4c50ff613a4a687d0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 10:27:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E5=85=AC=E7=9B=8A=E4=BA=92=E5=8A=A9=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HeartVolunteerrankFormDTO.java | 33 +++++++++++ .../dto/result/AgeDistributionResultDTO.java | 53 ++++++++++++++++++ .../result/GenderDistributionResultDTO.java | 26 +++++++++ .../HeartVolunteerportrayalResultDTO.java | 27 +++++++++ .../result/HeartVolunteerrankResultDTO.java | 37 ++++++++++++ .../controller/screen/KcScreenController.java | 33 ++++++++++- .../screenkc/ScreenKcActSummaryDailyDao.java | 8 +++ .../screenkc/ScreenKcActTrendMonthlyDao.java | 3 +- .../ScreenKcPlatformSummaryDailyDao.java | 3 +- ...ScreenKcVolunteerHeatRankGridDailyDao.java | 12 +++- .../ScreenKcVolunteerSummaryDailyDao.java | 8 +++ .../screen/KcScreenService.java | 21 ++++++- .../screen/impl/KcScreenServiceImpl.java | 56 ++++++++++++++++--- .../screenkc/ScreenKcActSummaryDailyDao.xml | 17 ++++++ .../screenkc/ScreenKcActTrendMonthlyDao.xml | 2 +- .../ScreenKcPlatformSummaryDailyDao.xml | 2 +- .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 20 +++---- .../ScreenKcVolunteerSummaryDailyDao.xml | 20 ++++++- 18 files changed, 347 insertions(+), 34 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java new file mode 100644 index 0000000000..cca3eb4f1b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名-接口入参 + * @Author sun + */ +@Data +public class HeartVolunteerrankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java new file mode 100644 index 0000000000..616d9207c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class AgeDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1 = 0; + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2 = 0; + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3 = 0; + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4 = 0; + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5 = 0; + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6 = 0; + /** + * 志愿者中男性总人数 + */ + @JsonIgnore + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + @JsonIgnore + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java new file mode 100644 index 0000000000..e36589103a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class GenderDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java new file mode 100644 index 0000000000..2bbcd82df1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class HeartVolunteerportrayalResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 个年龄段志愿者人数 + */ + private AgeDistributionResultDTO ageDistribution; + + /** + * 男、女志愿者人员 + */ + private GenderDistributionResultDTO genderDistribution; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java new file mode 100644 index 0000000000..03f962e110 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class HeartVolunteerrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 用户id + */ + private String userId = ""; + /** + * 用户名称 + */ + private String userName = ""; + /** + * 公益时长分钟 + */ + private Integer heartTime = 0; + /** + * 积分 + */ + private Integer points = 0; + /** + * 所属网格名称 + */ + private String gridName = ""; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 88a9a425bd..f945c8c43f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -3,15 +3,18 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 孔村大屏api * @@ -59,4 +62,28 @@ public class KcScreenController { return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerportrayal") + public Result heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.heartVolunteerportrayal(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerrank") + public Result> heartVolunteerrank(ExternalAppRequestParam externalAppRequestParam, @RequestBody HeartVolunteerrankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, HeartVolunteerrankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java index 8ed8b0f9d9..3de0da456c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-活动各类总数(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcActSummaryDailyDao { + /** + * @param customerId + * @Description 公益互助-各类总数汇总 + * @author sun + */ + HeartSummaryResultDTO selectHeartSummary(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java index bb7cdaad84..173bd2c936 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -36,5 +37,5 @@ public interface ScreenKcActTrendMonthlyDao { * @Description 按客户查询最近十二个月数据 * @author sun */ - List selectActTrendMonthly(String customerId); + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java index 44ac5c506a..9772805fff 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-平台各汇总值(先根据customerId+dateId删除) @@ -34,5 +35,5 @@ public interface ScreenKcPlatformSummaryDailyDao { * @Description 首页-平台各类总数 * @author sun */ - HomepageSummaryResultDTO selectSummaryDaily(String customerId); + HomepageSummaryResultDTO selectSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index 64ef74f376..cb57c5ef36 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-志愿者公益时长排名(先根据customerId删除) @@ -30,9 +35,10 @@ import org.apache.ibatis.annotations.Mapper; public interface ScreenKcVolunteerHeatRankGridDailyDao { /** - * @param customerId - * @Description 公益互助-各类总数汇总 + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 * @author sun */ - HeartSummaryResultDTO selectHeartSummary(String customerId); + List selectHeartVolunteerrankList(HeartVolunteerrankFormDTO formDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java index 38a06222dd..27990e8bc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.AgeDistributionResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-志愿者汇总(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcVolunteerSummaryDailyDao { + /** + * @param customerId + * @Description 根据客户Id查询最近日期志愿者统计数据 + * @author sun + */ + AgeDistributionResultDTO selectVolunteerSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 0e58cf7c08..448b032c21 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,9 +1,10 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; + +import java.util.List; /** * 孔村大屏api @@ -33,4 +34,18 @@ public interface KcScreenService { * @author sun */ HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 02b2c9c02d..e86c1d7353 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -2,16 +2,13 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcVolunteerHeatRankGridDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,9 +30,13 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired - private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; @Autowired private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; + @Autowired + private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; /** * @param externalAppRequestParam @@ -54,7 +55,7 @@ public class KcScreenServiceImpl implements KcScreenService { */ @Override public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { - return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); + return screenKcActSummaryDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); } /** @@ -80,4 +81,41 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @Override + public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam) { + HeartVolunteerportrayalResultDTO resultDTO = new HeartVolunteerportrayalResultDTO(); + GenderDistributionResultDTO genderDistribution = new GenderDistributionResultDTO(); + //1.根据客户Id查询最近日期志愿者统计数据 + AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(externalAppRequestParam.getCustomerId()); + //2.封装数据并返回 + if (null == ageDistribution) { + resultDTO.setAgeDistribution(new AgeDistributionResultDTO()); + resultDTO.setGenderDistribution(genderDistribution); + } else { + resultDTO.setAgeDistribution(ageDistribution); + genderDistribution.setMaleCount(ageDistribution.getMaleCount()); + genderDistribution.setFemaleCount(ageDistribution.getFemaleCount()); + resultDTO.setGenderDistribution(genderDistribution); + } + return resultDTO; + } + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @Override + public List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List list = screenKcVolunteerHeatRankGridDailyDao.selectHeartVolunteerrankList(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml index a2b108ceb9..14cba9ef1a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml @@ -3,5 +3,22 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index 55b9bca50a..a7062885ce 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -15,7 +15,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - month_id DESC + month_id DESC, created_time DESC LIMIT 12 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml index 1b2818d77c..5ef2a4780e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml @@ -24,7 +24,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC + date_id DESC, created_time DESC LIMIT 1 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml index 581f4a013e..527a33ce0a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -3,22 +3,20 @@ - - SELECT - date_id AS "dateId", - act_count AS "actCount", - volunteer_count AS "volunteerCount", - parti_user_count AS "partiUserCount", - reward_point_count AS "rewardPointCount", - heart_time AS "heartTime" + grid_name AS "gridName", + user_id AS "userId", + user_name AS "userName", + heart_time AS "heartTime", + points AS "points" FROM - screen_kc_act_summary_daily + screen_kc_volunteer_heat_rank_grid_daily WHERE del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC - LIMIT 1 + date_id DESC, created_time DESC + LIMIT #{pageNo}, #{pageSize} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml index 39f5781f95..62f94e5d1f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml @@ -3,5 +3,23 @@ - + From 07218d8e210c92be729a30fba295e97aaf62686e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 11:19:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/DemoDataStatsServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java | 4 +++- .../stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyYearlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentDailyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridDailyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedGridQuarterlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridYearlyServiceImpl.java | 3 +++ 13 files changed, 39 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java index 698a7c2881..e63a135590 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.DimYearDao; import com.epmet.entity.stats.DimYearEntity; import com.epmet.service.stats.DemoDataStatsService; @@ -14,6 +16,7 @@ import java.util.Date; * 默认为统计数据源,不需要手动指定 */ @Service +@DataSource(DataSourceConstant.STATS) public class DemoDataStatsServiceImpl implements DemoDataStatsService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java index 7eef72f9d7..2c267d7bc5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java @@ -17,12 +17,13 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyDailyDao; import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; -import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedAgencyDailyService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -41,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java index 85c51f9fdb..8ab508c5bc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao; import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; import com.epmet.service.stats.FactTagUsedAgencyMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java index ec83b4b9b6..9f80d9eeea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao; import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java index 32f24e5836..340bc6b5cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao; import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; import com.epmet.service.stats.FactTagUsedAgencyYearlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java index f88f1f330a..ef85d1742f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao; import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; import com.epmet.service.stats.FactTagUsedDepartmentDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java index e0411038be..81bea68cf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentMonthlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java index bb51750412..5b0abbbeec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java index 6614095001..fb66d73fe2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentYearlyService; @@ -38,6 +40,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java index 95081992f2..dc0411850b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridDailyDao; import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedGridDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl implements FactTagUsedGridDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java index 05dc9a8942..c62068bee9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridMonthlyDao; import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; import com.epmet.service.stats.FactTagUsedGridMonthlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java index 4e6bf21e2c..d4e34af163 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao; import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; import com.epmet.service.stats.FactTagUsedGridQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridQuarterlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java index 02c7902ec2..ec981e83ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridYearlyDao; import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; import com.epmet.service.stats.FactTagUsedGridYearlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridYearlyService { @Override