Merge branch 'feature/REQ-1138' into pre
This commit is contained in:
commit
26cd240052
@ -39,9 +39,9 @@ public class IYouMengMessageServiceImpl implements IYouMengMessageService {
|
|||||||
msg.setMsgId(extraData.getLong("msgId"));
|
msg.setMsgId(extraData.getLong("msgId"));
|
||||||
msg.setType(extraData.getInteger("type"));
|
msg.setType(extraData.getInteger("type"));
|
||||||
try {
|
try {
|
||||||
upushService.sendAndroidCustomizedcast(msg, msgFromClient);
|
upushService.sendAndroidCustomizedcast(msg, msgFromClient, extraData);
|
||||||
msg.setRouter(extraData.getString("ir"));
|
msg.setRouter(extraData.getString("ir"));
|
||||||
upushService.sendIOSCustomizedcast(msg, msgFromClient);
|
upushService.sendIOSCustomizedcast(msg, msgFromClient, extraData);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("推送消息发送失败:{}", e.getMessage());
|
log.error("推送消息发送失败:{}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -309,6 +309,7 @@ public class MessageRecordServiceImpl implements MessageRecordService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
extra.put("terminalId", message.getTerminalId());
|
||||||
extra.put("msgId", message.getId());
|
extra.put("msgId", message.getId());
|
||||||
extra.put("p", message.getRouterParams());
|
extra.put("p", message.getRouterParams());
|
||||||
extra.put("t", message.getTitle());
|
extra.put("t", message.getTitle());
|
||||||
@ -485,8 +486,8 @@ public class MessageRecordServiceImpl implements MessageRecordService {
|
|||||||
);
|
);
|
||||||
calcCount(constructionList, res);
|
calcCount(constructionList, res);
|
||||||
|
|
||||||
List<MsgStatisticsDTO> tradeList = messageRecordDao.statisticsMsg4Trade(personId);
|
// List<MsgStatisticsDTO> tradeList = messageRecordDao.statisticsMsg4Trade(personId);
|
||||||
calcCount(tradeList, res);
|
// calcCount(tradeList, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ public class UpushService {
|
|||||||
client.send(groupcast);
|
client.send(groupcast);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendAndroidCustomizedcast(Message message, MsgBody4Guest msgFromClient)
|
public void sendAndroidCustomizedcast(Message message, MsgBody4Guest msgFromClient, com.alibaba.fastjson.JSONObject extraData)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
AndroidCustomizedcast customizedcast;
|
AndroidCustomizedcast customizedcast;
|
||||||
@ -214,6 +214,7 @@ public class UpushService {
|
|||||||
customizedcast.setExtraField("fromGrade", message.getFromGrade());
|
customizedcast.setExtraField("fromGrade", message.getFromGrade());
|
||||||
customizedcast.setExtraField("router", message.getRouter());
|
customizedcast.setExtraField("router", message.getRouter());
|
||||||
customizedcast.setExtraField("msgId", String.valueOf(message.getMsgId()));
|
customizedcast.setExtraField("msgId", String.valueOf(message.getMsgId()));
|
||||||
|
customizedcast.setExtraField("terminalId", extraData.getString("terminalId"));
|
||||||
String audio = message.getAudio();
|
String audio = message.getAudio();
|
||||||
if (audio != null) {
|
if (audio != null) {
|
||||||
customizedcast.setExtraField("audio", message.getAudio());
|
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 {
|
throws Exception {
|
||||||
IOSCustomizedcast customizedcast;
|
IOSCustomizedcast customizedcast;
|
||||||
if (Objects.nonNull(msgFromClient.getAppClient()) && "cmp".equals(msgFromClient.getAppClient())) {
|
if (Objects.nonNull(msgFromClient.getAppClient()) && "cmp".equals(msgFromClient.getAppClient())) {
|
||||||
@ -272,6 +273,7 @@ public class UpushService {
|
|||||||
.setCustomizedField("conversationId", String.valueOf(message.getConversationId()));
|
.setCustomizedField("conversationId", String.valueOf(message.getConversationId()));
|
||||||
customizedcast.setCustomizedField("params", message.getParams());
|
customizedcast.setCustomizedField("params", message.getParams());
|
||||||
customizedcast.setCustomizedField("msgId", String.valueOf(message.getMsgId()));
|
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.
|
// 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
|
// And if you have many alias, you can also upload a file containing these alias, then
|
||||||
// use file_id to send customized notification.
|
// use file_id to send customized notification.
|
||||||
|
|||||||
@ -47,6 +47,10 @@ public class PendingMessageBriefRes implements Serializable {
|
|||||||
* 消息关联的终端名称:企业名/项目名
|
* 消息关联的终端名称:企业名/项目名
|
||||||
*/
|
*/
|
||||||
private String terminalName;
|
private String terminalName;
|
||||||
|
/**
|
||||||
|
* 消息所属标识Id 用于跳转
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
/**
|
/**
|
||||||
* 消息时间戳
|
* 消息时间戳
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -55,9 +55,9 @@
|
|||||||
and record.is_delete = 0
|
and record.is_delete = 0
|
||||||
and (
|
and (
|
||||||
(record.to_id = #{identityId} and record.receive_type = #{receiveType})
|
(record.to_id = #{identityId} and record.receive_type = #{receiveType})
|
||||||
<if test="personId != null">
|
<!-- <if test="personId != null">-->
|
||||||
or (record.to_id = 0 and record.receive_type = 9 and record.person_id = #{personId} )
|
<!-- or (record.to_id = 0 and record.receive_type = 9 and record.person_id = #{personId} )-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
)
|
)
|
||||||
<if test="states != null and states.size > 0">
|
<if test="states != null and states.size > 0">
|
||||||
and record.state in
|
and record.state in
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user