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
15762201
Commit
15762201
authored
Aug 14, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加半屏小程序
parent
9ec89f85
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
service/src/main/java/com/jiejing/fitness/finance/service/event/ListenerService.java
+12
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
+8
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+18
-0
No files found.
service/src/main/java/com/jiejing/fitness/finance/service/event/ListenerService.java
View file @
15762201
...
@@ -8,6 +8,7 @@ import com.jiejing.fitness.finance.service.merchant.StudioMerchantService;
...
@@ -8,6 +8,7 @@ import com.jiejing.fitness.finance.service.merchant.StudioMerchantService;
import
com.jiejing.fitness.finance.service.pay.PayService
;
import
com.jiejing.fitness.finance.service.pay.PayService
;
import
com.jiejing.fitness.finance.service.pay.RefundService
;
import
com.jiejing.fitness.finance.service.pay.RefundService
;
import
com.jiejing.paycenter.common.event.MerchantEvent
;
import
com.jiejing.paycenter.common.event.MerchantEvent
;
import
com.jiejing.paycenter.common.event.MerchantSubChannelEvent
;
import
com.jiejing.paycenter.common.event.PayEvent
;
import
com.jiejing.paycenter.common.event.PayEvent
;
import
com.jiejing.paycenter.common.event.RefundEvent
;
import
com.jiejing.paycenter.common.event.RefundEvent
;
import
com.xiaomai.event.annotation.EventHandler
;
import
com.xiaomai.event.annotation.EventHandler
;
...
@@ -78,4 +79,15 @@ public class ListenerService {
...
@@ -78,4 +79,15 @@ public class ListenerService {
}
}
}
}
@EventHandler
(
value
=
MerchantSubChannelEvent
.
class
,
binder
=
"biz-kafka"
,
maxAttempts
=
MAX_RETRY
)
public
void
merchantSubChannelEventCallback
(
MerchantSubChannelEvent
event
,
@Header
(
DELIVERY_ATTEMPT
)
int
retryNum
)
{
try
{
log
.
info
(
"start process merchantSubChannelEventCallback event {}"
,
JSON
.
toJSONString
(
event
));
studioMerchantService
.
merchantSubChannelEventCallback
(
event
);
}
catch
(
Exception
e
)
{
log
.
info
(
"process merchantSubChannelEventCallback event fail {}"
,
event
.
getId
(),
e
);
}
}
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
View file @
15762201
...
@@ -12,6 +12,7 @@ import com.jiejing.fitness.finance.service.merchant.params.PageStudioMerchantApp
...
@@ -12,6 +12,7 @@ import com.jiejing.fitness.finance.service.merchant.params.PageStudioMerchantApp
import
com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelAuthTypeEnums
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelEnums
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelEnums
;
import
com.jiejing.paycenter.common.event.MerchantEvent
;
import
com.jiejing.paycenter.common.event.MerchantEvent
;
import
com.jiejing.paycenter.common.event.MerchantSubChannelEvent
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -67,6 +68,13 @@ public interface StudioMerchantService {
...
@@ -67,6 +68,13 @@ public interface StudioMerchantService {
void
callback
(
MerchantEvent
event
);
void
callback
(
MerchantEvent
event
);
/**
/**
* 商户子渠道事件处理
*
* @param event 事件
*/
void
merchantSubChannelEventCallback
(
MerchantSubChannelEvent
event
);
/**
* 获取场馆当前绑定的商户信息
* 获取场馆当前绑定的商户信息
*
*
* @param studioId 场馆ID
* @param studioId 场馆ID
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
15762201
...
@@ -44,6 +44,7 @@ import com.jiejing.message.enums.MsgChannelEnum;
...
@@ -44,6 +44,7 @@ import com.jiejing.message.enums.MsgChannelEnum;
import
com.jiejing.message.event.SendCommonMsgEvent
;
import
com.jiejing.message.event.SendCommonMsgEvent
;
import
com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest
;
import
com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums
;
import
com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums
;
import
com.jiejing.paycenter.common.event.MerchantSubChannelEvent
;
import
com.jiejing.paycenter.common.model.request.SubChannelConfigInfo
;
import
com.jiejing.paycenter.common.model.request.SubChannelConfigInfo
;
import
com.jiejing.paycenter.common.model.vo.AuthSubChannelVO
;
import
com.jiejing.paycenter.common.model.vo.AuthSubChannelVO
;
import
com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO
;
import
com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO
;
...
@@ -224,6 +225,23 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -224,6 +225,23 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
}
}
@Override
@Override
public
void
merchantSubChannelEventCallback
(
MerchantSubChannelEvent
event
)
{
// 如果是特定的失败,则绑定半屏支付小程序
if
(!
OpenStateEnums
.
FAIL
.
getCode
().
equals
(
event
.
getState
()))
{
return
;
}
if
(!
SubChannelConfigTypeEnums
.
WX_XCX_OFFLINE
.
getCode
().
equals
(
event
.
getConfigType
()))
{
return
;
}
if
(!
SPECIAL_FAIL_LIST
.
contains
(
event
.
getFailMessage
()))
{
return
;
}
StudioMerchantApply
apply
=
studioMerchantApplyRpService
.
getLatestOneSuccessByMerchantId
(
event
.
getMerchantId
());
this
.
bindEmbeddedXcx
(
apply
.
getStudioId
(),
Lists
.
newArrayList
(
event
.
getAppId
()));
}
@Override
public
StudioMerchantVO
getMerchant
(
Long
studioId
)
{
public
StudioMerchantVO
getMerchant
(
Long
studioId
)
{
PartyToMerchant
relation
=
getRelation
(
studioId
);
PartyToMerchant
relation
=
getRelation
(
studioId
);
if
(
null
==
relation
)
{
if
(
null
==
relation
)
{
...
...
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