|
@@ -1168,10 +1168,11 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|
|
Double paidAmount = payOrderMapper.getOrderProductPaidAmount(orderProduct.getOrderProductId());
|
|
|
if (paidAmount != null && MathUtil.compare(paidAmount, 0) > 0) {
|
|
|
costPrice = MathUtil.sub(costPrice, paidAmount).doubleValue();
|
|
|
+ splitAmount = MathUtil.sub(splitAmount, paidAmount).doubleValue();
|
|
|
}
|
|
|
if (paidAmount == null || MathUtil.compare(paidAmount, costPrice) < 0) {
|
|
|
// 待分账金额>=本次待分账金额
|
|
|
- if (MathUtil.compare(splitAmount, costPrice) > -1) {
|
|
|
+ if (MathUtil.compare(splitAmount, costPrice) > 0) {
|
|
|
splitAmount = MathUtil.sub(splitAmount, costPrice).doubleValue();
|
|
|
} else {
|
|
|
costPrice = splitAmount;
|