提交 39338d74 作者: xiaowang

流水记录

上级 f8fb394c
...@@ -217,10 +217,29 @@ public class PayWalletServiceImpl implements PayWalletService { ...@@ -217,10 +217,29 @@ public class PayWalletServiceImpl implements PayWalletService {
assert publisherWalletFlowVO != null; assert publisherWalletFlowVO != null;
publishUpdatePayWallet.setUserAccountId(publisherWalletFlowVO.getUserAccountId()); publishUpdatePayWallet.setUserAccountId(publisherWalletFlowVO.getUserAccountId());
publishUpdatePayWallet.setPid(publishWallet.getPid()); publishUpdatePayWallet.setPid(publishWallet.getPid());
publishUpdatePayWallet.setSalaryAmt(publishWallet.getSalaryAmt().subtract(flyerWalletFlowVO.getPercentagePenaltyOfOrder())); publishUpdatePayWallet.setCashAmt(publishWallet.getCashAmt().add(publisherWalletFlowVO.getCashAmount())
.add(publisherWalletFlowVO.getTopYxjAmount()).add(publisherWalletFlowVO.getTopYxjAmount()));
publishUpdatePayWallet.setSalaryAmt(publishWallet.getSalaryAmt().add(publisherWalletFlowVO.getSalaryAmount())
.subtract(flyerWalletFlowVO.getPercentagePenaltyOfOrder()));
publishUpdatePayWallet.setCashFreeze(publishWallet.getCashFreeze().subtract(publisherWalletFlowVO.getCashAmount())
.subtract(publisherWalletFlowVO.getUrgentYxjAmount()).subtract(publisherWalletFlowVO.getTopYxjAmount()));
publishUpdatePayWallet.setSalaryFreeze(publishWallet.getSalaryFreeze().subtract(publisherWalletFlowVO.getSalaryAmount())
.subtract(publisherWalletFlowVO.getUrgentSalaryAmount()).subtract(publisherWalletFlowVO.getTopSalaryAmount()));
int publishUpdateCount = payWalletDao.updatePayWallet(publishUpdatePayWallet); int publishUpdateCount = payWalletDao.updatePayWallet(publishUpdatePayWallet);
if (publishUpdateCount > 0) { if (publishUpdateCount > 0) {
// 记录飞手违约金流水
paymentOfLiquidatedDamage(publisherWalletFlowVO, flyerWalletFlowVO, 1); paymentOfLiquidatedDamage(publisherWalletFlowVO, flyerWalletFlowVO, 1);
if (publisherWalletFlowVO.getCashAmount().compareTo(BigDecimal.ZERO) > 0
|| publisherWalletFlowVO.getUrgentYxjAmount().compareTo(BigDecimal.ZERO) > 0
|| publisherWalletFlowVO.getTopYxjAmount().compareTo(BigDecimal.ZERO) > 0
|| publisherWalletFlowVO.getSalaryAmount().compareTo(BigDecimal.ZERO) > 0
|| publisherWalletFlowVO.getUrgentSalaryAmount().compareTo(BigDecimal.ZERO) > 0
|| publisherWalletFlowVO.getTopSalaryAmount().compareTo(BigDecimal.ZERO) > 0) {
// 记录退回订单金额
sendBackPublishPayLog(publisherWalletFlowVO);
}
return ResultBody.success(); return ResultBody.success();
} else { } else {
log.error("飞手有责取消订单,发布者用户钱包更新失败,发布者用户id是:{},发布方传入参数是:{},接单方方违约金是:{}", publisherWalletFlowVO.getUserAccountId(), publisherWalletFlowVO, flyerWalletFlowVO.getPercentagePenaltyOfOrder()); log.error("飞手有责取消订单,发布者用户钱包更新失败,发布者用户id是:{},发布方传入参数是:{},接单方方违约金是:{}", publisherWalletFlowVO.getUserAccountId(), publisherWalletFlowVO, flyerWalletFlowVO.getPercentagePenaltyOfOrder());
...@@ -331,6 +350,19 @@ public class PayWalletServiceImpl implements PayWalletService { ...@@ -331,6 +350,19 @@ public class PayWalletServiceImpl implements PayWalletService {
return ResultBody.error("钱包操作错误"); return ResultBody.error("钱包操作错误");
} }
private void sendBackPublishPayLog(PublisherWalletFlowVO publisherWalletFlowVO) {
PayLogDO payLogDO = new PayLogDO();
String payNo = "T" + TDateUtil.getDateStr(new Date(), TDateUtil.TYPE) + publisherWalletFlowVO.getUserAccountId() + CodeUtil.getRandomNum(4);
payLogDO.setPayMethod(200);
payLogDO.setPayNo(payNo);
payLogDO.setUserAccountId(publisherWalletFlowVO.getUserAccountId());
payLogDO.setCashAmtPaid(publisherWalletFlowVO.getCashAmount().add(publisherWalletFlowVO.getTopYxjAmount()).add(publisherWalletFlowVO.getUrgentYxjAmount()));
payLogDO.setSalaryAmtPaid(publisherWalletFlowVO.getSalaryAmount().add(publisherWalletFlowVO.getTopSalaryAmount()).add(publisherWalletFlowVO.getUrgentSalaryAmount()));
payLogDO.setOperateUser(publisherWalletFlowVO.getUserAccountId());
// 插入流水记录表
payWalletDao.insertPayLogDO(payLogDO);
}
/** /**
* @param publisherWalletFlowVO 发布者信息 * @param publisherWalletFlowVO 发布者信息
* @param flyerWalletFlowVO 接单者信息 * @param flyerWalletFlowVO 接单者信息
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论