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
8d2ee4e2
Commit
8d2ee4e2
authored
Apr 25, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:list auth sub channel merchant nos
parent
58b4d297
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
api/src/main/java/com/jiejing/fitness/finance/api/merchant/vo/StudioMerchantAuthSubChannelVO.java
+4
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+24
-2
No files found.
api/src/main/java/com/jiejing/fitness/finance/api/merchant/vo/StudioMerchantAuthSubChannelVO.java
View file @
8d2ee4e2
...
...
@@ -7,6 +7,7 @@ import com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelEnums
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -48,4 +49,7 @@ public class StudioMerchantAuthSubChannelVO {
@ApiModelProperty
(
value
=
"失败原因"
)
private
String
failMessage
;
@ApiModelProperty
(
value
=
"子商户号"
)
private
List
<
String
>
merchantNos
;
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
8d2ee4e2
...
...
@@ -33,6 +33,7 @@ import com.jiejing.fitness.finance.service.rpc.MessageRpcService;
import
com.jiejing.fitness.finance.service.rpc.ResourceRpcService
;
import
com.jiejing.fitness.finance.service.rpc.StudioRpcService
;
import
com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums
;
import
com.jiejing.paycenter.common.model.vo.AuthSubChannelVO
;
import
com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO
;
import
com.jiejing.paycenter.common.model.vo.MerchantVO
;
...
...
@@ -44,6 +45,7 @@ import com.jiejing.paycenter.common.enums.merchant.SubChannelConfigTypeEnums;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelEnums
;
import
com.jiejing.paycenter.common.event.MerchantEvent
;
import
com.jiejing.paycenter.common.model.request.ResourceInfo
;
import
com.jiejing.paycenter.common.model.vo.SubChannelVO
;
import
com.jiejing.studio.api.studio.vo.StudioVO
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -271,8 +273,28 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
MerchantVO
merchant
=
merchantRpcService
.
getByMerchantId
(
relation
.
getMerchantId
());
List
<
SubChannelAuthVO
>
auths
=
merchant
.
getSubChannelAuths
();
return
Optional
.
ofNullable
(
auths
).
orElse
(
new
ArrayList
<>(
1
)).
stream
()
.
map
(
e
->
BeanUtil
.
map
(
e
,
StudioMerchantAuthSubChannelVO
.
class
)).
collect
(
Collectors
.
toList
());
List
<
SubChannelVO
>
subChannels
=
Optional
.
ofNullable
(
merchant
.
getSubChannels
()).
orElse
(
new
ArrayList
<>());
return
Optional
.
ofNullable
(
auths
).
orElse
(
new
ArrayList
<>(
1
))
.
stream
()
.
map
(
e
->
{
StudioMerchantAuthSubChannelVO
vo
=
BeanUtil
.
map
(
e
,
StudioMerchantAuthSubChannelVO
.
class
);
switch
(
SubChannelAuthTypeEnums
.
getByCode
(
vo
.
getAuthType
()))
{
case
ALI_OFFLINE:
vo
.
setMerchantNos
(
subChannels
.
stream
().
filter
(
ele
->
SubChannelOpenTypeEnums
.
ALI_OFFLINE
==
SubChannelOpenTypeEnums
.
getByCode
(
ele
.
getOpenType
())).
findFirst
().
orElse
(
new
SubChannelVO
()).
getMerchantNos
());
break
;
case
WX_OFFLINE:
vo
.
setMerchantNos
(
subChannels
.
stream
().
filter
(
ele
->
SubChannelOpenTypeEnums
.
WX_GZH_OFFLINE
==
SubChannelOpenTypeEnums
.
getByCode
(
ele
.
getOpenType
())).
findFirst
().
orElse
(
new
SubChannelVO
()).
getMerchantNos
());
break
;
default
:
break
;
}
return
vo
;
})
.
collect
(
Collectors
.
toList
());
}
@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