Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
b7e76afb
提交
b7e76afb
authored
8月 31, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改钱包流水bug
上级
3c31fce2
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
28 行增加
和
18 行删除
+28
-18
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+28
-18
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
b7e76afb
...
@@ -130,12 +130,6 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -130,12 +130,6 @@ public class PayWalletServiceImpl implements PayWalletService {
}
}
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
RECEIVED_ORDER_CANCEL
.
getCode
()))
{
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
RECEIVED_ORDER_CANCEL
.
getCode
()))
{
// 等于300时 发布方取消订单,有飞手接单
// 等于300时 发布方取消订单,有飞手接单
if
(
publisherWalletFlowVO
.
getYxjCashPledge
()
==
null
)
{
publisherWalletFlowVO
.
setYxjCashPledge
(
BigDecimal
.
ZERO
);
}
if
(
publisherWalletFlowVO
.
getSalaryCashPledge
()
==
null
)
{
publisherWalletFlowVO
.
setSalaryCashPledge
(
BigDecimal
.
ZERO
);
}
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
...
@@ -158,14 +152,15 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -158,14 +152,15 @@ public class PayWalletServiceImpl implements PayWalletService {
assert
flyerWalletFlowVO
!=
null
;
assert
flyerWalletFlowVO
!=
null
;
flyerUpdatePayWallet
.
setUserAccountId
(
flyerWalletFlowVO
.
getUserAccountId
());
flyerUpdatePayWallet
.
setUserAccountId
(
flyerWalletFlowVO
.
getUserAccountId
());
flyerUpdatePayWallet
.
setPid
(
flyerWallet
.
getPid
());
flyerUpdatePayWallet
.
setPid
(
flyerWallet
.
getPid
());
flyerUpdatePayWallet
.
setSalaryAmt
(
flyerWallet
.
getSalaryAmt
().
add
(
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
()));
flyerUpdatePayWallet
.
setCashAmt
(
flyerWallet
.
getCashAmt
().
add
(
flyerWalletFlowVO
.
getCashAmount
()));
flyerUpdatePayWallet
.
setCashFreeze
(
flyerWallet
.
getCashFreeze
().
subtract
(
flyerWalletFlowVO
.
getCashAmount
()));
flyerUpdatePayWallet
.
setSalaryAmt
(
flyerWallet
.
getSalaryAmt
().
add
(
flyerWalletFlowVO
.
getSalaryAmount
()).
subtract
(
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
()));
int
flyerUpdateCount
=
payWalletDao
.
updatePayWallet
(
flyerUpdatePayWallet
);
int
flyerUpdateCount
=
payWalletDao
.
updatePayWallet
(
flyerUpdatePayWallet
);
if
(
flyerUpdateCount
>
0
)
{
if
(
flyerUpdateCount
>
0
)
{
PayLogDO
flyerPayLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
flyerWalletFlowVO
);
// 记录订单保证金退回记录
flyerPayLogDO
.
setCashAmtPaid
(
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
());
sendBackPledge
(
flyerWalletFlowVO
);
flyerPayLogDO
.
setOperateUser
(
publisherWalletFlowVO
.
getOperateUserAccountId
());
// 获得违约金流水记录
// 插入流水记录表
paymentOfLiquidatedDamage
(
publisherWalletFlowVO
,
flyerWalletFlowVO
,
0
);
payWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
else
{
}
else
{
log
.
error
(
"发布方取消订单,有飞手接单时,飞手用户钱包更新失败,飞手用户id是:{},接单方传入参数是:{},发单方违约金是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
,
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
());
log
.
error
(
"发布方取消订单,有飞手接单时,飞手用户钱包更新失败,飞手用户id是:{},接单方传入参数是:{},发单方违约金是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
,
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
());
...
@@ -336,6 +331,27 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -336,6 +331,27 @@ public class PayWalletServiceImpl implements PayWalletService {
return
ResultBody
.
error
(
"钱包操作错误"
);
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
/**
* @param publisherWalletFlowVO 发布者信息
* @param flyerWalletFlowVO 接单者信息
* @param flag 0:支付接单者 1:支付发布者
*/
private
void
paymentOfLiquidatedDamage
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
FlyerWalletFlowVO
flyerWalletFlowVO
,
Integer
flag
)
{
if
(
flag
==
0
)
{
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
String
flyerPayNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
flyerWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
PayLogDO
flyerPayLogDO
=
new
PayLogDO
();
flyerPayLogDO
.
setPayMethod
(
1300
);
flyerPayLogDO
.
setPayNo
(
flyerPayNo
);
flyerPayLogDO
.
setUserAccountId
(
flyerWalletFlowVO
.
getUserAccountId
());
flyerPayLogDO
.
setCashAmtPaid
(
flyerWalletFlowVO
.
getCashAmount
());
flyerPayLogDO
.
setSalaryAmtPaid
(
publisherWalletFlowVO
.
getPercentagePenaltyOfOrder
().
abs
());
flyerPayLogDO
.
setOperateUser
(
publisherWalletFlowVO
.
getOperateUserAccountId
());
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
}
}
private
PayLogDO
buildFlyerLog
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
Integer
userAccountId
)
{
private
PayLogDO
buildFlyerLog
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
Integer
userAccountId
)
{
PayLogDO
payLogWalletDO
=
new
PayLogDO
();
PayLogDO
payLogWalletDO
=
new
PayLogDO
();
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
...
@@ -418,12 +434,6 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -418,12 +434,6 @@ public class PayWalletServiceImpl implements PayWalletService {
PayLogDO
payLogWalletDO
=
new
PayLogDO
();
PayLogDO
payLogWalletDO
=
new
PayLogDO
();
// 获取用户钱包信息
// 获取用户钱包信息
if
(
publisherWalletFlowVO
!=
null
)
{
if
(
publisherWalletFlowVO
!=
null
)
{
if
(
publisherWalletFlowVO
.
getCashAmount
()
==
null
)
{
publisherWalletFlowVO
.
setCashAmount
(
BigDecimal
.
ZERO
);
}
if
(
publisherWalletFlowVO
.
getSalaryAmount
()
==
null
)
{
publisherWalletFlowVO
.
setSalaryAmount
(
BigDecimal
.
ZERO
);
}
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
// 生成支付流水号(规则"T" + 时间戳 + 用户id + 随机数4位)
String
publishPayNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
publisherWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
String
publishPayNo
=
"T"
+
TDateUtil
.
getDateStr
(
new
Date
(),
TDateUtil
.
TYPE
)
+
publisherWalletFlowVO
.
getUserAccountId
()
+
CodeUtil
.
getRandomNum
(
4
);
payLogWalletDO
.
setPayMethod
(
publisherWalletFlowVO
.
getModeOfPayment
());
payLogWalletDO
.
setPayMethod
(
publisherWalletFlowVO
.
getModeOfPayment
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论