发送消息到亚微
This commit is contained in:
parent
cdca90474d
commit
be6968c78f
|
@ -7,7 +7,6 @@ import io.renren.common.constant.Constant;
|
|||
import io.renren.common.page.PageData;
|
||||
import io.renren.common.service.impl.CrudServiceImpl;
|
||||
import io.renren.common.utils.ConvertUtils;
|
||||
import io.renren.common.utils.Result;
|
||||
import io.renren.modules.notice.dao.SysNoticeDao;
|
||||
import io.renren.modules.notice.dto.SysNoticeDTO;
|
||||
import io.renren.modules.notice.entity.SysNoticeEntity;
|
||||
|
@ -194,7 +193,12 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
//通过WebSocket,提示选中用户,有新通知
|
||||
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
||||
webSocketServer.sendMessage(finalUserIdList, message);
|
||||
sendToYaweiUser(notice, finalUserIdList);
|
||||
}, executor).thenRunAsync(() -> {
|
||||
try {
|
||||
sendToYaweiUser(notice, finalUserIdList);
|
||||
} catch (Exception exception) {
|
||||
logger.error("", exception);
|
||||
}
|
||||
}, executor);
|
||||
}
|
||||
}
|
||||
|
@ -241,14 +245,14 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
exchangeCodes.append(ywMobile + ";");
|
||||
}
|
||||
}
|
||||
if (userNames.charAt(userNames.length()-1) == ';') {
|
||||
userNames.deleteCharAt(userNames.length()-1);
|
||||
if (userNames.charAt(userNames.length() - 1) == ';') {
|
||||
userNames.deleteCharAt(userNames.length() - 1);
|
||||
}
|
||||
if (userGuids.charAt(userGuids.length()-1) == ';') {
|
||||
userGuids.deleteCharAt(userGuids.length()-1);
|
||||
if (userGuids.charAt(userGuids.length() - 1) == ';') {
|
||||
userGuids.deleteCharAt(userGuids.length() - 1);
|
||||
}
|
||||
if (exchangeCodes.charAt(exchangeCodes.length()-1) == ';') {
|
||||
exchangeCodes.deleteCharAt(exchangeCodes.length()-1);
|
||||
if (exchangeCodes.charAt(exchangeCodes.length() - 1) == ';') {
|
||||
exchangeCodes.deleteCharAt(exchangeCodes.length() - 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -259,7 +263,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
" <InsertTodealByPollCode xmlns=\"http://tempuri.org/\">\n" +
|
||||
String.format("<todealGuid>{%s}</todealGuid>\n", UUID.randomUUID().toString().toUpperCase()) +
|
||||
String.format("<fileGuid>{%s}</fileGuid>\n", UUID.randomUUID().toString().toUpperCase()) +
|
||||
String.format("<title>%s</title>\n",notice.getTitle()) +
|
||||
String.format("<title>%s</title>\n", notice.getTitle()) +
|
||||
" <docType>2</docType>\n" +
|
||||
String.format("<receiveLocalPerson>%s</receiveLocalPerson>\n", userNames.toString()) +
|
||||
String.format("<receiveLocalPersonGuid>%s</receiveLocalPersonGuid>\n", userGuids.toString()) +
|
||||
|
@ -291,7 +295,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
logger.error("推送待办失败:" + body);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("推送亚威待办失败", e);
|
||||
logger.error("推送亚威待办失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue