This commit is contained in:
dute7liang
2024-01-25 21:21:20 +08:00
parent 13fa059d02
commit 78e381be13
8 changed files with 16 additions and 15 deletions

View File

@@ -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);

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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();

View File

@@ -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)

View File

@@ -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)

View File

@@ -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();

View File

@@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDynamicImageList" resultType="java.lang.String">
select t2.url
from cai_dynamic t1
join cai_dynamic_images t2 on t1.id = t2.user_id
join cai_dynamic_images t2 on t1.user_id = t2.user_id
where t1.audit_status = 2 and t1.user_id = #{userId}
limit #{limit}
</select>