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