Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
yinzuomei 4 years ago
parent
commit
b56c0217bd
  1. 10
      epmet-gateway/pom.xml
  2. 10
      epmet-gateway/src/main/resources/bootstrap.yml
  3. 1
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java
  4. 8
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  5. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

10
epmet-gateway/pom.xml

@ -233,6 +233,9 @@
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
<!--<gateway.routes.epmet-ext-server.url>lb://127.0.0.1:8115</gateway.routes.epmet-ext-server.url>-->
<!--问卷服务-->
<gateway.routes.tduck-api.url>lb://tduck-api</gateway.routes.tduck-api.url>
<!--<gateway.routes.tduck-api.url>http://localhost:8116</gateway.routes.tduck-api.url>-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret>
@ -364,6 +367,9 @@
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
<!--<gateway.routes.epmet-openapi-adv-server.url>http://localhost:8115</gateway.routes.epmet-openapi-adv-server.url>-->
<!--问卷服务-->
<gateway.routes.tduck-api.url>lb://tduck-api</gateway.routes.tduck-api.url>
<!--<gateway.routes.tduck-api.url>http://localhost:8116</gateway.routes.tduck-api.url>-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret>
@ -461,6 +467,8 @@
<gateway.routes.epmet-ext-server.url>lb://epmet-ext-server</gateway.routes.epmet-ext-server.url>
<!-- 35、多数据源服务 -->
<gateway.routes.data-aggregator-server.url>lb://data-aggregator-server</gateway.routes.data-aggregator-server.url>
<!--问卷服务-->
<gateway.routes.tduck-api.url>lb://tduck-api</gateway.routes.tduck-api.url>
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
@ -561,6 +569,8 @@
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
<!--问卷服务-->
<gateway.routes.tduck-api.url>lb://tduck-api</gateway.routes.tduck-api.url>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1</dingTalk.robot.secret>

10
epmet-gateway/src/main/resources/bootstrap.yml

@ -336,12 +336,20 @@ spring:
# 宣传服务
- id: epmet-openapi-adv-server
uri: @gateway.routes.epmet-openapi-adv-server.url@
order: 35
order: 36
predicates:
- Path=${server.servlet.context-path}/adv/**
filters:
- StripPrefix=1
- CpAuth=true
- id: tduck-api
uri: @gateway.routes.tduck-api.url@
order: 37
predicates:
- Path=${server.servlet.context-path}/tduck-api/**
filters:
- StripPrefix=1
- CpAuth=true
nacos:
discovery:
server-addr: @nacos.server-addr@

1
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java

@ -18,4 +18,5 @@ public class MyPointRankResultDTO implements Serializable {
private String headPhoto;
private String gridRank;
private String customerRank;
private String userName;
}

8
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.common.enu.AroundPartyConstant;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -351,6 +352,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
}
MyPointRankResultDTO result = new MyPointRankResultDTO();
result.setHeadPhoto(myInfoResult.getData().get(0).getHeadImgUrl());
result.setUserName(myInfoResult.getData().get(0).getRealName());
//获取客户下用户积分
List<BizPointUserTotalDetailDTO> list = getUserPointList(tokenDto.getCustomerId(), null, null);
result.setCustomerRank(getRank(list, tokenDto.getUserId()));
@ -378,7 +380,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
if (!gridInfoResult.success()) {
throw new RenException(gridInfoResult.getCode());
}
result.setGridName(gridInfoResult.getData().getGridName());
result.setGridName(gridInfoResult.getData().getParentAgencyName() + StrConstant.HYPHEN + gridInfoResult.getData().getGridName());
String agencyId = gridInfoResult.getData().getParentAgencyId();
//获取客户下用户积分
List<BizPointUserTotalDetailDTO> list = getGridPointList(tokenDto.getCustomerId(), null);
@ -453,6 +455,8 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
private Boolean havePoint(List<BizPointUserTotalDetailDTO> list, String userId) {
Map<String, Integer> map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getUserId, BizPointUserTotalDetailDTO::getTotalPoint));
String point = null == map.get(userId)?"0":Integer.toString(map.get(userId));
log.info("userPoint:" + point);
return null != map.get(userId);
}
@ -463,6 +467,8 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
}
//如果当月网格没有积分变动,则积分为0
Map<String, Integer> map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getGridId, BizPointUserTotalDetailDTO::getTotalPoint));
String points = null == map.get(gridId)?"0":Integer.toString(map.get(gridId));
log.info("gridPoint:" + points);
if (null == map.get(gridId)) {
BizPointUserTotalDetailDTO dto = new BizPointUserTotalDetailDTO();
dto.setGridId(gridId);

2
epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

@ -200,7 +200,7 @@
)
VALUES
(
#{ID},
#{id},
#{customerId},
#{gridId},
#{userId},

Loading…
Cancel
Save