This commit is contained in:
张良(004796)
2024-03-21 11:15:25 +08:00
parent 4ae6a05fa8
commit 5cd14c47eb
6 changed files with 72 additions and 53 deletions

View File

@@ -50,7 +50,7 @@ public class Yunxin {
public YxDataR<YxCommonR> batchSendToNotice(List<Long> toUid, Object data){
SendBatchMsgReq req = new SendBatchMsgReq();
req.setFromAccid(SYS_NOTICE_ID);
req.setToAccids(toUid.stream().map(i -> String.valueOf(toUid)).collect(Collectors.toList()));
req.setToAccids(toUid.stream().map(String::valueOf).collect(Collectors.toList()));
req.setBody(JSON.toJSONString(data));
req.setOption(JSON.toJSONString(new Option()));
req.setType(100);
@@ -60,7 +60,7 @@ public class Yunxin {
public YxDataR<YxCommonR> batchSendToNotice(List<Long> toUid, Object body, Option option, YxImTypeEnum type){
SendBatchMsgReq req = new SendBatchMsgReq();
req.setFromAccid(SYS_NOTICE_ID);
req.setToAccids(toUid.stream().map(i -> String.valueOf(toUid)).collect(Collectors.toList()));
req.setToAccids(toUid.stream().map(String::valueOf).collect(Collectors.toList()));
req.setBody(JSON.toJSONString(body));
if(option != null){
req.setOption(JSON.toJSONString(new Option()));
@@ -86,7 +86,7 @@ public class Yunxin {
public YxDataR<YxCommonR> batchSendToTextMessage(Long fromUid, List<Long> toUid, String data){
SendBatchMsgReq req = new SendBatchMsgReq();
req.setFromAccid(fromUid+"");
req.setToAccids(toUid.stream().map(i -> String.valueOf(toUid)).collect(Collectors.toList()));
req.setToAccids(toUid.stream().map(String::valueOf).collect(Collectors.toList()));
req.setBody(JSON.toJSONString(new YxTextData(data)));
return messageClient.sendBatchMsg(req);
}