Browse Source

Merge branch 'dev_group_point' into dev_temp

master
zhaoqifeng 4 years ago
parent
commit
a30c038f3b
  1. 10
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

10
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -353,7 +353,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
if (("resi_group").equals(event.getEventClass())) { if (("resi_group").equals(event.getEventClass())) {
//2021.04.20 小组积分统计 //2021.04.20 小组积分统计
//个人小组积分 //个人小组积分
BizPointUserTotalDetailDTO userTotalDetailDTO = bizPointUserTotalDetailService.getDataByObject("group", event.getSourceId(), BizPointUserTotalDetailDTO userTotalDetailDTO = bizPointUserTotalDetailService.getDataByObject("group", event.getGroupId(),
event.getUserId()); event.getUserId());
if (null == userTotalDetailDTO) { if (null == userTotalDetailDTO) {
userTotalDetailDTO = new BizPointUserTotalDetailDTO(); userTotalDetailDTO = new BizPointUserTotalDetailDTO();
@ -363,17 +363,17 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
userTotalDetailDTO.setUserId(event.getUserId()); userTotalDetailDTO.setUserId(event.getUserId());
userTotalDetailDTO.setBizType("group"); userTotalDetailDTO.setBizType("group");
userTotalDetailDTO.setObjectId(event.getGroupId()); userTotalDetailDTO.setObjectId(event.getGroupId());
userTotalDetailDTO.setTotalPoint(event.getPoint()); userTotalDetailDTO.setTotalPoint(ruleInfo.getPoint());
bizPointUserTotalDetailService.save(userTotalDetailDTO); bizPointUserTotalDetailService.save(userTotalDetailDTO);
} else { } else {
userTotalDetailDTO.setTotalPoint(userTotalDetailDTO.getTotalPoint() + event.getPoint()); userTotalDetailDTO.setTotalPoint(userTotalDetailDTO.getTotalPoint() + ruleInfo.getPoint());
userTotalDetailDTO.setUpdatedTime(new Date()); userTotalDetailDTO.setUpdatedTime(new Date());
bizPointUserTotalDetailService.update(userTotalDetailDTO); bizPointUserTotalDetailService.update(userTotalDetailDTO);
} }
//小组总积分 //小组总积分
BizPointTotalDetailDTO totalDetailDTO = bizPointTotalDetailService.getDataByObject("group", event.getSourceId()); BizPointTotalDetailDTO totalDetailDTO = bizPointTotalDetailService.getDataByObject("group", event.getGroupId());
Integer total = bizPointUserTotalDetailService.getTotalByObject("group", event.getSourceId()); Integer total = bizPointUserTotalDetailService.getTotalByObject("group", event.getGroupId());
if (null == totalDetailDTO) { if (null == totalDetailDTO) {
totalDetailDTO = new BizPointTotalDetailDTO(); totalDetailDTO = new BizPointTotalDetailDTO();
totalDetailDTO.setCustomerId(event.getCustomerId()); totalDetailDTO.setCustomerId(event.getCustomerId());

Loading…
Cancel
Save