1. 增加【默认】的系统租户的概念,禁止修改与删除等操作

2. 修复定时任务在刷新本地缓存时,会过滤租户的问题
3. 调整短信的回调地址,并进行租户的白名单
This commit is contained in:
YunaiV
2022-02-24 00:53:28 +08:00
parent fa62ace6af
commit 75928525ca
13 changed files with 77 additions and 40 deletions

View File

@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;
import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper;
import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@ -65,6 +66,10 @@ public class PayChannelServiceImpl implements PayChannelService {
@Resource
private Validator validator;
@Resource
@Lazy // 注入自己,所以延迟加载
private PayChannelService self;
@Override
@PostConstruct
@TenantIgnore // 忽略自动化租户,全局初始化本地缓存
@ -86,7 +91,7 @@ public class PayChannelServiceImpl implements PayChannelService {
@Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD)
public void schedulePeriodicRefresh() {
initPayClients();
self.initPayClients();
}
/**