mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【功能优化】支付:支付应用,增加 appKey 标识,用于不同接入方的标识
This commit is contained in:
parent
1dadfb8fba
commit
126aa1b40a
@ -44,7 +44,7 @@ public class PayAppServiceImpl implements PayAppService {
|
||||
@Override
|
||||
public Long createApp(PayAppCreateReqVO createReqVO) {
|
||||
// 验证 appKey 是否重复
|
||||
validateEmailUnique(null, createReqVO.getAppKey());
|
||||
validateAppKeyUnique(null, createReqVO.getAppKey());
|
||||
|
||||
// 插入
|
||||
PayAppDO app = PayAppConvert.INSTANCE.convert(createReqVO);
|
||||
@ -58,14 +58,14 @@ public class PayAppServiceImpl implements PayAppService {
|
||||
// 校验存在
|
||||
validateAppExists(updateReqVO.getId());
|
||||
// 验证 appKey 是否重复
|
||||
validateEmailUnique(updateReqVO.getId(), updateReqVO.getAppKey());
|
||||
validateAppKeyUnique(updateReqVO.getId(), updateReqVO.getAppKey());
|
||||
|
||||
// 更新
|
||||
PayAppDO updateObj = PayAppConvert.INSTANCE.convert(updateReqVO);
|
||||
appMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
void validateEmailUnique(Long id, String appKey) {
|
||||
void validateAppKeyUnique(Long id, String appKey) {
|
||||
PayAppDO app = appMapper.selectByAppKey(appKey);
|
||||
if (app == null) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user