Browse Source

Merge branch 'dev_wx_msg' into dev_temp

dev_shibei_match
sunyuchao 5 years ago
parent
commit
dde5a69694
  1. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  2. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  3. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java
  4. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  5. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  6. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  7. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  8. 4
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

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

@ -710,6 +710,7 @@ public class WorkActServiceImpl implements WorkActService {
if(sendMessageRes.success()){ if(sendMessageRes.success()){
logger.info("给审核通过的用户发送消息成功"); logger.info("给审核通过的用户发送消息成功");
} }
logger.info("取消活动,开始推送微信订阅消息");
Result wxmpMsg = epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); Result wxmpMsg = epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
if (wxmpMsg.success()) { if (wxmpMsg.success()) {
logger.info("给审核通过的用户推送微信订阅消息成功"); logger.info("给审核通过的用户推送微信订阅消息成功");

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

@ -671,6 +671,7 @@ public class WorkActUserServiceImpl implements WorkActUserService {
msg.setMessageContent(String.format(ActMessageConstant.AUDIT_REFUSED, actInfo.getTitle(), actUserRelationEntity.getFailureReason())); msg.setMessageContent(String.format(ActMessageConstant.AUDIT_REFUSED, actInfo.getTitle(), actUserRelationEntity.getFailureReason()));
} }
list.add(msg); list.add(msg);
logger.info("活动报名审核,开始推送微信订阅消息");
Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(list); Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(list);
if (result.success()) { if (result.success()) {
logger.info("审核成功,已成功发送微信订阅消息"); logger.info("审核成功,已成功发送微信订阅消息");

2
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java

@ -20,8 +20,6 @@ public interface WxmpMessageConstant {
String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken"; String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken";
String ACCESS_TOKEN_KEY_PRE = "epmet:wechartthird:authorizerrefreshtoken:";
String RESI = "resi"; String RESI = "resi";
String GOV_REDIS = "work"; String GOV_REDIS = "work";

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

@ -156,7 +156,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
if (WxmpMessageConstant.GOV_DB.equals(msg.getClientType())) { if (WxmpMessageConstant.GOV_DB.equals(msg.getClientType())) {
clientTypeRedis = WxmpMessageConstant.GOV_REDIS; clientTypeRedis = WxmpMessageConstant.GOV_REDIS;
} }
StringBuilder key = new StringBuilder(WxmpMessageConstant.ACCESS_TOKEN_KEY_PRE).append(msg.getCustomerId()).append(":").append(clientTypeRedis); StringBuilder key = new StringBuilder(msg.getCustomerId()).append(":").append(clientTypeRedis);
Map<String, Object> authorizerRefreshToken = new HashMap<>(); Map<String, Object> authorizerRefreshToken = new HashMap<>();
try { try {
authorizerRefreshToken = wxmpMessageRedis.getAuthorizerRefreshToken(key.toString()); authorizerRefreshToken = wxmpMessageRedis.getAuthorizerRefreshToken(key.toString());

1
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -496,6 +496,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
msgIssue.setUserId(entity.getCreatedBy()); msgIssue.setUserId(entity.getCreatedBy());
msgList.add(msgIssue); msgList.add(msgIssue);
} }
logger.info("议题关闭,开始推送微信订阅消息");
return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
} }

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -61,6 +61,8 @@ import com.epmet.service.ProjectService;
import com.epmet.service.ProjectStaffService; import com.epmet.service.ProjectStaffService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -80,6 +82,7 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao, ProjectProcessEntity> implements ProjectProcessService { public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao, ProjectProcessEntity> implements ProjectProcessService {
protected static final Logger logger = LoggerFactory.getLogger(ProjectProcessServiceImpl.class);
@Autowired @Autowired
private ProjectProcessRedis projectProcessRedis; private ProjectProcessRedis projectProcessRedis;
@Autowired @Autowired
@ -354,7 +357,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
//5:调用epmet-message服务,给项目流转过程中的工作人员发送订阅的微信消息 //5:调用epmet-message服务,给项目流转过程中的工作人员发送订阅的微信消息
if (!transferWxmpMessage(formDTO).success()) { if (!transferWxmpMessage(formDTO).success()) {
throw new RenException(ProjectConstant.SAVE_WXMP_MSG_EXCEPTION); logger.error("项目流转,推送微信订阅消息失败");
//throw new RenException(ProjectConstant.SAVE_WXMP_MSG_EXCEPTION);
} }
} }
@ -416,6 +420,7 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
map.put(staff.getStaffId(),staff.getStaffId()); map.put(staff.getStaffId(),staff.getStaffId());
} }
}); });
logger.info("项目流转,推送微信订阅消息");
return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
} }

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -495,6 +495,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
}); });
messageFeignClient.saveUserMessageList(msgList); messageFeignClient.saveUserMessageList(msgList);
//2020.10.26 发送微信订阅消息 sun //2020.10.26 发送微信订阅消息 sun
logger.info("项目结案,开始推送微信订阅消息");
Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList); Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList);
if (!result.success()) { if (!result.success()) {
logger.error("项目结案成功,发送微信订阅消息失败" + JSON.toJSONString(result)); logger.error("项目结案成功,发送微信订阅消息失败" + JSON.toJSONString(result));
@ -621,6 +622,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
msg.setGridId("*"); msg.setGridId("*");
wxmpMsgList.add(msg); wxmpMsgList.add(msg);
//发送微信订阅消息 sun //发送微信订阅消息 sun
logger.info("项目退回,开始推送微信订阅消息");
Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList); Result result = epmetMessageOpenFeignClient.sendWxSubscribeMessage(wxmpMsgList);
if (!result.success()) { if (!result.success()) {
logger.error("项目退回成功,发送微信订阅消息失败" + JSON.toJSONString(result)); logger.error("项目退回成功,发送微信订阅消息失败" + JSON.toJSONString(result));

4
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -58,6 +58,8 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jsoup.helper.StringUtil; import org.jsoup.helper.StringUtil;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -79,6 +81,7 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntity> implements ArticleService { public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntity> implements ArticleService {
private Logger logger = LogManager.getLogger(ArticleServiceImpl.class);
@Autowired @Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient; private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired @Autowired
@ -1191,6 +1194,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
formDTO.setMessageTime(new Date()); formDTO.setMessageTime(new Date());
formDTO.setGridId("*"); formDTO.setGridId("*");
msgList.add(formDTO); msgList.add(formDTO);
logger.info("发布文章审核,开始推送微信订阅消息");
return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
} }

Loading…
Cancel
Save