Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
37004aec
提交
37004aec
authored
6月 19, 2024
作者:
胡宁宁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加司机保证金冻结支付接口 修改流水号
上级
afc29cf3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
41 行增加
和
0 行删除
+41
-0
PayNotifyController.java
...x/performance/controller/payment/PayNotifyController.java
+28
-0
PaymentService.java
...main/java/com/clx/performance/service/PaymentService.java
+1
-0
PaymentServiceImpl.java
.../com/clx/performance/service/impl/PaymentServiceImpl.java
+12
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/payment/PayNotifyController.java
浏览文件 @
37004aec
...
...
@@ -99,6 +99,7 @@ public class PayNotifyController {
// 支付失败处理
log
.
info
(
"支付失败处理 唯一id {}"
,
notify
.
getOrderNo
());
}
else
{
analysisSuccess
(
notify
.
getData
().
toString
(),
operation
,
paymentItem
);
paymentService
.
updateOrderPaymentSuccess
(
notify
.
getOrderNo
(),
operation
,
paymentItem
);
...
...
@@ -191,4 +192,31 @@ public class PayNotifyController {
Result
<
Object
>
ret
=
new
Result
<>();
return
ret
;
}
private
Integer
analysisSuccess
(
String
result
,
Integer
operation
,
String
paymentItem
){
//36:201706050000015794,37:201706050000015838,38:201706050000015992
Integer
id
=
0
;
if
(
result
.
contains
(
","
)){
String
[]
stringFlag
=
result
.
split
(
","
);
if
(
stringFlag
.
length
>
0
){
//最多四笔,直接循环修改
for
(
int
i
=
0
;
i
<
stringFlag
.
length
;
i
++){
String
[]
ress
=
stringFlag
[
i
].
split
(
"="
);
if
(
ress
.
length
==
2
){
//例如 id=serialNo
paymentService
.
updateOrderPaymentSerialNoSuccess
(
ress
[
0
],
ress
[
1
],
operation
,
paymentItem
);
id
=
Integer
.
valueOf
(
ress
[
0
]);
}
}
}
}
else
{
String
[]
ress
=
result
.
split
(
"="
);
if
(
ress
.
length
==
2
){
//例如 id=serialNo
paymentService
.
updateOrderPaymentSerialNoSuccess
(
ress
[
0
],
ress
[
1
],
operation
,
paymentItem
);
id
=
Integer
.
valueOf
(
ress
[
0
]);
}
}
return
id
;
}
}
performance-web/src/main/java/com/clx/performance/service/PaymentService.java
浏览文件 @
37004aec
...
...
@@ -22,4 +22,5 @@ public interface PaymentService {
void
updateOrderPaymentFail
(
String
orderNo
,
String
msg
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentSuccess
(
String
orderNo
,
Integer
operation
,
String
paymentItem
);
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
);
}
performance-web/src/main/java/com/clx/performance/service/impl/PaymentServiceImpl.java
浏览文件 @
37004aec
...
...
@@ -348,6 +348,18 @@ public class PaymentServiceImpl implements PaymentService {
orderPaymentDao
.
updateEntityByKey
(
orderPaymentOptional
);
}
@Override
public
void
updateOrderPaymentSerialNoSuccess
(
String
orderNo
,
String
serialNo
,
Integer
operation
,
String
paymentItem
)
{
OrderPayment
orderPaymentOptional
=
orderPaymentDao
.
selectByRelationNo
(
orderNo
,
operation
,
paymentItem
).
orNull
();
if
(
null
==
orderPaymentOptional
){
log
.
error
(
"数据不存在 {}, {}"
,
orderNo
);
}
orderPaymentOptional
.
setStatus
(
PaymentStatusEnum
.
SUCCESS
.
getValue
());
orderPaymentOptional
.
setSerialNo
(
serialNo
);
orderPaymentDao
.
updateEntityByKey
(
orderPaymentOptional
);
}
/**
* post请求
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论