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
43c9a6bb
Commit
43c9a6bb
authored
May 17, 2022
by
xiaoyu
Browse files
商户删除优化
parent
3a32cad4
Changes
1
Hide whitespace changes
Inline
Side-by-side
jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchInfoService.java
View file @
43c9a6bb
...
...
@@ -17,8 +17,7 @@ package com.jeequan.jeepay.service.impl;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.jeequan.jeepay.core.constants.ApiCodeEnum
;
import
com.jeequan.jeepay.core.constants.CS
;
...
...
@@ -31,7 +30,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.LinkedList
;
import
java.util.List
;
...
...
@@ -137,10 +135,12 @@ public class MchInfoService extends ServiceImpl<MchInfoMapper, MchInfo> {
// 3.删除当前商户支付接口配置参数
List
<
String
>
appIdList
=
new
LinkedList
<>();
mchAppService
.
list
(
MchApp
.
gw
().
eq
(
MchApp:
:
getMchNo
,
mchNo
)).
forEach
(
item
->
appIdList
.
add
(
item
.
getAppId
()));
payInterfaceConfigService
.
remove
(
PayInterfaceConfig
.
gw
()
.
in
(
PayInterfaceConfig:
:
getInfoId
,
appIdList
)
.
eq
(
PayInterfaceConfig:
:
getInfoType
,
CS
.
INFO_TYPE_MCH_APP
)
);
if
(
CollectionUtils
.
isNotEmpty
(
appIdList
))
{
payInterfaceConfigService
.
remove
(
PayInterfaceConfig
.
gw
()
.
in
(
PayInterfaceConfig:
:
getInfoId
,
appIdList
)
.
eq
(
PayInterfaceConfig:
:
getInfoType
,
CS
.
INFO_TYPE_MCH_APP
)
);
}
List
<
SysUser
>
userList
=
sysUserService
.
list
(
SysUser
.
gw
()
.
eq
(
SysUser:
:
getBelongInfoId
,
mchNo
)
...
...
@@ -148,11 +148,13 @@ public class MchInfoService extends ServiceImpl<MchInfoMapper, MchInfo> {
);
// 4.删除当前商户应用信息
mchAppService
.
removeByIds
(
appIdList
);
if
(
CollectionUtils
.
isNotEmpty
(
appIdList
))
{
mchAppService
.
removeByIds
(
appIdList
);
}
// 返回的用户id
List
<
Long
>
userIdList
=
new
ArrayList
<>();
if
(
userList
.
size
()
>
0
)
{
if
(
CollectionUtils
.
isNotEmpty
(
userList
)
)
{
for
(
SysUser
user:
userList
)
{
userIdList
.
add
(
user
.
getSysUserId
());
}
...
...
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