提交 162720bb 作者: 张小凤

RequirementsServiceImpl(update)

上级 02102d2a
......@@ -1328,7 +1328,7 @@ public class RequirementsServiceImpl implements RequirementsService {
PublisherWalletFlowVO publisherWalletFlowVO = new PublisherWalletFlowVO();
IsNullConvertZeroUtil.checkIsNull(publisherWalletFlowVO);
ApplyRefundVO applyRefundVO = new ApplyRefundVO();
IsNullConvertZeroUtil.checkIsNull(requirementsInfoDO);
RequirementsInfoDO infoDO = new RequirementsInfoDO(requirementsEditVO);
if (requirementsInfoDO == null) {
......@@ -1361,6 +1361,11 @@ public class RequirementsServiceImpl implements RequirementsService {
applyRefund(applyRefundVO, request.getHeader("token"));
}
WalletFlowVO wo = new WalletFlowVO();
PublisherWalletFlowVO pwf = new PublisherWalletFlowVO();
IsNullConvertZeroUtil.checkIsNull(pwf);
//用户钱包信息接口
ResultBody resultBody = getCurrentUserPayWalletInfo(request);
GetOrderNumberDTO orderNumberDTO = new GetOrderNumberDTO();
......@@ -1387,6 +1392,7 @@ public class RequirementsServiceImpl implements RequirementsService {
}
}
tempTotalAmount = orderAmount;
for (String type : objects) {
switch (type) {
......@@ -1395,10 +1401,12 @@ public class RequirementsServiceImpl implements RequirementsService {
if (cashAmt.compareTo(tempTotalAmount) == 1 || cashAmt.compareTo(tempTotalAmount) == 0) {
amountDO.setCashAmount(tempTotalAmount);
// walletFlowVO.setCashAmount(tempTotalAmount);
pwf.setCashAmount(tempTotalAmount);
tempTotalAmount = BigDecimal.ZERO;
} else {
tempTotalAmount = tempTotalAmount.subtract(cashAmt);
amountDO.setCashAmount(cashAmt);
pwf.setCashAmount(cashAmt);
// walletFlowVO.setCashAmount(cashAmt);
}
}
......@@ -1407,10 +1415,12 @@ public class RequirementsServiceImpl implements RequirementsService {
if (!(tempTotalAmount.compareTo(BigDecimal.ZERO) == 0)) {
if (salaryAmt.compareTo(tempTotalAmount) == 1 || salaryAmt.compareTo(tempTotalAmount) == 0) {
amountDO.setSalaryAmount(tempTotalAmount);
pwf.setSalaryAmount(tempTotalAmount);
tempTotalAmount = BigDecimal.ZERO;
} else {
tempTotalAmount = tempTotalAmount.subtract(salaryAmt);
amountDO.setSalaryAmount(salaryAmt);
pwf.setSalaryAmount(salaryAmt);
}
}
......@@ -1435,6 +1445,18 @@ public class RequirementsServiceImpl implements RequirementsService {
amountDO.setTotalAmount(add);
BigDecimal totalAmount = amountDO.getTotalAmount();
requirementsDao.updateAmount(amountDO);
if (pwf.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
pwf.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
pwf.setUserAccountId(requirementsEditVO.getUserAccountId());
pwf.setOperateUserAccountId(requirementsEditVO.getUserAccountId());
pwf.setModeOfPayment(100);
pwf.setCashAmount(pwf.getCashAmount().negate());
pwf.setSalaryAmount(pwf.getSalaryAmount().negate());
wo.setPublisherWalletFlowVO(pwf);
flyerCancel(wo, request.getHeader("token"));
}
return ResultBody.success();
} else {
//云享金和佣金扣除完成,但是还不足支付订单金额,并且没有选择微信支付,所以支付不合法
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论