123
This commit is contained in:
@@ -6,6 +6,7 @@ import com.ruoyi.cai.dto.ConsumeResp;
|
||||
import com.ruoyi.cai.dto.app.query.GiveGiftReq;
|
||||
import com.ruoyi.cai.dto.app.query.GiveGuardReq;
|
||||
import com.ruoyi.cai.dto.commom.consumer.GiftConsumerResp;
|
||||
import com.ruoyi.cai.dto.commom.consumer.GuardConsumerResp;
|
||||
import com.ruoyi.cai.dto.commom.consumer.RechargeConsumerResp;
|
||||
import com.ruoyi.cai.dto.video.VideoSettleResp;
|
||||
import com.ruoyi.cai.mq.AmqpProducer;
|
||||
@@ -38,14 +39,24 @@ public class ConsumerManager {
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
|
||||
public ConsumeResp sendGuard(GiveGuardReq query){
|
||||
ConsumeResp resp = guardTotalService.giveGuard(query);
|
||||
public GuardConsumerResp sendGuard(GiveGuardReq query){
|
||||
GuardConsumerResp resp = guardTotalService.giveGuard(query);
|
||||
if(resp.isSuccess()){
|
||||
try {
|
||||
amqpProducer.sendCalculateSales(resp.getConsumeLogId()+"");
|
||||
}catch (Exception e){
|
||||
log.error("RabbitMq 发送失败, 守护分销流程流转失败!",e);
|
||||
}
|
||||
try {
|
||||
Account account = accountService.getByUserId(resp.getToUid());
|
||||
if(account != null){
|
||||
Long totalCoin = account.getCoin() + account.getIncomeCoin();
|
||||
// 主播的系统收益通知
|
||||
yunxinHttpService.getGuardMessage(resp.getToUid(), query.getGuardNum(), query.getGuardPrice(), resp.getAnchorIncomeCoin(), totalCoin);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("礼物赠送成功通知失败!",e);
|
||||
}
|
||||
}
|
||||
return resp;
|
||||
}
|
||||
@@ -59,11 +70,14 @@ public class ConsumerManager {
|
||||
log.error("RabbitMq 发送失败, 礼物分销流程流转失败!",e);
|
||||
}
|
||||
try {
|
||||
Account account = accountService.getByUserId(resp.getUserId());
|
||||
Account account = accountService.getByUserId(resp.getToUid());
|
||||
if(account != null){
|
||||
Long totalCoin = account.getCoin() + account.getIncomeCoin();
|
||||
yunxinHttpService.getGiftSendMessage(resp.getUserId(), resp.getGift(), resp.getAnchorIncomeCoin(), totalCoin);
|
||||
// 主播的系统收益通知
|
||||
yunxinHttpService.getGiftSendMessage(resp.getToUid(), resp.getGift(), resp.getAnchorIncomeCoin(), totalCoin);
|
||||
}
|
||||
// 发送方给接收方的消息
|
||||
yunxinHttpService.sendGiftMessage(resp.getFromUid(),resp.getToUid(),resp.getGift(),query.getGiftCount());
|
||||
}catch (Exception e){
|
||||
log.error("礼物赠送成功通知失败!",e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.cai.manager;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.domain.UserFollow;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.service.UserFollowService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class LoginAfterManager {
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
@Autowired
|
||||
private UserFollowService userFollowService;
|
||||
|
||||
public void loginAfter(Long userId){
|
||||
Page<UserFollow> page = new Page<>();
|
||||
// page.setSize()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user