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
cc0a93fa
Commit
cc0a93fa
authored
Mar 02, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:vo enum -> string
parent
8ed14105
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
service/src/main/java/com/jiejing/fitness/finance/service/pay/convert/PayConvert.java
+4
-3
service/src/main/java/com/jiejing/fitness/finance/service/rpc/PayRpcService.java
+2
-2
No files found.
service/src/main/java/com/jiejing/fitness/finance/service/pay/convert/PayConvert.java
View file @
cc0a93fa
...
@@ -16,6 +16,7 @@ import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams;
...
@@ -16,6 +16,7 @@ import com.jiejing.fitness.finance.service.pay.params.BrandMerchantRefundParams;
import
com.jiejing.fitness.finance.service.utils.FeeUtil
;
import
com.jiejing.fitness.finance.service.utils.FeeUtil
;
import
com.jiejing.fitness.finance.service.utils.MoneyUtil
;
import
com.jiejing.fitness.finance.service.utils.MoneyUtil
;
import
com.jiejing.paycenter.api.merchant.vo.MerchantVO
;
import
com.jiejing.paycenter.api.merchant.vo.MerchantVO
;
import
com.jiejing.paycenter.api.merchant.vo.SubChannelVO
;
import
com.jiejing.paycenter.api.pay.request.PayRequest
;
import
com.jiejing.paycenter.api.pay.request.PayRequest
;
import
com.jiejing.paycenter.api.pay.request.RefundPayRequest
;
import
com.jiejing.paycenter.api.pay.request.RefundPayRequest
;
import
com.jiejing.paycenter.api.pay.vo.RefundVO
;
import
com.jiejing.paycenter.api.pay.vo.RefundVO
;
...
@@ -124,8 +125,8 @@ public class PayConvert {
...
@@ -124,8 +125,8 @@ public class PayConvert {
default
:
default
:
throw
new
BizException
(
FinanceErrorEnums
.
NOT_SUPPORT_TYPE
);
throw
new
BizException
(
FinanceErrorEnums
.
NOT_SUPPORT_TYPE
);
}
}
SubChannel
Info
subChannelInfo
=
merchant
.
getSubChannels
().
stream
()
SubChannel
VO
subChannelInfo
=
merchant
.
getSubChannels
().
stream
()
.
filter
(
e
->
scene
==
e
.
getOpenType
(
))
.
filter
(
e
->
scene
.
name
().
equals
(
e
.
getOpenType
()
))
.
findFirst
()
.
findFirst
()
.
orElseThrow
(()
->
new
BizException
(
FinanceErrorEnums
.
CHANNEL_NOT_OPEN
));
.
orElseThrow
(()
->
new
BizException
(
FinanceErrorEnums
.
CHANNEL_NOT_OPEN
));
return
subChannelInfo
.
getFeeRate
();
return
subChannelInfo
.
getFeeRate
();
...
@@ -194,7 +195,7 @@ public class PayConvert {
...
@@ -194,7 +195,7 @@ public class PayConvert {
public
static
BrandCashierRecord
convertRefund
(
BrandCashierRecord
record
,
RefundVO
vo
)
{
public
static
BrandCashierRecord
convertRefund
(
BrandCashierRecord
record
,
RefundVO
vo
)
{
return
BrandCashierRecord
.
builder
()
return
BrandCashierRecord
.
builder
()
.
id
(
record
.
getId
())
.
id
(
record
.
getId
())
.
transState
(
convertTransState
(
vo
.
getRefundState
(
)))
.
transState
(
convertTransState
(
TransStateEnums
.
getByCode
(
vo
.
getRefundState
()
)))
.
failMessage
(
vo
.
getFailMessage
())
.
failMessage
(
vo
.
getFailMessage
())
.
successTime
(
vo
.
getSuccessTime
())
.
successTime
(
vo
.
getSuccessTime
())
.
updateTime
(
new
Date
())
.
updateTime
(
new
Date
())
...
...
service/src/main/java/com/jiejing/fitness/finance/service/rpc/PayRpcService.java
View file @
cc0a93fa
...
@@ -27,7 +27,7 @@ public class PayRpcService {
...
@@ -27,7 +27,7 @@ public class PayRpcService {
result
.
assertSuccess
();
result
.
assertSuccess
();
return
result
.
getResult
();
return
result
.
getResult
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
PayVO
.
builder
().
payState
(
PayStateEnums
.
FAILED
).
failMsg
(
e
.
getMessage
()).
build
();
return
PayVO
.
builder
().
payState
(
PayStateEnums
.
FAILED
.
name
()
).
failMsg
(
e
.
getMessage
()).
build
();
}
}
}
}
...
@@ -37,7 +37,7 @@ public class PayRpcService {
...
@@ -37,7 +37,7 @@ public class PayRpcService {
result
.
assertSuccess
();
result
.
assertSuccess
();
return
result
.
getResult
();
return
result
.
getResult
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
RefundVO
.
builder
().
refundState
(
TransStateEnums
.
FAIL
).
failMessage
(
e
.
getMessage
()).
build
();
return
RefundVO
.
builder
().
refundState
(
TransStateEnums
.
FAIL
.
name
()
).
failMessage
(
e
.
getMessage
()).
build
();
}
}
}
}
...
...
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