Browse Source

使用@DataSource

dev_shibei_match
wangchao 5 years ago
parent
commit
a13898fdab
  1. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java
  2. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java
  3. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java

@ -1,7 +1,9 @@
package com.epmet.datareport.service.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.screen.*;
import com.epmet.datareport.service.screen.GrassRootsGovernService;
import com.epmet.datareport.utils.DateUtils;
@ -50,6 +52,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 11:16
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) {
//默认5
@ -73,6 +76,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 13:55
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public List<DifficultProjectResultDTO> difficultProject(AgencyNumTypeParamFormDTO param) {
if(null == param.getTopNum()){
@ -93,6 +97,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 14:37
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) {
@ -114,6 +119,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 15:32
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public List<PublicPartiRankResultDTO> publicPartiRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.TWO);
@ -132,6 +138,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 17:46
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public List<GovernCapacityRankResultDTO> governCapacityRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE);

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java

@ -1,6 +1,8 @@
package com.epmet.datareport.service.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao;
import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao;
import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao;
@ -50,6 +52,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.18 14:58
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) {
@ -76,6 +79,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.18 17:54
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) {
return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId());
@ -89,6 +93,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.19 11:02
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) {
if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){
@ -158,6 +163,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.19 15:25
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) {
if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java

@ -174,6 +174,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author wangc
* @date 2020.08.21 11:05
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public List<AdvanceBranchRankResultDTO> advancedBranchRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()){
@ -204,6 +205,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author wangc
* @date 2020.08.21 14:22
**/
@DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
@Override
public List<PartyUserPointResultDTO> advancedPartymemberRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN);

Loading…
Cancel
Save