消息地址为空校验
This commit is contained in:
parent
feaa8897b8
commit
285d72d984
|
@ -22,6 +22,7 @@ import kd.bos.workflow.engine.msg.AbstractMessageServiceHandler;
|
||||||
import kd.bos.workflow.engine.msg.ctx.MessageContext;
|
import kd.bos.workflow.engine.msg.ctx.MessageContext;
|
||||||
import kd.bos.workflow.engine.msg.info.MessageInfo;
|
import kd.bos.workflow.engine.msg.info.MessageInfo;
|
||||||
import kd.bos.workflow.engine.msg.info.ToDoInfo;
|
import kd.bos.workflow.engine.msg.info.ToDoInfo;
|
||||||
|
import org.agrona.Strings;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.HttpEntity;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
@ -139,19 +140,23 @@ public class MessageListen extends AbstractMessageServiceHandler {
|
||||||
List<Map<String, Object>> requestBodyList = getRequestBodyList2(message);
|
List<Map<String, Object>> requestBodyList = getRequestBodyList2(message);
|
||||||
log.info("推送消息通知内容:{}", requestBodyList);
|
log.info("推送消息通知内容:{}", requestBodyList);
|
||||||
|
|
||||||
Map resultMap;
|
if (requestBodyList != null){
|
||||||
for (Iterator var6 = requestBodyList.iterator(); var6.hasNext(); resultMap.get("code")) {
|
Map resultMap;
|
||||||
Map<String, Object> requestBody = (Map) var6.next();
|
for (Iterator var6 = requestBodyList.iterator(); var6.hasNext(); resultMap.get("code")) {
|
||||||
String jsonStr = this.pushZHData(requestBody);
|
Map<String, Object> requestBody = (Map) var6.next();
|
||||||
log.info("传阅结果 jsonStr:" + jsonStr);
|
String jsonStr = this.pushZHData(requestBody);
|
||||||
resultMap = (Map) JSON.parseObject(jsonStr, Map.class);
|
log.info("传阅结果 jsonStr:" + jsonStr);
|
||||||
resultMap.get("errcode");
|
resultMap = (Map) JSON.parseObject(jsonStr, Map.class);
|
||||||
if ("0".equals(resultMap.get("errcode"))) {
|
resultMap.get("errcode");
|
||||||
log.info("推送已办任务内容成功");
|
if ("0".equals(resultMap.get("errcode"))) {
|
||||||
} else {
|
log.info("推送已办任务内容成功");
|
||||||
log.info("推送已办任务内容失败");
|
} else {
|
||||||
|
log.info("推送已办任务内容失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendMessage(HashMap<String,Object> map) {
|
public void sendMessage(HashMap<String,Object> map) {
|
||||||
|
@ -159,7 +164,6 @@ public class MessageListen extends AbstractMessageServiceHandler {
|
||||||
List<Map<String, Object>> requestBodyList = getRequestBodyList3(map);
|
List<Map<String, Object>> requestBodyList = getRequestBodyList3(map);
|
||||||
log.info("推送消息通知内容:{}", requestBodyList);
|
log.info("推送消息通知内容:{}", requestBodyList);
|
||||||
|
|
||||||
|
|
||||||
Map resultMap;
|
Map resultMap;
|
||||||
for (Iterator var6 = requestBodyList.iterator(); var6.hasNext(); resultMap.get("code")) {
|
for (Iterator var6 = requestBodyList.iterator(); var6.hasNext(); resultMap.get("code")) {
|
||||||
Map<String, Object> requestBody = (Map) var6.next();
|
Map<String, Object> requestBody = (Map) var6.next();
|
||||||
|
@ -442,6 +446,9 @@ public class MessageListen extends AbstractMessageServiceHandler {
|
||||||
String title = message.getTitle();
|
String title = message.getTitle();
|
||||||
String content = message.getContent();
|
String content = message.getContent();
|
||||||
String url = message.getContentUrl();
|
String url = message.getContentUrl();
|
||||||
|
if (Strings.isEmpty(url) || "null".equals(url)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
// tring taskId = messageContext.get("taskId").toString();
|
// tring taskId = messageContext.get("taskId").toString();
|
||||||
List<Long> userIds = message.getUserIds();
|
List<Long> userIds = message.getUserIds();
|
||||||
List<String> userMobiles = new ArrayList();
|
List<String> userMobiles = new ArrayList();
|
||||||
|
|
Loading…
Reference in New Issue