Browse Source

用户积分行为记录数据修改,添加sourceType,填充sourceId

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
1aee827651
  1. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java
  2. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java
  3. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  5. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
  6. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
  7. 9
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  8. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java
  9. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java
  10. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java
  11. 30
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  12. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

10
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java

@ -40,6 +40,11 @@ public class BasePointEventMsg implements Serializable {
*/
private String gridId;
/**
* 小组ID
*/
private String groupId;
/**
* 被操作用户id
*/
@ -65,6 +70,11 @@ public class BasePointEventMsg implements Serializable {
*/
private String remark;
/**
* 业务类型 eg活动id
*/
private String sourceType;
/**
* 业务id eg活动id
*/

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java

@ -239,6 +239,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);
actPointEventMsg.setRemark(actInfoDTO.getTitle());
actPointEventMsg.setSourceType("activity");
actPointEventMsg.setSourceId(formDTO.getActId());
actPointEventMsgList.add(actPointEventMsg);

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

@ -127,6 +127,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
BasePointEventMsg actPointEventMsg=new BasePointEventMsg();
actPointEventMsg.setCustomerId(formDTO.getCustomerId());
actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setSourceType("volunteer");
actPointEventMsg.setSourceId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);
actPointEventMsgList.add(actPointEventMsg);

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -927,6 +927,7 @@ public class WorkActServiceImpl implements WorkActService {
basePointEventMsg.setPoint(actInfoDTO.getReward());
basePointEventMsg.setIsCommon(true);
basePointEventMsg.setRemark(remark);
basePointEventMsg.setSourceType("activity");
basePointEventMsg.setSourceId(actInfoDTO.getId());
basePointEventMsg.setOperatorId(loginUserUtil.getLoginUserId());
basePointEventMsgArrayList.add(basePointEventMsg);
@ -966,6 +967,7 @@ public class WorkActServiceImpl implements WorkActService {
basePointEventMsg.setPoint(formDTO.getReward());
basePointEventMsg.setIsCommon(true);
basePointEventMsg.setRemark(formDTO.getRemark());
basePointEventMsg.setSourceType("activity");
basePointEventMsg.setSourceId(formDTO.getSourceId());
basePointEventMsg.setOperatorId(loginUserUtil.getLoginUserId());
basePointEventMsgArrayList.add(basePointEventMsg);

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java

@ -53,6 +53,8 @@ public class UserPointActionLogDTO implements Serializable {
*/
private String actionFlag;
private String sourceType;
/**
* 来源Id可以是活动Id
* */

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java

@ -58,6 +58,8 @@ public class UserPointActionLogEntity extends BaseEpmetEntity {
*/
private String eventId;
private String sourceType;
/**
* 来源Id可以是活动Id
* */

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

@ -323,6 +323,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
action.setUserId(event.getUserId());
action.setCreatedBy(StringUtils.isBlank(event.getOperatorId()) ? ModuleConstant.CREATED_BY_SYSTEM : event.getOperatorId());
action.setUpdatedBy(StringUtils.isBlank(event.getOperatorId()) ? ModuleConstant.CREATED_BY_SYSTEM : event.getOperatorId());
action.setSourceType(event.getSourceType());
action.setSourceId(event.getSourceId());
action.setOperatorAgencyId(event.getOpAgencyId());
baseDao.insert(action);
@ -361,7 +362,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
userTotalDetailDTO.setGridId(event.getGridId());
userTotalDetailDTO.setUserId(event.getUserId());
userTotalDetailDTO.setBizType("group");
userTotalDetailDTO.setObjectId(event.getSourceId());
userTotalDetailDTO.setObjectId(event.getGroupId());
userTotalDetailDTO.setTotalPoint(event.getPoint());
bizPointUserTotalDetailService.save(userTotalDetailDTO);
} else {
@ -379,13 +380,13 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
totalDetailDTO.setAgencyId(event.getAgencyId());
totalDetailDTO.setGridId(event.getGridId());
totalDetailDTO.setBizType("group");
totalDetailDTO.setObjectId(event.getSourceId());
totalDetailDTO.setObjectId(event.getGroupId());
totalDetailDTO.setTotalPoint(total);
bizPointUserTotalDetailService.save(userTotalDetailDTO);
bizPointTotalDetailService.save(totalDetailDTO);
} else {
totalDetailDTO.setTotalPoint(total);
totalDetailDTO.setUpdatedTime(new Date());
bizPointUserTotalDetailService.update(userTotalDetailDTO);
bizPointTotalDetailService.update(totalDetailDTO);
}
}

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java

@ -348,7 +348,9 @@ public class GroupMemeberOperationServiceImpl extends BaseServiceImpl<GroupMemeb
pointEventMsg.setCustomerId(resiGroupDTO.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(resiGroupDTO.getGridId());
pointEventMsg.setSourceId(groupId);
pointEventMsg.setGroupId(groupId);
pointEventMsg.setSourceType("invite");
pointEventMsg.setSourceId(param.getUserId());
pointEventMsg.setUserId(inviter);
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java

@ -588,7 +588,9 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
pointEventMsg.setCustomerId(groupCache.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(groupCache.getGridId());
pointEventMsg.setSourceId(groupCache.getGroupId());
pointEventMsg.setGroupId(groupCache.getGroupId());
pointEventMsg.setSourceType("invite");
pointEventMsg.setSourceId(agreeApplyFormDTO.getUserId());
pointEventMsg.setUserId(inviter);
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java

@ -272,7 +272,9 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl<ResiTopicCommen
pointEventMsg.setCustomerId(customerId);
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(groupCache.getGridId());
pointEventMsg.setSourceId(topic.getGroupId());
pointEventMsg.setGroupId(topic.getGroupId());
pointEventMsg.setSourceType("topic");
pointEventMsg.setSourceId(topic.getId());
pointEventMsg.setUserId(tokenDto.getUserId());
// 加分
pointEventMsg.setActionFlag(MqConstant.PLUS);

30
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -412,12 +412,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
}
pointEventMsg.setCustomerId(resiGroupEntity.getCustomerId());
pointEventMsg.setGridId(resiGroupEntity.getGridId());
pointEventMsg.setSourceId(resiGroupEntity.getId());
pointEventMsg.setGroupId(resiGroupEntity.getId());
} else {
pointEventMsg.setCustomerId(resiGroupInfoRedisDTO.getCustomerId());
pointEventMsg.setGridId(resiGroupInfoRedisDTO.getGridId());
pointEventMsg.setSourceId(resiGroupInfoRedisDTO.getGroupId());
pointEventMsg.setGroupId(resiGroupInfoRedisDTO.getGroupId());
}
pointEventMsg.setSourceType("topic");
pointEventMsg.setSourceId(topic.getId());
CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO();
dataFilterParam.setGridId(pointEventMsg.getGridId());
@ -750,7 +752,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg.setCustomerId(tokenDto.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(groupCache.getGridId());
pointEventMsg.setSourceId(groupCache.getGroupId());
pointEventMsg.setGroupId(groupCache.getGroupId());
pointEventMsg.setSourceType("topic");
pointEventMsg.setSourceId(closeFormDTO.getTopicId());
pointEventMsg.setUserId(tokenDto.getUserId());
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);
@ -1725,7 +1729,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg.setCustomerId(groupCache.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(group.getGridId());
pointEventMsg.setSourceId(group.getGroupId());
pointEventMsg.setGroupId(group.getGroupId());
pointEventMsg.setSourceType("issue");
pointEventMsg.setSourceId(issueResult.getData().getIssueId());
pointEventMsg.setUserId(group.getTopicAuthorId());
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);
@ -1749,7 +1755,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg2.setCustomerId(groupCache.getCustomerId());
pointEventMsg2.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg2.setGridId(group.getGridId());
pointEventMsg.setSourceId(group.getGroupId());
pointEventMsg2.setGroupId(group.getGroupId());
pointEventMsg2.setSourceType("issue");
pointEventMsg2.setSourceId(issueResult.getData().getIssueId());
pointEventMsg2.setUserId(topicTurnIssueFromDTO.getUserId());
pointEventMsg2.setActionFlag(MqConstant.PLUS);
pointEventMsg2.setIsCommon(false);
@ -1887,7 +1895,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg.setCustomerId(groupCache.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(group.getGridId());
pointEventMsg.setSourceId(group.getGroupId());
pointEventMsg.setGroupId(group.getGroupId());
pointEventMsg.setSourceType("issue");
pointEventMsg.setSourceId(param.getIssueId());
pointEventMsg.setUserId(group.getTopicAuthorId());
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);
@ -1911,7 +1921,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg2.setCustomerId(groupCache.getCustomerId());
pointEventMsg2.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg2.setGridId(group.getGridId());
pointEventMsg2.setSourceId(group.getGroupId());
pointEventMsg2.setGroupId(group.getGroupId());
pointEventMsg2.setSourceType("issue");
pointEventMsg2.setSourceId(param.getIssueId());
pointEventMsg2.setUserId(param.getUserId());
pointEventMsg2.setActionFlag(MqConstant.PLUS);
pointEventMsg2.setIsCommon(false);
@ -2281,7 +2293,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
pointEventMsg.setCustomerId(group.getCustomerId());
pointEventMsg.setAgencyId(dataFilterResult.getData().getAgencyId());
pointEventMsg.setGridId(group.getGridId());
pointEventMsg.setSourceId(topic.getGroupId());
pointEventMsg.setGroupId(topic.getGroupId());
pointEventMsg.setSourceType("project");
pointEventMsg.setSourceId(param.getTopicId());
pointEventMsg.setUserId(topic.getCreatedBy());
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

@ -797,7 +797,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
}
sendMqMsg(draft.getCreatedBy(), draft.getCustomerId(), draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), draft.getGridId(), draft.getGroupId());
breviary.toString(), dataFilterResult.getData().getAgencyId(), draft.getGridId(), draft.getGroupId(), resiTopic.getId());
}
//记录操作记录
entity = baseDao.selectById(formDTO.getTopicDraftId());
@ -934,7 +934,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
throw new RenException(dataFilterResult.getMsg());
}
sendMqMsg(tokenDto.getUserId(), formDTO.getCustomerId(), draft.getCreatedTime(), resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), formDTO.getGridId(), formDTO.getGroupId());
breviary.toString(), dataFilterResult.getData().getAgencyId(), formDTO.getGridId(), formDTO.getGroupId(), topic.getId());
}
@ -950,7 +950,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
* @date 2020.12.25 15:45
*/
private void sendMqMsg(String userId, String customerId, Date targetDate, String groupName, String topicBreviary, String agencyId,
String gridId, String groupId) {
String gridId, String groupId, String topicId) {
//6.发送积分
MqBaseMsgDTO mqBaseMsgDTO=new MqBaseMsgDTO();
//mq的事件类型
@ -962,7 +962,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
actPointEventMsg.setCustomerId(customerId);
actPointEventMsg.setAgencyId(agencyId);
actPointEventMsg.setGridId(gridId);
actPointEventMsg.setSourceId(groupId);
actPointEventMsg.setGroupId(groupId);
actPointEventMsg.setSourceId(topicId);
actPointEventMsg.setUserId(userId);
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);

Loading…
Cancel
Save