|
|
@@ -96,7 +96,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
|
|
|
|
|
|
/**
|
|
|
* 校验数据
|
|
|
- * @param Rec
|
|
|
+ * @param rec
|
|
|
*/
|
|
|
private void checkRecbalance(Rec rec){
|
|
|
Recbalance recbalance = rec.getMain();
|
|
|
@@ -147,7 +147,13 @@ public class RecbalanceServiceImpl implements RecbalanceService {
|
|
|
//更新本次预付款金额
|
|
|
Recbalance updatePay = new Recbalance();
|
|
|
updatePay.setId(recbalance.getId());
|
|
|
- updatePay.setRb_preamount(amountTotal+recbalance.getRb_discounts()-nowbalanceTotal);
|
|
|
+
|
|
|
+ //折扣
|
|
|
+ Double discount = recbalance.getRb_discounts();
|
|
|
+ if (discount == null){
|
|
|
+ discount = 0.0;
|
|
|
+ }
|
|
|
+ updatePay.setRb_preamount(amountTotal + discount - nowbalanceTotal);
|
|
|
recbalanceMapper.updateByPrimaryKeySelective(updatePay);
|
|
|
}
|
|
|
|