This commit is contained in:
张良(004796)
2024-03-25 11:02:45 +08:00
parent 5cd14c47eb
commit 8792c0e1cf
12 changed files with 51 additions and 37 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(String::valueOf).collect(Collectors.toList()));
req.setToAccids(JSON.toJSONString(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(String::valueOf).collect(Collectors.toList()));
req.setToAccids(JSON.toJSONString(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(String::valueOf).collect(Collectors.toList()));
req.setToAccids(JSON.toJSONString(toUid.stream().map(String::valueOf).collect(Collectors.toList())));
req.setBody(JSON.toJSONString(new YxTextData(data)));
return messageClient.sendBatchMsg(req);
}

View File

@@ -7,7 +7,7 @@ import java.util.List;
@Data
public class SendBatchMsgReq {
private String fromAccid;
private List<String> toAccids;
private String toAccids;
private int type = 0;
private String body;
private String option;