发送消息到亚微

This commit is contained in:
wangliwen 2022-08-31 16:53:43 +08:00
parent cdca90474d
commit be6968c78f
1 changed files with 14 additions and 10 deletions

View File

@ -7,7 +7,6 @@ import io.renren.common.constant.Constant;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.Result;
import io.renren.modules.notice.dao.SysNoticeDao; import io.renren.modules.notice.dao.SysNoticeDao;
import io.renren.modules.notice.dto.SysNoticeDTO; import io.renren.modules.notice.dto.SysNoticeDTO;
import io.renren.modules.notice.entity.SysNoticeEntity; import io.renren.modules.notice.entity.SysNoticeEntity;
@ -194,7 +193,12 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
//通过WebSocket提示选中用户有新通知 //通过WebSocket提示选中用户有新通知
MessageData<String> message = new MessageData<String>().msg(notice.getTitle()); MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
webSocketServer.sendMessage(finalUserIdList, message); webSocketServer.sendMessage(finalUserIdList, message);
}, executor).thenRunAsync(() -> {
try {
sendToYaweiUser(notice, finalUserIdList); sendToYaweiUser(notice, finalUserIdList);
} catch (Exception exception) {
logger.error("", exception);
}
}, executor); }, executor);
} }
} }