消息地址为空校验
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,6 +140,7 @@ 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);
|
||||||
|
|
||||||
|
if (requestBodyList != null){
|
||||||
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();
|
||||||
|
@ -154,12 +156,14 @@ public class MessageListen extends AbstractMessageServiceHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void sendMessage(HashMap<String,Object> map) {
|
public void sendMessage(HashMap<String,Object> map) {
|
||||||
log.info("消息通知~~~~~~~~~~");
|
log.info("消息通知~~~~~~~~~~");
|
||||||
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