123
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user