Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
5d5101be
提交
5d5101be
authored
9月 09, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
客服介入
上级
3aaab560
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
31 行增加
和
21 行删除
+31
-21
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+31
-21
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
5d5101be
...
@@ -108,25 +108,7 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -108,25 +108,7 @@ public class PayWalletServiceImpl implements PayWalletService {
}
}
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CANCEL_ORDER_TAKING
.
getCode
()))
{
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CANCEL_ORDER_TAKING
.
getCode
()))
{
// 等于200时 发布方取消订单,无飞手接单
// 等于200时 发布方取消订单,无飞手接单
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
return
publishCancelOrder
(
publisherWalletFlowVO
,
publishWallet
,
200
);
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
publishUpdatePayWallet
.
setCashAmt
(
publishWallet
.
getCashAmt
().
add
(
publisherWalletFlowVO
.
getCashAmount
()));
publishUpdatePayWallet
.
setCashFreeze
(
publishWallet
.
getCashFreeze
().
add
(
publisherWalletFlowVO
.
getTopYxjAmount
())
.
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()).
subtract
(
publisherWalletFlowVO
.
getCashAmount
()));
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
add
(
publisherWalletFlowVO
.
getSalaryAmount
()));
publishUpdatePayWallet
.
setSalaryFreeze
(
publishWallet
.
getSalaryFreeze
().
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
())
.
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()).
subtract
(
publisherWalletFlowVO
.
getSalaryAmount
()));
int
i
=
payWalletDao
.
updatePayWallet
(
publishUpdatePayWallet
);
if
((
i
>
0
)
&&
(
publisherWalletFlowVO
.
getCashAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
||
publisherWalletFlowVO
.
getSalaryAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
))
{
PayLogDO
payLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
null
);
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
payLogDO
);
return
ResultBody
.
success
();
}
else
{
log
.
error
(
"发布方取消订单,无飞手接单时,用户id是:{},传入参数是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
);
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
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时 发布方取消订单,有飞手接单
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
...
@@ -183,7 +165,9 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -183,7 +165,9 @@ public class PayWalletServiceImpl implements PayWalletService {
log
.
error
(
"飞手抢单时,飞手用户钱包更新失败,飞手用户id是:{},传入参数是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
);
log
.
error
(
"飞手抢单时,飞手用户钱包更新失败,飞手用户id是:{},传入参数是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
);
}
}
}
else
if
(
flyerWalletFlowVO
!=
null
&&
flyerWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CUSTOMER_SERVICE_CANCEL_ORDER
.
getCode
()))
{
}
else
if
(
flyerWalletFlowVO
!=
null
&&
flyerWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CUSTOMER_SERVICE_CANCEL_ORDER
.
getCode
()))
{
// 状态为500时 客服判定飞手无责取消订单
// 状态为500时 客服判定双方无责取消订单
assert
publisherWalletFlowVO
!=
null
;
publishCancelOrder
(
publisherWalletFlowVO
,
publishWallet
,
500
);
// 飞手钱包更新信息
// 飞手钱包更新信息
int
flyerUpdateCount
=
buildFlyerWallet
(
flyerWalletFlowVO
,
flyerWallet
);
int
flyerUpdateCount
=
buildFlyerWallet
(
flyerWalletFlowVO
,
flyerWallet
);
if
(
flyerUpdateCount
>
0
)
{
if
(
flyerUpdateCount
>
0
)
{
...
@@ -192,7 +176,7 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -192,7 +176,7 @@ public class PayWalletServiceImpl implements PayWalletService {
payWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
payWalletDao
.
insertPayLogDO
(
flyerPayLogDO
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
else
{
}
else
{
log
.
error
(
"客服判定
飞手
无责取消订单时,飞手用户钱包更新失败,飞手用户id是:{},传入参数是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
);
log
.
error
(
"客服判定
双方
无责取消订单时,飞手用户钱包更新失败,飞手用户id是:{},传入参数是:{}"
,
flyerWalletFlowVO
.
getUserAccountId
(),
flyerWalletFlowVO
);
}
}
}
else
if
(
flyerWalletFlowVO
!=
null
&&
flyerWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
FLYER_CANCEL_ORDER
.
getCode
()))
{
}
else
if
(
flyerWalletFlowVO
!=
null
&&
flyerWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
FLYER_CANCEL_ORDER
.
getCode
()))
{
// 状态为600时 飞手有责取消订单
// 状态为600时 飞手有责取消订单
...
@@ -348,6 +332,32 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -348,6 +332,32 @@ public class PayWalletServiceImpl implements PayWalletService {
return
ResultBody
.
error
(
"钱包操作错误"
);
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
private
ResultBody
publishCancelOrder
(
PublisherWalletFlowVO
publisherWalletFlowVO
,
PayWalletDO
publishWallet
,
Integer
status
)
{
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
publishUpdatePayWallet
.
setCashAmt
(
publishWallet
.
getCashAmt
().
add
(
publisherWalletFlowVO
.
getCashAmount
()));
publishUpdatePayWallet
.
setCashFreeze
(
publishWallet
.
getCashFreeze
().
add
(
publisherWalletFlowVO
.
getTopYxjAmount
())
.
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()).
subtract
(
publisherWalletFlowVO
.
getCashAmount
()));
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
add
(
publisherWalletFlowVO
.
getSalaryAmount
()));
publishUpdatePayWallet
.
setSalaryFreeze
(
publishWallet
.
getSalaryFreeze
().
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
())
.
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()).
subtract
(
publisherWalletFlowVO
.
getSalaryAmount
()));
int
i
=
payWalletDao
.
updatePayWallet
(
publishUpdatePayWallet
);
if
((
i
>
0
)
&&
(
publisherWalletFlowVO
.
getCashAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
||
publisherWalletFlowVO
.
getSalaryAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
))
{
PayLogDO
payLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
null
);
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
payLogDO
);
return
ResultBody
.
success
();
}
else
{
if
(
status
==
200
)
{
log
.
error
(
"发布方取消订单,无飞手接单时,用户id是:{},传入参数是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
);
}
else
{
log
.
error
(
"客服判定双方无责取消订单时,发布方钱包更新失败,用户id是:{},传入参数是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
);
}
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
/**
/**
* @param publisherWalletFlowVO
* @param publisherWalletFlowVO
* @param flag 0 未违约取消 1 违约取消
* @param flag 0 未违约取消 1 违约取消
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论