feat: REQ-2129 发送push时增加ouId
This commit is contained in:
parent
4015afc7f7
commit
001254de09
@ -22,7 +22,6 @@ import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
@ -45,9 +44,6 @@ public class PushYouMengMessageHandler implements EventHandler, InitializingBean
|
||||
@Autowired
|
||||
private IYouMengMessageService youMengMessageService;
|
||||
|
||||
@Value("${spring.application.name:msg-center}")
|
||||
private String applicationName;
|
||||
|
||||
/**
|
||||
* 按照这个顺序解析routerType
|
||||
*/
|
||||
@ -134,6 +130,7 @@ public class PushYouMengMessageHandler implements EventHandler, InitializingBean
|
||||
.m2(resolveM2(messageBody, pushData))
|
||||
// 为了兼容老版本,保证老版本的工人端能收到push,所以新的push都alias都是person
|
||||
.t("not_identity" + newMessageHistory.getReceivePersonId())
|
||||
.ouId(newMessageHistory.getReceiveOuId())
|
||||
.build());
|
||||
|
||||
log.info("end push-handler rocketmq event: {}", event);
|
||||
|
||||
@ -223,6 +223,9 @@ public class UpushService {
|
||||
customizedcast.setExtraField("conversationId", String.valueOf(message.getConversationId()));
|
||||
customizedcast.setExtraField("params", message.getParams());
|
||||
customizedcast.setExtraField("type", String.valueOf(message.getType()));
|
||||
if (msgFromClient.getOuId() != null) {
|
||||
customizedcast.setExtraField("ouId", msgFromClient.getOuId().toString());
|
||||
}
|
||||
customizedcast.setChannelActivity("cn.axzo.push.PushActivity");
|
||||
client.send(customizedcast);
|
||||
}
|
||||
@ -290,6 +293,10 @@ public class UpushService {
|
||||
} else {
|
||||
customizedcast.setSound("default");
|
||||
}
|
||||
|
||||
if (msgFromClient.getOuId() != null) {
|
||||
customizedcast.setCustomizedField("ouId", msgFromClient.getOuId().toString());
|
||||
}
|
||||
customizedcast.setContentAvailable(1);
|
||||
// TODO set 'production_mode' to 'true' if your app is under production mode
|
||||
//customizedcast.setProductionMode();
|
||||
|
||||
@ -58,4 +58,6 @@ public class MsgBody4Guest {
|
||||
* appClient : cmp: 管理端 cm: 工人
|
||||
*/
|
||||
public String appClient;
|
||||
|
||||
private Long ouId;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user