Browse Source

党员审核通过不发站内信和订阅信息有误的bug

master
liushaowen 5 years ago
parent
commit
c9b520f0b8
  1. 19
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  2. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

19
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -155,22 +155,27 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
if (WxmpMessageConstant.RESI.equals(clientType)) {
UserBasicInfoFormDTO userBasicInfoFormDTO = new UserBasicInfoFormDTO();
userBasicInfoFormDTO.setUserId(userId);
UserBasicInfo data = epmetUserOpenFeignClient.getUserBasicInfo(userBasicInfoFormDTO).getData();
if (data != null){
openId = data.getOpenId();
Result<UserBasicInfo> userBasicInfo = epmetUserOpenFeignClient.getUserBasicInfo(userBasicInfoFormDTO);
if (userBasicInfo.getCode() != 0){
throw new Exception(userBasicInfo.getInternalMsg());
}else {
openId = userBasicInfo.getData().getOpenId();
}
} else if (WxmpMessageConstant.GOV_DB.equals(clientType)) {
StaffBasicInfoFormDTO staffBasicInfoFormDTO = new StaffBasicInfoFormDTO();
staffBasicInfoFormDTO.setStaffId(userId);
StaffBasicInfo data = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO).getData();
if (data != null){
openId = data.getOpenId();
Result<StaffBasicInfo> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO);;
if (staffBasicInfo.getCode() != 0){
throw new Exception(staffBasicInfo.getInternalMsg());
}else {
openId = staffBasicInfo.getData().getOpenId();
}
} else {
throw new WxSubscribeException("clientType有误", "", openId);
}
} catch (Exception e) {
throw new WxSubscribeException("连接User服务失败" + e.getMessage(), "", "");
e.printStackTrace();
throw new WxSubscribeException("获取openId失败:" + e.getMessage(), "", "");
}
if (StringUtils.isBlank(openId)) {

3
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -645,6 +645,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
String messageContent = String.format(userMsg, gridName);
userMessageFormDTO.setMessageContent(messageContent);
userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ);
userMessageFormDTO.setUserId(formDTO.getUserId());
//发送微信订阅消息
WxSubscribeMessageFormDTO wxSubscribeMessageFormDTO = new WxSubscribeMessageFormDTO();
@ -652,7 +653,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
wxSubscribeMessageFormDTO.setUserId(formDTO.getUserId());
wxSubscribeMessageFormDTO.setClientType(AppClientConstant.APP_RESI);
wxSubscribeMessageFormDTO.setGridId(formDTO.getGridId());
wxSubscribeMessageFormDTO.setBehaviorType(ResiWarmUserMessageConstant.WX_WARMHEARTED_BEHAVIOR);
wxSubscribeMessageFormDTO.setBehaviorType(PartyMemberMessageConstant.WX_PARTY_AUTH_BEHAVIOR);
wxSubscribeMessageFormDTO.setMessageContent(messageContent);
wxSubscribeMessageFormDTO.setMessageTime(new Date());
List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>();

Loading…
Cancel
Save