Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fit-finance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fitness-server
fit-finance
Commits
5834916f
Commit
5834916f
authored
Apr 25, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: unbind
parent
8d2ee4e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+13
-8
No files found.
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
5834916f
...
...
@@ -346,19 +346,24 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
// 所有子通道全部开通成功
PartyToMerchant
old
=
getRelation
(
apply
.
getStudioId
());
// 1. 绑定场馆
this
.
bind
(
apply
.
getStudioId
(),
event
.
getMerchantId
(),
false
);
// 1. 如果当前场馆绑定的是自己的商户号(old),则需要将绑定了该商户号的所有其他场馆进行解绑
if
(
null
!=
old
&&
!
old
.
getMerchantId
().
equals
(
event
.
getMerchantId
()))
{
// 1.1 场馆商户发生了变更,解绑掉绑定了老商户号的所有场馆
this
.
unbindAll
(
old
.
getMerchantId
());
// 1.2 场馆商户发生了变更,解绑掉绑定了老商户号的品牌
brandMerchantService
.
unbind
(
apply
.
getBrandId
(),
old
.
getMerchantId
());
StudioMerchantApply
oldApply
=
studioMerchantApplyRpService
.
getLatestOneSuccessByMerchantId
(
old
.
getMerchantId
());
if
(!
oldApply
.
getStudioId
().
equals
(
apply
.
getStudioId
()))
{
// 1.1 如果当前场馆绑定的是自己的商户号(old),则需要将绑定了该商户号的所有其他场馆进行解绑
this
.
unbindAll
(
old
.
getMerchantId
());
// 1.2 场馆商户发生了变更,解绑掉绑定了老商户号的品牌
brandMerchantService
.
unbind
(
apply
.
getBrandId
(),
old
.
getMerchantId
());
}
}
// 2. 绑定品牌
// 2. 绑定场馆
this
.
bind
(
apply
.
getStudioId
(),
event
.
getMerchantId
(),
false
);
// 3. 绑定品牌
brandMerchantService
.
bind
(
apply
.
getBrandId
(),
event
.
getMerchantId
());
//
3
. 其他操作
//
4
. 其他操作
executor
.
execute
(()
->
this
.
doAfterMerchantSuccess
(
event
,
Optional
.
ofNullable
(
old
).
map
(
PartyToMerchant:
:
getMerchantId
).
orElse
(
null
)));
...
...
Write
Preview
Markdown
is supported
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