Browse Source

积分规则日志新增字段

dev
zxc 3 years ago
parent
commit
5d4b981c47
  1. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/PointOperationLogListener.java
  2. 2
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PointRuleChangedMQMsg.java
  3. 3
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/ProjectChangedMQMsg.java
  4. 9
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/PointOperationLogListener.java

@ -80,6 +80,8 @@ public class PointOperationLogListener implements MessageListenerConcurrently {
logEntity.setOperatorName(operatorInfo.getName()); logEntity.setOperatorName(operatorInfo.getName());
logEntity.setOperatingTime(msgObj.getOperatingTime()); logEntity.setOperatingTime(msgObj.getOperatingTime());
logEntity.setContent(content); logEntity.setContent(content);
logEntity.setOrgId(msgObj.getOrgId());
logEntity.setOrgIdPath(msgObj.getOrgIdPath());
DistributedLock distributedLock = null; DistributedLock distributedLock = null;
RLock lock = null; RLock lock = null;

2
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/PointRuleChangedMQMsg.java

@ -28,6 +28,8 @@ public class PointRuleChangedMQMsg {
private String fromApp; private String fromApp;
private String fromClient; private String fromClient;
private String orgId;
private String orgIdPath;
private Date operatingTime; private Date operatingTime;
} }

3
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/ProjectChangedMQMsg.java

@ -36,5 +36,8 @@ public class ProjectChangedMQMsg implements Serializable {
private String fromApp; private String fromApp;
private String fromClient; private String fromClient;
private String orgId;
private String orgIdPath;
} }

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

@ -26,11 +26,14 @@ import com.epmet.commons.rocketmq.messages.PointRuleChangedMQMsg;
import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.enums.CommonOperateTypeEnum;
import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -206,6 +209,12 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
msg.setOperationBrief(messages); msg.setOperationBrief(messages);
msg.setOperatorId(loginUserUtil.getLoginUserId()); msg.setOperatorId(loginUserUtil.getLoginUserId());
msg.setRuleId(formDTO.getRuleId()); msg.setRuleId(formDTO.getRuleId());
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDTO.getCustomerId(), tokenDTO.getUserId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+tokenDTO.getUserId());
}
msg.setOrgId(staffInfo.getAgencyId());
msg.setOrgIdPath(StringUtils.isBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyId() : staffInfo.getAgencyPIds().concat(":").concat(staffInfo.getAgencyId()));
SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendPointRuleChangedMqMsg(msg); SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendPointRuleChangedMqMsg(msg);
} }
} }

Loading…
Cancel
Save