init
This commit is contained in:
@@ -136,7 +136,7 @@ public class RankAppController {
|
||||
love.setAvatar(user.getAvatar());
|
||||
love.setNickname(user.getNickname());
|
||||
love.setValue(rankNode.getScore());
|
||||
love.setDraw(rankNode.getDraw());
|
||||
love.setDraw(rankNode.getDraw() == null || rankNode.getDraw());
|
||||
love.setRankId(rankNode.getRankId());
|
||||
love.setHide(false);
|
||||
if(i == 0){
|
||||
@@ -191,7 +191,7 @@ public class RankAppController {
|
||||
invite.setAvatar(GenderEnum.WOMEN.getDefaultAvatar());
|
||||
invite.setNickname(minNickname(user.getNickname()));
|
||||
invite.setValue(rankNode.getScore());
|
||||
invite.setDraw(rankNode.getDraw());
|
||||
invite.setDraw(rankNode.getDraw() == null || rankNode.getDraw());
|
||||
invite.setRankId(rankNode.getRankId());
|
||||
if(i == 0){
|
||||
invite.setDiffLastValue(0L);
|
||||
|
||||
@@ -15,7 +15,7 @@ public class RoomCheckDelayMqConfig {
|
||||
public static final String ROUTING_KEY = "roomCheckDelayRouting";
|
||||
|
||||
@Bean
|
||||
public CustomExchange delayedExchange() {
|
||||
public CustomExchange roomCheckDelayedExchange() {
|
||||
HashMap<String,Object> args = new HashMap<>();
|
||||
args.put("x-delayed-type", "direct");
|
||||
return new CustomExchange(EXCHANGE_NAME,
|
||||
@@ -26,15 +26,15 @@ public class RoomCheckDelayMqConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Queue delayedQueue() {
|
||||
public Queue roomCheckDelayedQueue() {
|
||||
return QueueBuilder.durable(QUEUE_NAME)
|
||||
.withArgument("x-delayed-type", "direct")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Binding delayedBinding(Queue delayedQueue,CustomExchange delayedExchange) {
|
||||
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(ROUTING_KEY).noargs();
|
||||
public Binding roomCheckDelayedBinding(Queue roomCheckDelayedQueue,CustomExchange roomCheckDelayedExchange) {
|
||||
return BindingBuilder.bind(roomCheckDelayedQueue).to(roomCheckDelayedExchange).with(ROUTING_KEY).noargs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class RoomSettleDelayMqConfig {
|
||||
public static final String ROUTING_KEY = "roomSettleDelayRouting";
|
||||
|
||||
@Bean
|
||||
public CustomExchange delayedExchange() {
|
||||
public CustomExchange roomSettleDelayedExchange() {
|
||||
HashMap<String,Object> args = new HashMap<>();
|
||||
args.put("x-delayed-type", "direct");
|
||||
return new CustomExchange(EXCHANGE_NAME,
|
||||
@@ -26,15 +26,15 @@ public class RoomSettleDelayMqConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Queue delayedQueue() {
|
||||
public Queue roomSettleDelayedQueue() {
|
||||
return QueueBuilder.durable(QUEUE_NAME)
|
||||
.withArgument("x-delayed-type", "direct")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Binding delayedBinding(Queue delayedQueue,CustomExchange delayedExchange) {
|
||||
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(ROUTING_KEY).noargs();
|
||||
public Binding roomSettleDelayedBinding(Queue roomSettleDelayedQueue,CustomExchange roomSettleDelayedExchange) {
|
||||
return BindingBuilder.bind(roomSettleDelayedQueue).to(roomSettleDelayedExchange).with(ROUTING_KEY).noargs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||
import com.ruoyi.cai.mapper.UserBlacklistMapper;
|
||||
import com.ruoyi.cai.service.UserBlacklistService;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,7 @@ public class UserBlacklistServiceImpl extends ServiceImpl<UserBlacklistMapper, U
|
||||
@Override
|
||||
public boolean black(Long userId, Long blackUserId,Integer actionType) {
|
||||
if(userId.equals(blackUserId)){
|
||||
throw new SecurityException("不能对自己操作哦");
|
||||
throw new ServiceException("不能对自己操作哦");
|
||||
}
|
||||
if(actionType == 1){ // 拉黑
|
||||
UserBlacklist userBlacklist = new UserBlacklist();
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CancelMessageHandler extends AbstractMessageHandle implements IMess
|
||||
// IM
|
||||
Long receiverId = room.getReceiverId();
|
||||
Long callerId = room.getCallId();
|
||||
yunxinWsService.sendToCallNotifyAsync(callerId,receiverId,1,0);
|
||||
yunxinWsService.sendToCallNotifyAsync(callerId,receiverId,1,0L);
|
||||
// 更新房间状态
|
||||
userCallService.update(Wrappers.lambdaUpdate(UserCall.class)
|
||||
.eq(UserCall::getId,roomId)
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RefuseMessageHandler extends AbstractMessageHandle implements IMess
|
||||
//发送IM通知
|
||||
Long receiverId = room.getReceiverId();
|
||||
Long callerId = room.getCallId();
|
||||
yunxinWsService.sendToCallNotifyAsync(callerId,receiverId,1,0);
|
||||
yunxinWsService.sendToCallNotifyAsync(callerId,receiverId,1,0L);
|
||||
|
||||
// 更新房间状态
|
||||
userCallService.update(Wrappers.lambdaUpdate(UserCall.class)
|
||||
|
||||
@@ -129,7 +129,7 @@ public class RoomCheckJobService {
|
||||
nextCreateJob = settleResp.isNextRun();
|
||||
}
|
||||
roomService.closeAllFd(roomId);
|
||||
yunxinWsService.sendToCallNotifyAsync(callUserData.getId(),receiverUserData.getId(),3,0);
|
||||
yunxinWsService.sendToCallNotifyAsync(callUserData.getId(),receiverUserData.getId(),3,0L);
|
||||
return JobResp.builder().nextCreateJob(nextCreateJob).build();
|
||||
}
|
||||
return JobResp.builder().nextCreateJob(true).build();
|
||||
|
||||
Reference in New Issue
Block a user