优化 mp 账号的刷新机制,使用 Job 轮询,替换 MQ 广播

This commit is contained in:
YunaiV
2023-07-27 20:25:15 +08:00
parent 5d6308e4bb
commit c33186569d
14 changed files with 62 additions and 115 deletions

View File

@@ -6,8 +6,6 @@ import lombok.Data;
/**
* 支付单信息 Response DTO
*
* TODO 芋艿:还没定好字段
*
* @author 芋道源码
*/
@Data

View File

@@ -8,8 +8,6 @@ import java.time.LocalDateTime;
/**
* 退款单信息 Response DTO
*
* TODO 芋艿:还没定好字段
*
* @author 芋道源码
*/
@Data

View File

@@ -61,12 +61,6 @@
<artifactId>yudao-spring-boot-starter-job</artifactId>
</dependency>
<!-- 消息队列相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-mq</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>

View File

@@ -15,7 +15,6 @@ import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateR
import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert;
import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
import cn.iocoder.yudao.module.pay.dal.mysql.channel.PayChannelMapper;
import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
@@ -112,7 +111,7 @@ public class PayChannelServiceImpl implements PayChannelService {
channelMapper.insert(channel);
// 刷新缓存
refreshLocalCache();
initLocalCache();
return channel.getId();
}
@@ -127,7 +126,7 @@ public class PayChannelServiceImpl implements PayChannelService {
channelMapper.updateById(channel);
// 刷新缓存
refreshLocalCache();
initLocalCache();
}
/**
@@ -160,7 +159,7 @@ public class PayChannelServiceImpl implements PayChannelService {
channelMapper.deleteById(id);
// 刷新缓存
refreshLocalCache();
initLocalCache();
}
private PayChannelDO validateChannelExists(Long id) {