Merge branch 'feature/REQ-1138' into 'dev'

feat(REQ-1138): 管理端App改版

See merge request universal/infrastructure/backend/msg-center-plat!58
This commit is contained in:
罗福 2023-10-11 08:21:06 +00:00
commit 1ff9b4a6da
3 changed files with 7 additions and 4 deletions

View File

@ -39,9 +39,9 @@ public class IYouMengMessageServiceImpl implements IYouMengMessageService {
msg.setMsgId(extraData.getLong("msgId"));
msg.setType(extraData.getInteger("type"));
try {
upushService.sendAndroidCustomizedcast(msg, msgFromClient);
upushService.sendAndroidCustomizedcast(msg, msgFromClient, extraData);
msg.setRouter(extraData.getString("ir"));
upushService.sendIOSCustomizedcast(msg, msgFromClient);
upushService.sendIOSCustomizedcast(msg, msgFromClient, extraData);
} catch (Exception e) {
log.error("推送消息发送失败:{}", e.getMessage());
}

View File

@ -314,6 +314,7 @@ public class MessageRecordServiceImpl implements MessageRecordService {
}
});
}
extra.put("terminalId", message.getTerminalId());
extra.put("msgId", message.getId());
extra.put("p", message.getRouterParams());
extra.put("t", message.getTitle());

View File

@ -163,7 +163,7 @@ public class UpushService {
client.send(groupcast);
}
public void sendAndroidCustomizedcast(Message message, MsgBody4Guest msgFromClient)
public void sendAndroidCustomizedcast(Message message, MsgBody4Guest msgFromClient, com.alibaba.fastjson.JSONObject extraData)
throws Exception {
AndroidCustomizedcast customizedcast;
@ -214,6 +214,7 @@ public class UpushService {
customizedcast.setExtraField("fromGrade", message.getFromGrade());
customizedcast.setExtraField("router", message.getRouter());
customizedcast.setExtraField("msgId", String.valueOf(message.getMsgId()));
customizedcast.setExtraField("terminalId", extraData.getString("terminalId"));
String audio = message.getAudio();
if (audio != null) {
customizedcast.setExtraField("audio", message.getAudio());
@ -227,7 +228,7 @@ public class UpushService {
}
public void sendIOSCustomizedcast(Message message, MsgBody4Guest msgFromClient)
public void sendIOSCustomizedcast(Message message, MsgBody4Guest msgFromClient, com.alibaba.fastjson.JSONObject extraData)
throws Exception {
IOSCustomizedcast customizedcast;
if (Objects.nonNull(msgFromClient.getAppClient()) && "cmp".equals(msgFromClient.getAppClient())) {
@ -272,6 +273,7 @@ public class UpushService {
.setCustomizedField("conversationId", String.valueOf(message.getConversationId()));
customizedcast.setCustomizedField("params", message.getParams());
customizedcast.setCustomizedField("msgId", String.valueOf(message.getMsgId()));
customizedcast.setCustomizedField("terminalId", extraData.getString("terminalId"));
// TODO Set your alias and alias_type here, and use comma to split them if there are multiple alias.
// And if you have many alias, you can also upload a file containing these alias, then
// use file_id to send customized notification.