|
@@ -76,6 +76,10 @@ public class MceMbuserServiceImpl extends AbstractCrudService<MceMbuserMapper, M
|
|
|
String infoContent = requestVO.getInfoContent();
|
|
|
Integer infoId = requestVO.getInfoId();
|
|
|
String openId = requestVO.getOpenId();
|
|
|
+ String infoType = requestVO.getInfoType();
|
|
|
+ String infoTypeName = requestVO.getInfoTypeName();
|
|
|
+ String oaType = requestVO.getOaType();
|
|
|
+ String instanceId = requestVO.getInstanceId();
|
|
|
|
|
|
// access_token时效校验,判断获取access_token获取时间是否超过有效时间,超过就调用更新,保证一直有效
|
|
|
if (!redisHelper.hasKey("access_key")) {
|
|
@@ -188,20 +192,22 @@ public class MceMbuserServiceImpl extends AbstractCrudService<MceMbuserMapper, M
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ log.info("oaType:{}",oaType);
|
|
|
+ log.info("instanceId:{}",instanceId);
|
|
|
// 回调地址
|
|
|
- if (Objects.nonNull(requestVO.getInfoTypeName()) && "3".equals(requestVO.getInfoType())) {
|
|
|
- tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL3, requestVO.getInfoType(), requestVO.getInfoTypeName(), infoId, requestVO.getOaType(), requestVO.getInstanceId());
|
|
|
- } else if (Objects.nonNull(requestVO.getInfoTypeName())) {
|
|
|
- tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL, requestVO.getInfoType(), requestVO.getInfoTypeName(), infoId);
|
|
|
+ if ("3".equals(requestVO.getInfoType())) {
|
|
|
+ tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL3, infoType, infoTypeName, infoId, oaType, instanceId);
|
|
|
+ } else if (Objects.nonNull(infoTypeName)) {
|
|
|
+ tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL, infoType, infoTypeName, infoId);
|
|
|
} else {
|
|
|
- tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL1, requestVO.getInfoType(), infoId);
|
|
|
+ tUrl = String.format(constant.WE_CHAT_CUSTOMER_CALL_URL1, infoType, infoId);
|
|
|
}
|
|
|
|
|
|
String token = obj.toString();
|
|
|
String requestUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + token;
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
content.put("touser", openId);
|
|
|
- if (StringUtils.isNotBlank(tUrl)) {
|
|
|
+ if (!"0".equals(requestVO.getInfoType())) {
|
|
|
content.put("url", tUrl);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(templateId)) {
|