Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
0debee51
Commit
0debee51
authored
Jun 18, 2021
by
terrfly
Browse files
解决删除应用, 支付参数不存在数据时报错的问题
parent
cf67837f
Changes
1
Hide whitespace changes
Inline
Side-by-side
jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchAppService.java
View file @
0debee51
...
...
@@ -36,23 +36,16 @@ public class MchAppService extends ServiceImpl<MchAppMapper, MchApp> {
if
(
payCount
>
0
)
throw
new
BizException
(
"该应用已存在交易数据,不可删除"
);
// 2.删除应用关联的支付通道
boolean
result
=
mchPayPassageService
.
remove
(
MchPayPassage
.
gw
().
eq
(
MchPayPassage:
:
getAppId
,
appId
));
if
(!
result
)
{
throw
new
BizException
(
ApiCodeEnum
.
SYS_OPERATION_FAIL_DELETE
);
}
mchPayPassageService
.
remove
(
MchPayPassage
.
gw
().
eq
(
MchPayPassage:
:
getAppId
,
appId
));
// 3.删除应用配置的支付参数
result
=
payInterfaceConfigService
.
remove
(
PayInterfaceConfig
.
gw
()
payInterfaceConfigService
.
remove
(
PayInterfaceConfig
.
gw
()
.
eq
(
PayInterfaceConfig:
:
getInfoId
,
appId
)
.
eq
(
PayInterfaceConfig:
:
getInfoType
,
CS
.
INFO_TYPE_MCH_APP
)
);
if
(!
result
)
{
throw
new
BizException
(
ApiCodeEnum
.
SYS_OPERATION_FAIL_DELETE
);
}
// 4.删除当前应用
result
=
removeById
(
appId
);
if
(!
result
)
{
if
(!
removeById
(
appId
))
{
throw
new
BizException
(
ApiCodeEnum
.
SYS_OPERATION_FAIL_DELETE
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment