Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e1c58c98
authored
Dec 01, 2025
by
Jony.L
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复金额格式化:确保保留两位小数
parent
474b5189
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
computility-module-pay/src/main/java/com/luhu/computility/module/pay/service/wpgj/CommonWpgjPayServiceImpl.java
+3
-1
No files found.
computility-module-pay/src/main/java/com/luhu/computility/module/pay/service/wpgj/CommonWpgjPayServiceImpl.java
View file @
e1c58c98
...
...
@@ -46,7 +46,9 @@ public class CommonWpgjPayServiceImpl implements CommonWpgjPayApi {
wpgjCreateReqDTO
.
setBusinessType
(
createReqDTO
.
getBusinessType
());
wpgjCreateReqDTO
.
setMerOrderId
(
String
.
valueOf
(
createReqDTO
.
getBusinessOrderId
()));
wpgjCreateReqDTO
.
setOrderTitle
(
StrUtils
.
maxLength
(
createReqDTO
.
getOrderTitle
(),
64
));
// WPGJ订单标题最大64位
wpgjCreateReqDTO
.
setOrderAmt
(
String
.
valueOf
(
createReqDTO
.
getPayAmount
()
/
100.0
));
// 转换为元
// 修复金额格式化:确保保留两位小数(WPGJ要求)
String
orderAmtInYuan
=
String
.
format
(
"%.2f"
,
createReqDTO
.
getPayAmount
()
/
100.0
);
wpgjCreateReqDTO
.
setOrderAmt
(
orderAmtInYuan
);
// 转换为元,保留两位小数
Long
wpgjOrderId
=
payOrderWpgjApi
.
createOrderWpgj
(
wpgjCreateReqDTO
);
log
.
info
(
"[createCommonWpgjOrder] WPGJ订单创建成功,业务类型: {}, 业务订单ID: {}, WPGJ订单ID: {}"
,
...
...
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