Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
2e03269b
提交
2e03269b
authored
6月 24, 2024
作者:
胡宁宁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整支付返回唯一属性
上级
56ff7eea
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
10 行删除
+22
-10
PayNotifyController.java
...x/performance/controller/payment/PayNotifyController.java
+2
-6
PaymentService.java
...main/java/com/clx/performance/service/PaymentService.java
+3
-0
PaymentServiceImpl.java
.../com/clx/performance/service/impl/PaymentServiceImpl.java
+17
-4
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/payment/PayNotifyController.java
浏览文件 @
2e03269b
...
@@ -92,16 +92,12 @@ public class PayNotifyController {
...
@@ -92,16 +92,12 @@ public class PayNotifyController {
String
paymentItem
=
PayUnitTypeEnum
.
FREEZE_PLATFORM_FEE
.
getCode
()+
""
;
String
paymentItem
=
PayUnitTypeEnum
.
FREEZE_PLATFORM_FEE
.
getCode
()+
""
;
int
operation
=
PayOperationStatusEnum
.
FREEZE
.
getValue
();
int
operation
=
PayOperationStatusEnum
.
FREEZE
.
getValue
();
if
(
notify
.
getCode
()
!=
0
)
{
if
(
notify
.
getCode
()
!=
0
)
{
paymentService
.
updateOrderPaymentFail
(
notify
.
getOrderNo
(),
notify
.
getMsg
(),
paymentService
.
updateOrderPaymentStatusById
(
notify
.
getOrderNo
(),
PaymentStatusEnum
.
FAIL
.
getValue
());
operation
,
paymentItem
);
// 支付失败处理
// 支付失败处理
log
.
info
(
"支付失败处理 唯一id {}"
,
notify
.
getOrderNo
());
log
.
info
(
"支付失败处理 唯一id {}"
,
notify
.
getOrderNo
());
}
else
{
}
else
{
analysisSuccess
(
notify
.
getData
().
toString
(),
operation
,
paymentItem
);
analysisSuccess
(
notify
.
getData
().
toString
(),
operation
,
paymentItem
);
paymentService
.
updateOrderPaymentSuccess
(
notify
.
getOrderNo
(),
operation
,
paymentService
.
updateOrderPaymentStatusById
(
notify
.
getOrderNo
(),
PaymentStatusEnum
.
SUCCESS
.
getValue
());
paymentItem
);
// 支付支付成功处理
// 支付支付成功处理
log
.
info
(
" 支付支付成功处理 唯一id {}"
,
notify
.
getOrderNo
());
log
.
info
(
" 支付支付成功处理 唯一id {}"
,
notify
.
getOrderNo
());
...
...
performance-web/src/main/java/com/clx/performance/service/PaymentService.java
浏览文件 @
2e03269b
...
@@ -23,6 +23,9 @@ public interface PaymentService {
...
@@ -23,6 +23,9 @@ public interface PaymentService {
void
updateOrderPaymentFail
(
String
orderNo
,
String
msg
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentFail
(
String
orderNo
,
String
msg
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentSuccess
(
String
orderNo
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentSuccess
(
String
orderNo
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentStatusById
(
String
id
,
int
status
);
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
);
WalletResidueDTO
getWalletAndCard
(
Integer
userCode
);
WalletResidueDTO
getWalletAndCard
(
Integer
userCode
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/PaymentServiceImpl.java
浏览文件 @
2e03269b
...
@@ -192,7 +192,7 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -192,7 +192,7 @@ public class PaymentServiceImpl implements PaymentService {
OrderPayment
orderPayment
=
new
OrderPayment
()
OrderPayment
orderPayment
=
new
OrderPayment
()
.
setAmount
(
payDTO
.
getFigure
())
.
setAmount
(
payDTO
.
getFigure
())
.
setOrderNo
(
payDTO
.
getTradeNo
())
.
setOrderNo
(
payDTO
.
getTradeNo
())
.
setRelationNo
(
pay
OrderNoGenerate
())
.
setRelationNo
(
pay
DTO
.
getTradeNo
())
.
setPaymentItem
(
PayUnitTypeEnum
.
FREEZE_PLATFORM_FEE
.
getCode
()
+
""
)
.
setPaymentItem
(
PayUnitTypeEnum
.
FREEZE_PLATFORM_FEE
.
getCode
()
+
""
)
.
setStatus
(
PaymentStatusEnum
.
CREATE
.
getValue
())
.
setStatus
(
PaymentStatusEnum
.
CREATE
.
getValue
())
.
setOperation
(
PayOperationStatusEnum
.
FREEZE
.
getValue
());
.
setOperation
(
PayOperationStatusEnum
.
FREEZE
.
getValue
());
...
@@ -243,7 +243,7 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -243,7 +243,7 @@ public class PaymentServiceImpl implements PaymentService {
saveOrderPayment
(
orderPayment
);
saveOrderPayment
(
orderPayment
);
/** 调整冻结记录 **/
/** 调整冻结记录 **/
FreezeBatchDTO
freezeBatchDTO
=
buildChangeFreezeBatchDTO
(
orderPaymentOptional
,
orderPayment
.
get
RelationNo
()
,
param
.
getFigure
());
FreezeBatchDTO
freezeBatchDTO
=
buildChangeFreezeBatchDTO
(
orderPaymentOptional
,
orderPayment
.
get
Id
()
,
param
.
getFigure
());
log
.
info
(
"发起支付请求日志 {}"
,
freezeBatchDTO
);
log
.
info
(
"发起支付请求日志 {}"
,
freezeBatchDTO
);
Result
<
Object
>
notify
=
(
Result
<
Object
>)
postRequest
(
mslPaymentConfig
.
getHost
()
+
Result
<
Object
>
notify
=
(
Result
<
Object
>)
postRequest
(
mslPaymentConfig
.
getHost
()
+
...
@@ -391,6 +391,19 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -391,6 +391,19 @@ public class PaymentServiceImpl implements PaymentService {
orderPaymentDao
.
updateEntityByKey
(
orderPaymentOptional
);
orderPaymentDao
.
updateEntityByKey
(
orderPaymentOptional
);
}
}
@Override
public
void
updateOrderPaymentStatusById
(
String
id
,
Integer
status
)
{
//查询冻结记录
OrderPayment
orderPaymentOptional
=
orderPaymentDao
.
getEntityByKey
(
Integer
.
valueOf
(
id
)).
orNull
();
if
(
null
==
orderPaymentOptional
){
log
.
error
(
"数据不存在 {}, {}"
,
id
);
}
orderPaymentOptional
.
setStatus
(
status
);
orderPaymentDao
.
updateEntityByKey
(
orderPaymentOptional
);
}
@Override
@Override
public
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
)
{
public
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
)
{
OrderPayment
orderPaymentOptional
=
OrderPayment
orderPaymentOptional
=
...
@@ -492,7 +505,7 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -492,7 +505,7 @@ public class PaymentServiceImpl implements PaymentService {
/**
/**
* 构建 司机平台服务费冻结实体
* 构建 司机平台服务费冻结实体
*/
*/
public
FreezeBatchDTO
buildChangeFreezeBatchDTO
(
OrderPayment
orderPaymentOptional
,
String
orderNo
,
Integer
figure
){
public
FreezeBatchDTO
buildChangeFreezeBatchDTO
(
OrderPayment
orderPaymentOptional
,
Integer
orderNo
,
Integer
figure
){
FreezeBatchDTO
freezeBatchDTO
=
new
FreezeBatchDTO
();
FreezeBatchDTO
freezeBatchDTO
=
new
FreezeBatchDTO
();
List
<
FreezeUnitDTO
>
FreezeUnitList
=
new
ArrayList
<
FreezeUnitDTO
>();
List
<
FreezeUnitDTO
>
FreezeUnitList
=
new
ArrayList
<
FreezeUnitDTO
>();
FreezeUnitDTO
freightPayUnitDTO
=
new
FreezeUnitDTO
();
FreezeUnitDTO
freightPayUnitDTO
=
new
FreezeUnitDTO
();
...
@@ -508,7 +521,7 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -508,7 +521,7 @@ public class PaymentServiceImpl implements PaymentService {
FreezeUnitList
.
add
(
freightPayUnitDTO
);
FreezeUnitList
.
add
(
freightPayUnitDTO
);
freezeBatchDTO
.
setFreezeUnitList
(
FreezeUnitList
);
freezeBatchDTO
.
setFreezeUnitList
(
FreezeUnitList
);
freezeBatchDTO
.
setOrderNo
(
orderNo
);
freezeBatchDTO
.
setOrderNo
(
orderNo
+
""
);
freezeBatchDTO
.
setSystem
(
SystemCodeEnum
.
PERFORMANCE_SERVICE
.
getCode
());
freezeBatchDTO
.
setSystem
(
SystemCodeEnum
.
PERFORMANCE_SERVICE
.
getCode
());
//回调地址
//回调地址
freezeBatchDTO
.
setNotifyUrl
(
mslPaymentConfig
.
getNotifyhost
()
+
NOTIFY_ADJUST_PLATFORM_FEE_URL
);
freezeBatchDTO
.
setNotifyUrl
(
mslPaymentConfig
.
getNotifyhost
()
+
NOTIFY_ADJUST_PLATFORM_FEE_URL
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论