This commit is contained in:
张良(004796)
2024-03-15 17:32:25 +08:00
parent 224f17d404
commit a09806bbc4
3 changed files with 5 additions and 4 deletions

View File

@@ -478,7 +478,7 @@ public class YunxinHttpService {
data.setTime(System.currentTimeMillis()); data.setTime(System.currentTimeMillis());
YxDataR<YxCommonR> r = yunxin.sendBatchAttachMsgNotice(toUid, notice); YxDataR<YxCommonR> r = yunxin.sendBatchAttachMsgNotice(toUid, notice);
if(r == null || !r.isSuccess()){ if(r == null || !r.isSuccess()){
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r)); log.error("云信发送失败-发送礼物飘窗提醒-【sendGiftWindowsAmount】r={}", JSON.toJSONString(r));
} }
} }

View File

@@ -77,7 +77,7 @@ public class Yunxin {
req.setFrom(fromUid+""); req.setFrom(fromUid+"");
req.setTo(toUid+""); req.setTo(toUid+"");
req.setBody(JSON.toJSONString(data)); req.setBody(JSON.toJSONString(data));
req.setOption(JSON.toJSONString(new Option())); // req.setOption(JSON.toJSONString(new Option()));
return messageClient.sendMsg(req); return messageClient.sendMsg(req);
} }
@@ -103,7 +103,7 @@ public class Yunxin {
public YxDataR<YxCommonR> sendBatchAttachMsgNotice(List<Long> toUid, Object data){ public YxDataR<YxCommonR> sendBatchAttachMsgNotice(List<Long> toUid, Object data){
SendBatchAttachMsgReq req = new SendBatchAttachMsgReq(); SendBatchAttachMsgReq req = new SendBatchAttachMsgReq();
req.setFromAccid(SYS_NOTICE_ID); req.setFromAccid(SYS_NOTICE_ID);
req.setToAccids(toUid.stream().map(i -> String.valueOf(toUid)).collect(Collectors.toList())); req.setToAccids(JSON.toJSONString(toUid.stream().map(String::valueOf).collect(Collectors.toList())));
req.setAttach(JSON.toJSONString(data)); req.setAttach(JSON.toJSONString(data));
return messageClient.sendBatchAttachMsg(req); return messageClient.sendBatchAttachMsg(req);
} }

View File

@@ -7,7 +7,8 @@ import java.util.List;
@Data @Data
public class SendBatchAttachMsgReq { public class SendBatchAttachMsgReq {
private String fromAccid; private String fromAccid;
private List<String> toAccids; // List 数组字符串
private String toAccids;
private String attach; private String attach;
private int save = 1; private int save = 1;
} }