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
b88ed7d9
Commit
b88ed7d9
authored
Apr 23, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:latest success apply
parent
26220be3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
+16
-9
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApi.java
+1
-1
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApiFallback.java
+1
-1
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/StudioMerchantController.java
+1
-1
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
+1
-1
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+12
-5
No files found.
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApi.java
View file @
b88ed7d9
...
@@ -48,7 +48,7 @@ public interface StudioMerchantApi {
...
@@ -48,7 +48,7 @@ public interface StudioMerchantApi {
@ApiOperation
(
value
=
"解绑前置校验请求"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"解绑前置校验请求"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/checkUnbind"
)
@PostMapping
(
value
=
"/private/studioMerchant/checkUnbind"
)
JsonResult
<
Boolean
>
checkUnbind
(
CheckUnbindStudioMerchantRequest
request
);
JsonResult
<
List
<
String
>
>
checkUnbind
(
CheckUnbindStudioMerchantRequest
request
);
@ApiOperation
(
value
=
"场馆解绑商户"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"场馆解绑商户"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/unbind"
)
@PostMapping
(
value
=
"/private/studioMerchant/unbind"
)
...
...
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApiFallback.java
View file @
b88ed7d9
...
@@ -50,7 +50,7 @@ public class StudioMerchantApiFallback implements FallbackFactory<StudioMerchant
...
@@ -50,7 +50,7 @@ public class StudioMerchantApiFallback implements FallbackFactory<StudioMerchant
}
}
@Override
@Override
public
JsonResult
<
Boolean
>
checkUnbind
(
CheckUnbindStudioMerchantRequest
request
)
{
public
JsonResult
<
List
<
String
>
>
checkUnbind
(
CheckUnbindStudioMerchantRequest
request
)
{
return
JsonResult
.
rpcError
();
return
JsonResult
.
rpcError
();
}
}
...
...
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/StudioMerchantController.java
View file @
b88ed7d9
...
@@ -74,7 +74,7 @@ public class StudioMerchantController implements StudioMerchantApi {
...
@@ -74,7 +74,7 @@ public class StudioMerchantController implements StudioMerchantApi {
@ApiOperation
(
value
=
"解绑前置校验请求"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"解绑前置校验请求"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/checkUnbind"
)
@PostMapping
(
value
=
"/private/studioMerchant/checkUnbind"
)
@Override
@Override
public
JsonResult
<
Boolean
>
checkUnbind
(
@RequestBody
@Valid
CheckUnbindStudioMerchantRequest
request
)
{
public
JsonResult
<
List
<
String
>
>
checkUnbind
(
@RequestBody
@Valid
CheckUnbindStudioMerchantRequest
request
)
{
return
JsonResult
.
success
(
return
JsonResult
.
success
(
studioMerchantService
.
checkUnbind
(
request
.
getStudioId
(),
request
.
getMerchantId
()));
studioMerchantService
.
checkUnbind
(
request
.
getStudioId
(),
request
.
getMerchantId
()));
}
}
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
View file @
b88ed7d9
...
@@ -134,7 +134,7 @@ public interface StudioMerchantService {
...
@@ -134,7 +134,7 @@ public interface StudioMerchantService {
* @param merchantId 商户ID
* @param merchantId 商户ID
* @return true:绑定过其他场馆;false-没有绑定过
* @return true:绑定过其他场馆;false-没有绑定过
*/
*/
Boolean
checkUnbind
(
Long
studioId
,
Long
merchantId
);
List
<
String
>
checkUnbind
(
Long
studioId
,
Long
merchantId
);
/**
/**
* 获取最后一条成功的申请记录
* 获取最后一条成功的申请记录
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
b88ed7d9
...
@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.service.merchant.impl;
...
@@ -2,6 +2,7 @@ package com.jiejing.fitness.finance.service.merchant.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.google.common.collect.Lists
;
import
com.jiejing.common.exception.BizException
;
import
com.jiejing.common.exception.BizException
;
import
com.jiejing.common.model.PageVO
;
import
com.jiejing.common.model.PageVO
;
import
com.jiejing.common.utils.collection.CollectionUtil
;
import
com.jiejing.common.utils.collection.CollectionUtil
;
...
@@ -274,12 +275,18 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -274,12 +275,18 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
}
}
@Override
@Override
public
Boolean
checkUnbind
(
Long
studioId
,
Long
merchantId
)
{
public
List
<
String
>
checkUnbind
(
Long
studioId
,
Long
merchantId
)
{
List
<
PartyToMerchant
>
merchants
=
partyToMerchantRpService
.
listByMerchantIdAndPartyType
(
merchantId
,
PartyTypeEnum
.
STUDIO
);
List
<
PartyToMerchant
>
merchants
=
partyToMerchantRpService
.
listByMerchantIdAndPartyType
(
merchantId
,
return
Optional
.
ofNullable
(
merchants
)
PartyTypeEnum
.
STUDIO
);
.
orElse
(
new
ArrayList
<>(
1
))
if
(
CollectionUtil
.
isEmpty
(
merchants
))
{
return
Lists
.
newArrayList
();
}
return
studioRpcService
.
listStudio
(
merchants
.
stream
().
map
(
PartyToMerchant:
:
getPartyId
).
collect
(
Collectors
.
toList
()))
.
stream
()
.
stream
()
.
anyMatch
(
e
->
!
e
.
getPartyId
().
equals
(
studioId
));
.
filter
(
e
->
!
e
.
getId
().
equals
(
studioId
))
.
map
(
StudioVO:
:
getName
)
.
collect
(
Collectors
.
toList
());
}
}
@Override
@Override
...
...
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