Commit 0e5722bb by giaogiao

优化push

parent 3a48b8f0
......@@ -23,7 +23,7 @@ public class ImClientDeviceInfoAdd extends BaseEntity {
@ApiModelProperty("设备不想收到推送提醒, 1想, 0不想")
private Integer valid;
@ApiModelProperty("设备类型1:ios; 2:android")
@ApiModelProperty("设备类型1:ios; 2:android; 3:web")
private Integer deviceType;
@ApiModelProperty("设备推送token")
......
......@@ -92,7 +92,7 @@ public class SystemPush {
if (imClientReceiver.getDeviceType() == 1) {
ios(pushModel, imClientReceiver, imApplication, pushType);
} else {
} else if (imClientReceiver.getDeviceType() == 2) {
android(pushModel, imClientReceiver, imApplication);
}
}
......
......@@ -73,12 +73,11 @@ public class ImChatConcrete extends ImCmdAbstract {
private ImClientService imClientService;
@Autowired
private SystemPush pushTask;
private SystemPush systemPush;
@Override
public void process(ReceiveModel receiveModel, ChannelHandlerContext ctx, String data, String appKey, String clientId) throws JsonProcessingException {
// String language = ctx.channel().attr(MangerChannelService.LANGUAGE).get();
// 查询imApplication
ImApplication imApplication = imApplicationService.getOneByAppKey(appKey);
......@@ -183,7 +182,7 @@ public class ImChatConcrete extends ImCmdAbstract {
writeDataService.write(responseModel, appKey, imClientReceiver.getClientId());
// 异步推送系统通知消息
pushTask.push(pushMap, imClientReceiver, imApplication, PushType.ALERT);
systemPush.push(pushMap, imClientReceiver, imApplication, PushType.ALERT);
}
// 响应发送方消息id等信息
......
......@@ -68,7 +68,7 @@ public class SingleRtcConcrete extends ImCmdAbstract {
private ImClientService imClientService;
@Autowired
private SystemPush pushTask;
private SystemPush systemPush;
@Override
public void process(ReceiveModel receiveModel, ChannelHandlerContext ctx, String data, String appKey, String clientId) throws JsonProcessingException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment