Commit 126aa1b40acef366bc21bc2a99e1eab1fad932ba

Authored by YunaiV
1 parent 1dadfb8f

【功能优化】支付:支付应用,增加 appKey 标识,用于不同接入方的标识

yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java
... ... @@ -44,7 +44,7 @@ public class PayAppServiceImpl implements PayAppService {
44 44 @Override
45 45 public Long createApp(PayAppCreateReqVO createReqVO) {
46 46 // 验证 appKey 是否重复
47   - validateEmailUnique(null, createReqVO.getAppKey());
  47 + validateAppKeyUnique(null, createReqVO.getAppKey());
48 48  
49 49 // 插入
50 50 PayAppDO app = PayAppConvert.INSTANCE.convert(createReqVO);
... ... @@ -58,14 +58,14 @@ public class PayAppServiceImpl implements PayAppService {
58 58 // 校验存在
59 59 validateAppExists(updateReqVO.getId());
60 60 // 验证 appKey 是否重复
61   - validateEmailUnique(updateReqVO.getId(), updateReqVO.getAppKey());
  61 + validateAppKeyUnique(updateReqVO.getId(), updateReqVO.getAppKey());
62 62  
63 63 // 更新
64 64 PayAppDO updateObj = PayAppConvert.INSTANCE.convert(updateReqVO);
65 65 appMapper.updateById(updateObj);
66 66 }
67 67  
68   - void validateEmailUnique(Long id, String appKey) {
  68 + void validateAppKeyUnique(Long id, String appKey) {
69 69 PayAppDO app = appMapper.selectByAppKey(appKey);
70 70 if (app == null) {
71 71 return;
... ...