|
@@ -562,8 +562,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
if (3 == cmPayShop.getPaymentType()) {
|
|
if (3 == cmPayShop.getPaymentType()) {
|
|
//已付第三方金额
|
|
//已付第三方金额
|
|
BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
|
|
BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
|
|
- BigDecimal totalFee = MathUtil.add(shopOtherFee, cmPayShop.getTotalAmount());
|
|
|
|
- newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
|
|
|
|
|
|
+ newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
|
|
} else if (2 == cmPayShop.getPaymentType()) {
|
|
} else if (2 == cmPayShop.getPaymentType()) {
|
|
NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
|
|
NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
|
|
BigDecimal differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
|
|
BigDecimal differencePrice = MathUtil.add(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
|
|
@@ -625,14 +624,6 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
cmPayShopDao.update(maxIdpayShop);
|
|
cmPayShopDao.update(maxIdpayShop);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (cmPayShop.getPaymentType() == 2) {
|
|
|
|
- //供应商差价付款
|
|
|
|
- NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderID);
|
|
|
|
- if (shopOrder != null) {
|
|
|
|
- BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
|
|
|
|
- newShopOrderDao.updateByDifferencePrice(1, differencePrice, shopOrderID);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
cmPayShop.setDelFlag("1");
|
|
cmPayShop.setDelFlag("1");
|
|
newShopOrderDao.outPaying(cmPayShop.getId());
|
|
newShopOrderDao.outPaying(cmPayShop.getId());
|
|
@@ -733,8 +724,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
if (3 == cmPayShop.getPaymentType()) {
|
|
if (3 == cmPayShop.getPaymentType()) {
|
|
//撤回付第三方
|
|
//撤回付第三方
|
|
BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
|
|
BigDecimal shopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(shopOrderId);
|
|
- BigDecimal totalFee = MathUtil.sub(shopOtherFee, cmPayShop.getTotalAmount());
|
|
|
|
- newShopOrderDao.updateByShopOtherFee(totalFee, shopOrderId);
|
|
|
|
|
|
+ newShopOrderDao.updateByShopOtherFee(shopOtherFee, shopOrderId);
|
|
} else if (2 == cmPayShop.getPaymentType()) {
|
|
} else if (2 == cmPayShop.getPaymentType()) {
|
|
NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
|
|
NewShopOrder shopOrder = newShopOrderDao.get(shopOrderId.toString());
|
|
BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
|
|
BigDecimal differencePrice = MathUtil.sub(shopOrder.getDifferencePrice(), cmPayShop.getTotalAmount());
|
|
@@ -1009,7 +999,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
}
|
|
}
|
|
payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
|
|
payShopDifference.setModifyUserId(Integer.parseInt(UserUtils.getUser().getId()));
|
|
cmPayShopRecordDao.insertDifference(payShopDifference);
|
|
cmPayShopRecordDao.insertDifference(payShopDifference);
|
|
- if (!"3".equals(shopOrder.getPayStatus())) {
|
|
|
|
|
|
+ if (!("3".equals(shopOrder.getPayStatus()) && 1 == payShopDifference.getType())) {
|
|
newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
|
|
newShopOrderDao.updateByDifferencePrice(payShopDifference.getType(), differencePrice, shopOrderId);
|
|
}
|
|
}
|
|
}
|
|
}
|