Commit 126aa1b40acef366bc21bc2a99e1eab1fad932ba
1 parent
1dadfb8f
【功能优化】支付:支付应用,增加 appKey 标识,用于不同接入方的标识
Showing
1 changed file
with
3 additions
and
3 deletions
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,7 +44,7 @@ public class PayAppServiceImpl implements PayAppService { | ||
| 44 | @Override | 44 | @Override |
| 45 | public Long createApp(PayAppCreateReqVO createReqVO) { | 45 | public Long createApp(PayAppCreateReqVO createReqVO) { |
| 46 | // 验证 appKey 是否重复 | 46 | // 验证 appKey 是否重复 |
| 47 | - validateEmailUnique(null, createReqVO.getAppKey()); | 47 | + validateAppKeyUnique(null, createReqVO.getAppKey()); |
| 48 | 48 | ||
| 49 | // 插入 | 49 | // 插入 |
| 50 | PayAppDO app = PayAppConvert.INSTANCE.convert(createReqVO); | 50 | PayAppDO app = PayAppConvert.INSTANCE.convert(createReqVO); |
| @@ -58,14 +58,14 @@ public class PayAppServiceImpl implements PayAppService { | @@ -58,14 +58,14 @@ public class PayAppServiceImpl implements PayAppService { | ||
| 58 | // 校验存在 | 58 | // 校验存在 |
| 59 | validateAppExists(updateReqVO.getId()); | 59 | validateAppExists(updateReqVO.getId()); |
| 60 | // 验证 appKey 是否重复 | 60 | // 验证 appKey 是否重复 |
| 61 | - validateEmailUnique(updateReqVO.getId(), updateReqVO.getAppKey()); | 61 | + validateAppKeyUnique(updateReqVO.getId(), updateReqVO.getAppKey()); |
| 62 | 62 | ||
| 63 | // 更新 | 63 | // 更新 |
| 64 | PayAppDO updateObj = PayAppConvert.INSTANCE.convert(updateReqVO); | 64 | PayAppDO updateObj = PayAppConvert.INSTANCE.convert(updateReqVO); |
| 65 | appMapper.updateById(updateObj); | 65 | appMapper.updateById(updateObj); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | - void validateEmailUnique(Long id, String appKey) { | 68 | + void validateAppKeyUnique(Long id, String appKey) { |
| 69 | PayAppDO app = appMapper.selectByAppKey(appKey); | 69 | PayAppDO app = appMapper.selectByAppKey(appKey); |
| 70 | if (app == null) { | 70 | if (app == null) { |
| 71 | return; | 71 | return; |