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
48277ba8
authored
Oct 29, 2025
by
lijinqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付回调接口V0.2完成,支付订单状态待修改
parent
2ac6fcb6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/service/resourceorder/ResourceOrderServiceImpl.java
+8
-1
computility-module-pay/src/main/java/com/luhu/computility/module/pay/api/order/PayOrderApiImpl.java
+1
-0
computility-server/src/main/resources/application-dev.yaml
+1
-1
computility-server/src/main/resources/application.yaml
+2
-0
scp_pro.sh
+6
-0
No files found.
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/service/resourceorder/ResourceOrderServiceImpl.java
View file @
48277ba8
...
@@ -39,6 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -39,6 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -548,12 +550,15 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
...
@@ -548,12 +550,15 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
// 3. 校验支付金额是否匹配
// 3. 校验支付金额是否匹配
String
wpgjOrderAmt
=
notifyDTO
.
getOrderAmt
();
// WPGJ回调金额单位是元
String
wpgjOrderAmt
=
notifyDTO
.
getOrderAmt
();
// WPGJ回调金额单位是元
long
resourceOrderAmt
=
order
.
getPaymentPrice
()
/
100
;
// 转换为元
BigDecimal
resourceOrderAmt
=
BigDecimal
.
valueOf
(
order
.
getPaymentPrice
()).
divide
(
BigDecimal
.
valueOf
(
100
),
2
,
RoundingMode
.
HALF_UP
);
if
(!
wpgjOrderAmt
.
equals
(
String
.
valueOf
(
resourceOrderAmt
)))
{
if
(!
wpgjOrderAmt
.
equals
(
String
.
valueOf
(
resourceOrderAmt
)))
{
log
.
error
(
"[updateOrderPaidByWpgj] 支付金额不匹配,订单ID: {}, WPGJ金额: {}, 订单金额: {}"
,
log
.
error
(
"[updateOrderPaidByWpgj] 支付金额不匹配,订单ID: {}, WPGJ金额: {}, 订单金额: {}"
,
orderId
,
wpgjOrderAmt
,
resourceOrderAmt
);
orderId
,
wpgjOrderAmt
,
resourceOrderAmt
);
return
;
return
;
}
}
log
.
error
(
"[updateOrderPaidByWpgj] WPGJ金额: {}, 订单金额: {}"
,
orderId
,
wpgjOrderAmt
,
resourceOrderAmt
);
// 4. 更新算力资源订单状态为已支付
// 4. 更新算力资源订单状态为已支付
ResourceOrderDO
updateOrder
=
new
ResourceOrderDO
();
ResourceOrderDO
updateOrder
=
new
ResourceOrderDO
();
...
@@ -566,6 +571,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
...
@@ -566,6 +571,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
log
.
info
(
"[updateOrderPaidByWpgj] WPGJ支付成功回调处理完成,订单ID: {}, WPGJ订单号: {}"
,
log
.
info
(
"[updateOrderPaidByWpgj] WPGJ支付成功回调处理完成,订单ID: {}, WPGJ订单号: {}"
,
orderId
,
notifyDTO
.
getOrderId
());
orderId
,
notifyDTO
.
getOrderId
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"[updateOrderPaidByWpgj] 处理WPGJ支付成功回调异常,订单ID: {}"
,
orderId
,
e
);
log
.
error
(
"[updateOrderPaidByWpgj] 处理WPGJ支付成功回调异常,订单ID: {}"
,
orderId
,
e
);
throw
e
;
throw
e
;
...
...
computility-module-pay/src/main/java/com/luhu/computility/module/pay/api/order/PayOrderApiImpl.java
View file @
48277ba8
...
@@ -134,6 +134,7 @@ public class PayOrderApiImpl implements PayOrderApi {
...
@@ -134,6 +134,7 @@ public class PayOrderApiImpl implements PayOrderApi {
businessData
.
set
(
"cashier_type"
,
"1"
);
businessData
.
set
(
"cashier_type"
,
"1"
);
businessData
.
set
(
"return_url"
,
""
);
// WPGJ订单暂不使用return_url
businessData
.
set
(
"return_url"
,
""
);
// WPGJ订单暂不使用return_url
businessData
.
set
(
"notifyurl"
,
wpgjPayProperties
.
getNotifyUrl
());
businessData
.
set
(
"notifyurl"
,
wpgjPayProperties
.
getNotifyUrl
());
log
.
error
(
"[callWpgjApi] 开始调用WPGJ支付NotifyUrl: {}"
,
wpgjPayProperties
.
getNotifyUrl
());
// 2. 构建加密请求数据
// 2. 构建加密请求数据
String
encryptedRequest
=
WpgjCryptoUtils
.
buildEncryptedRequest
(
String
encryptedRequest
=
WpgjCryptoUtils
.
buildEncryptedRequest
(
...
...
computility-server/src/main/resources/application-dev.yaml
View file @
48277ba8
...
@@ -175,7 +175,7 @@ computility:
...
@@ -175,7 +175,7 @@ computility:
mer-code
:
K20241200111267
mer-code
:
K20241200111267
term-code
:
1011215692596
term-code
:
1011215692596
api-url
:
https://stg5-qr.wpgjcs.com/industrial/payment/dynamic
api-url
:
https://stg5-qr.wpgjcs.com/industrial/payment/dynamic
notify-url
:
https://phslgld.hnluchuan.com/admin-api/compute/
resource-order/pay/wpgj
-notify
notify-url
:
https://phslgld.hnluchuan.com/admin-api/compute/
wpgj/new
-notify
sign-key
:
07714583f82b4db8b675b32cd5e0969743
# WPGJ回调签名密钥(测试用,实际需要向WPGJ确认)
sign-key
:
07714583f82b4db8b675b32cd5e0969743
# WPGJ回调签名密钥(测试用,实际需要向WPGJ确认)
public-key
:
|
public-key
:
|
-----BEGIN PUBLIC KEY-----
-----BEGIN PUBLIC KEY-----
...
...
computility-server/src/main/resources/application.yaml
View file @
48277ba8
...
@@ -281,9 +281,11 @@ computility:
...
@@ -281,9 +281,11 @@ computility:
-
/admin-api/infra/file/preview
-
/admin-api/infra/file/preview
-
/app-api/infra/file/preview
-
/app-api/infra/file/preview
-
/open-api/external/**
-
/open-api/external/**
-
/admin-api/compute/wpgj/new-notify
ignore-visit-urls
:
ignore-visit-urls
:
-
/admin-api/system/user/profile/**
-
/admin-api/system/user/profile/**
-
/admin-api/system/auth/**
-
/admin-api/system/auth/**
-
/admin-api/compute/wpgj/new-notify
ignore-tables
:
ignore-tables
:
-
biz_banner_info
-
biz_banner_info
-
biz_computility_information
-
biz_computility_information
...
...
scp_pro.sh
0 → 100644
View file @
48277ba8
mvn clean package
-Dmaven
.test.skip
=
true
echo
"laMOYtX9Fo0qjrfD"
scp /Users/jackey/Documents/code/computing-power-platform/computing-power-platform-server-new/computility-server/target/computility-server.jar root@8.136.9.68:/data/computility
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