init
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ruoyi.cai.notice;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.cai.domain.Gift;
|
||||
import com.ruoyi.cai.domain.User;
|
||||
import com.ruoyi.cai.mq.handle.dto.WindowRechargeDTO;
|
||||
import com.ruoyi.cai.notice.data.NoticeR;
|
||||
import com.ruoyi.cai.notice.data.child.*;
|
||||
import com.ruoyi.cai.notice.dto.CashSuccessSendMesDTO;
|
||||
@@ -354,21 +355,19 @@ public class YunxinHttpService {
|
||||
* 发送上线了批量自定义消息
|
||||
*/
|
||||
public void sendOnlineAttentionNotice(List<Long> toUid,User loginUser){
|
||||
YunExecutor.YUN_EXECUTOR.execute(() -> {
|
||||
SendOnlineAttentionNoticeData data = new SendOnlineAttentionNoticeData();
|
||||
data.setUserid(loginUser.getId());
|
||||
data.setNickname(loginUser.getNickname());
|
||||
data.setAvatar(loginUser.getAvatar());
|
||||
data.setAge(loginUser.getAge());
|
||||
data.setCity(loginUser.getCity());
|
||||
data.setTime(CaiDateUtil.getCurrentTimeStr());
|
||||
data.setSex(loginUser.getGender());
|
||||
NoticeR<SendOnlineAttentionNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.SEND_ONLINE_ATTENTION, data);
|
||||
YxDataR<YxCommonR> r = yunxin.batchSendToNotice(toUid, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
});
|
||||
SendOnlineAttentionNoticeData data = new SendOnlineAttentionNoticeData();
|
||||
data.setUserid(loginUser.getId());
|
||||
data.setNickname(loginUser.getNickname());
|
||||
data.setAvatar(loginUser.getAvatar());
|
||||
data.setAge(loginUser.getAge());
|
||||
data.setCity(loginUser.getCity());
|
||||
data.setTime(CaiDateUtil.getCurrentTimeStr());
|
||||
data.setSex(loginUser.getGender());
|
||||
NoticeR<SendOnlineAttentionNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.SEND_ONLINE_ATTENTION, data);
|
||||
YxDataR<YxCommonR> r = yunxin.batchSendToNotice(toUid, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,7 +409,7 @@ public class YunxinHttpService {
|
||||
|
||||
|
||||
/**
|
||||
* 相册审核通知
|
||||
* 相册审核通知 TODO
|
||||
*/
|
||||
public void albumAuditMessage(Long toUid){
|
||||
YunExecutor.YUN_EXECUTOR.execute(() -> {
|
||||
@@ -452,36 +451,37 @@ public class YunxinHttpService {
|
||||
/**
|
||||
* 发送充值飘窗提醒
|
||||
*/
|
||||
public void sendRechargeWindowsAmount(Long toUid){
|
||||
YunExecutor.YUN_EXECUTOR.execute(() -> {
|
||||
SendRechargeWindowsAmountNoticeData data = new SendRechargeWindowsAmountNoticeData();
|
||||
NoticeR<SendRechargeWindowsAmountNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.RECHARGE_WINDOWS_AMOUNT, data);
|
||||
YxDataR<SendMsgResp> r = yunxin.sendToNotice(toUid, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
});
|
||||
public void sendRechargeWindowsAmount(List<Long> toIds, WindowRechargeDTO windowRecharge){
|
||||
SendRechargeWindowsAmountNoticeData data = new SendRechargeWindowsAmountNoticeData();
|
||||
data.setId(windowRecharge.getId());
|
||||
data.setNickname(windowRecharge.getNickname());
|
||||
data.setAvatar(windowRecharge.getAvatar());
|
||||
data.setAmount(windowRecharge.getAmount().toString());
|
||||
data.setTime(CaiDateUtil.getCurrentTimeStr());
|
||||
NoticeR<SendRechargeWindowsAmountNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.RECHARGE_WINDOWS_AMOUNT, data);
|
||||
YxDataR<YxCommonR> r = yunxin.batchSendToNotice(toIds, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送礼物飘窗提醒
|
||||
*/
|
||||
public void sendGiftWindowsAmount(Long toUid){
|
||||
YunExecutor.YUN_EXECUTOR.execute(() -> {
|
||||
SendGiftWindowsAmountNoticeData data = new SendGiftWindowsAmountNoticeData();
|
||||
NoticeR<SendGiftWindowsAmountNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.SEND_GIFT_WINDOWS_AMOUNT, data);
|
||||
YxDataR<SendMsgResp> r = yunxin.sendToNotice(toUid, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
});
|
||||
public void sendGiftWindowsAmount(List<Long> toUid, SendGiftWindowsAmountNoticeData data){
|
||||
NoticeR<SendGiftWindowsAmountNoticeData> notice = NoticeR.ok(MessageBaseTypeEnum.SEND_GIFT_WINDOWS_AMOUNT, data);
|
||||
YxDataR<YxCommonR> r = yunxin.batchSendToNotice(toUid, notice);
|
||||
if(r == null || !r.isSuccess()){
|
||||
log.error("云信发送失败【sendCallAsync】r={}", JSON.toJSONString(r));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 动态通知
|
||||
*/
|
||||
@Deprecated
|
||||
public void sendFollowDynamicBath(Long toUid, User user,String image,String content){
|
||||
YunExecutor.YUN_EXECUTOR.execute(() -> {
|
||||
SendFollowDynamicNoticeData data = new SendFollowDynamicNoticeData();
|
||||
|
||||
@@ -10,10 +10,10 @@ public class SendGiftWindowsAmountNoticeData {
|
||||
private Long toid;
|
||||
private String tonickname;
|
||||
private String toavatar;
|
||||
private String amount;
|
||||
private Long amount;
|
||||
private String giftname;
|
||||
private String giftimg;
|
||||
private String gifttotal;
|
||||
private Long gifttotal;
|
||||
private String time;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user