Browse Source

消息通知增加cdate字段

master
lzh 2 years ago
parent
commit
862b8af3a4
  1. 12
      mallplus-admin/src/main/java/com/zscat/mallplus/unipush/UniPushService.java

12
mallplus-admin/src/main/java/com/zscat/mallplus/unipush/UniPushService.java

@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -296,7 +297,16 @@ public class UniPushService {
} else {
notification.setLogoUrl(imgUrltz);
}
String payload = JSONUtil.toJsonStr(mess);
Map<String, Object> map = new HashMap<>();
map.put("code", mess.getCode());
map.put("params", mess.getParams());
map.put("content", mess.getContent());
map.put("cdate", mess.getCdate());
map.put("id", mess.getId());
map.put("ctime", mess.getCtime());
map.put("status", mess.getStatus());
map.put("userId", mess.getUserId());
String payload = JSONUtil.toJsonStr(map);
notification.setPayload(payload);
notification.setClickType("payload");
// notification.setClickType("payload_custom");

Loading…
Cancel
Save