Browse Source

Merge remote-tracking branch 'remotes/origin/developer' into developerC

Aslee 3 years ago
parent
commit
4362a2f0e2

+ 1 - 0
src/main/java/com/caimei/modules/coupon/service/CmCouponService.java

@@ -244,6 +244,7 @@ public class CmCouponService extends CrudService<CmCouponDao, CmCoupon> {
 
     @Transactional(readOnly = false)
     public void redemptionCodeCouponSave(CmCoupon cmCoupon) {
+        cmCoupon.setReceiveFlag(1);
         cmCoupon.setCouponsMode("1");
         save(cmCoupon);
         if (cmCoupon.getCodeNum() != null && cmCoupon.getCodeNum() > 0) {

+ 2 - 2
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -152,9 +152,9 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
                             roi.setRefundsAmount(0d);
                         }
                         //查询收款供应商退款金额
-                        BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
+                        /*BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
                         BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
-                        roi.setRefundsAmount(refundsAmount.doubleValue());
+                        roi.setRefundsAmount(refundsAmount.doubleValue());*/
                     }
                 }
             }

+ 3 - 3
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -171,7 +171,7 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                 BigDecimal refundsAmount = MathUtil.add(so.getRefundsAmount(), shopRefundAmount);
                 so.setRefundsAmount(refundsAmount.doubleValue());*/
                 // 实际已付金额=已付金额-已退金额
-                BigDecimal payAmount = MathUtil.sub(so.getPayedShopAmount(), so.getRefundAmount());
+                BigDecimal payAmount = MathUtil.sub(so.getPayedShopAmount(), so.getRefundsAmount());
                 refundAmount = MathUtil.add(refundAmount, payAmount).doubleValue();
                 List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
                 /*
@@ -299,8 +299,8 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                 shopOrder.setRefundsAmount(0d);
             }
             //查询收款供应商退款金额
-            BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(shopOrder.getShopOrderID());
-            BigDecimal refundsAmount = MathUtil.add(shopOrder.getRefundsAmount(), shopRefundAmount);
+            //BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(shopOrder.getShopOrderID());
+            Double refundsAmount = shopOrder.getRefundsAmount();
             // 已付 - (已退+本次退款)
             BigDecimal tempFee = MathUtil.sub(shopOrder.getPayedShopAmount(), MathUtil.add(refundsAmount, refundAmount));
             if (MathUtil.compare(tempFee, 0) < 0) {

+ 2 - 2
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -343,9 +343,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 so.setRefundsAmount(0d);
             }
             //查询收款供应商退款金额
-            BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(so.getShopOrderID());
+            /*BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(so.getShopOrderID());
             BigDecimal refundsAmount = MathUtil.add(so.getRefundsAmount(), shopRefundAmount);
-            so.setRefundsAmount(refundsAmount.doubleValue());
+            so.setRefundsAmount(refundsAmount.doubleValue());*/
         }
         return page;
     }