Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
c1ffe879
提交
c1ffe879
authored
9月 01, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改钱包流水bug
上级
64f8c852
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
22 行删除
+24
-22
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+24
-22
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
c1ffe879
...
...
@@ -206,25 +206,16 @@ public class PayWalletServiceImpl implements PayWalletService {
log
.
error
(
"飞手有责取消订单,飞手用户钱包更新失败,飞手用户id是:{},接单方传入参数是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
);
return
ResultBody
.
error
(
"钱包操作错误"
);
}
// PayLogDO flyerPayLogDO = buildPayLogDO(null, flyerWalletFlowVO);
// flyerPayLogDO.setCashAmtPaid(flyerWalletFlowVO.getYxjCashPledge());
// flyerPayLogDO.setSalaryAmtPaid(flyerWalletFlowVO.getSalaryAmount());
// // 插入接单者流水记录表
// payWalletDao.insertPayLogDO(flyerPayLogDO);
// 飞手钱包更新信息
// 发单者钱包更新信息
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
// 断言此处必定不为空
assert
publisherWalletFlowVO
!=
null
;
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
add
(
flyerWalletFlowVO
.
getPercentagePenaltyOfOrder
()));
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
subtract
(
flyerWalletFlowVO
.
getPercentagePenaltyOfOrder
()));
int
publishUpdateCount
=
payWalletDao
.
updatePayWallet
(
publishUpdatePayWallet
);
if
(
publishUpdateCount
>
0
)
{
PayLogDO
publishPayLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
null
);
publishPayLogDO
.
setCashAmtPaid
(
flyerWalletFlowVO
.
getPercentagePenaltyOfOrder
());
publishPayLogDO
.
setOperateUser
(
flyerWalletFlowVO
.
getOperateUserAccountId
());
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
publishPayLogDO
);
paymentOfLiquidatedDamage
(
publisherWalletFlowVO
,
flyerWalletFlowVO
,
1
);
return
ResultBody
.
success
();
}
else
{
log
.
error
(
"飞手有责取消订单,发布者用户钱包更新失败,发布者用户id是:{},发布方传入参数是:{},接单方方违约金是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
,
flyerWalletFlowVO
.
getPercentagePenaltyOfOrder
());
...
...
@@ -341,19 +332,30 @@ public class PayWalletServiceImpl implements PayWalletService {
* @param flag 0:支付接单者 1:支付发布者
*/
private
void
paymentOfLiquidatedDamage
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
FlyerWalletFlowVO
flyerWalletFlowVO
,
Integer
flag
)
{
PayLogDO
flyerPayLogDO
=
new
PayLogDO
();
String
payNo
;
Integer
userAccountId
;
BigDecimal
percentagePenaltyOfOrder
;
if
(
flag
==
0
)
{
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
String
flyerP
ayNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
flyerWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
PayLogDO
flyerPayLogDO
=
new
PayLogDO
();
flyerPayLogDO
.
setPayMethod
(
1300
);
flyerPayLogDO
.
set
PayNo
(
flyerPayNo
);
flyerPayLogDO
.
setUserAccountId
(
flyerWalletFlowVO
.
getUserAccountId
());
flyerPayLogDO
.
setCashAmtPaid
(
new
BigDecimal
((
0
)));
flyerPayLogDO
.
setSalaryAmtPaid
(
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
().
abs
()
);
flyerPayLogDO
.
setOperateUser
(
publisherWalletFlowVO
.
getOperateUserAccountId
()
);
// 插入流水记录表
p
ayWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
p
ayNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
flyerWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
userAccountId
=
flyerWalletFlowVO
.
getUserAccountId
();
percentagePenaltyOfOrder
=
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
(
);
flyerPayLogDO
.
set
OperateUser
(
userAccountId
);
}
else
{
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
payNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
publisherWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
userAccountId
=
publisherWalletFlowVO
.
getUserAccountId
(
);
flyerPayLogDO
.
setOperateUser
(
userAccountId
);
p
ercentagePenaltyOfOrder
=
flyerWalletFlowVO
.
getPercentagePenaltyOfOrder
(
);
}
flyerPayLogDO
.
setPayMethod
(
1300
);
flyerPayLogDO
.
setPayNo
(
payNo
);
flyerPayLogDO
.
setUserAccountId
(
userAccountId
);
flyerPayLogDO
.
setCashAmtPaid
(
new
BigDecimal
((
0
)));
flyerPayLogDO
.
setSalaryAmtPaid
(
percentagePenaltyOfOrder
.
abs
());
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
}
private
PayLogDO
buildFlyerLog
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
Integer
userAccountId
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论