| @@ -5,15 +5,17 @@ import lombok.Data; | |||||
| @Data | @Data | ||||
| public class WxComposeChildOrderPrice { | public class WxComposeChildOrderPrice { | ||||
| public WxComposeChildOrderPrice(Integer productSinglePrice,Integer productNumber,Long productId) { | |||||
| public WxComposeChildOrderPrice(Integer productSinglePrice,Integer productNumber,Integer freightPrice, Long productId) { | |||||
| this.productSinglePrice = productSinglePrice; | this.productSinglePrice = productSinglePrice; | ||||
| this.productNumber = productNumber; | this.productNumber = productNumber; | ||||
| this.freightPrice = freightPrice; | |||||
| this.productId = productId; | this.productId = productId; | ||||
| this.realPayMent = productSinglePrice*productNumber; | |||||
| this.realPayMent = productSinglePrice*productNumber+freightPrice; | |||||
| } | } | ||||
| private Integer realPayMent;//真实支付价格 | private Integer realPayMent;//真实支付价格 | ||||
| private Integer productSinglePrice;//产品单价 | private Integer productSinglePrice;//产品单价 | ||||
| private Integer productNumber;//产品数量 | private Integer productNumber;//产品数量 | ||||
| private Integer freightPrice;//运费 | |||||
| private Long productId;//产品编号 | private Long productId;//产品编号 | ||||
| } | } | ||||
| @@ -57,11 +57,12 @@ public class SingleOrderAdapterService implements OrderAdapterService { | |||||
| public WxComposeChildOrderPrice getChildCouponOrderPrice(OrderComposeSaveDto orderdto,WxCoupon coupon, boolean isPress, Long orderGroupId, | public WxComposeChildOrderPrice getChildCouponOrderPrice(OrderComposeSaveDto orderdto,WxCoupon coupon, boolean isPress, Long orderGroupId, | ||||
| Integer couponNumber) { | Integer couponNumber) { | ||||
| Integer perPrice = OrderHelper.getCouponPerPayment(coupon, isPress, orderGroupId); | Integer perPrice = OrderHelper.getCouponPerPayment(coupon, isPress, orderGroupId); | ||||
| Integer freightPrice = 0; | |||||
| //在线配送加上运费 | //在线配送加上运费 | ||||
| if (EnumOrderShopingType.DISTRIBUTION.getCode().equals(orderdto.getShippingType())) { | if (EnumOrderShopingType.DISTRIBUTION.getCode().equals(orderdto.getShippingType())) { | ||||
| perPrice = perPrice + coupon.getFreightPrice(); | |||||
| freightPrice = coupon.getFreightPrice(); | |||||
| } | } | ||||
| return new WxComposeChildOrderPrice(perPrice, couponNumber, coupon.getId()); | |||||
| return new WxComposeChildOrderPrice(perPrice, couponNumber,freightPrice, coupon.getId()); | |||||
| } | } | ||||
| @@ -42,11 +42,12 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| @Override | @Override | ||||
| public WxComposeChildOrderPrice getChildCouponOrderPrice(OrderComposeSaveDto orderdto,WxCoupon coupon,boolean isPress,Long orderGroupId,Integer couponNumber) { | public WxComposeChildOrderPrice getChildCouponOrderPrice(OrderComposeSaveDto orderdto,WxCoupon coupon,boolean isPress,Long orderGroupId,Integer couponNumber) { | ||||
| Integer perPrice = OrderHelper.getCouponPerPayment(coupon, isPress, orderGroupId); | Integer perPrice = OrderHelper.getCouponPerPayment(coupon, isPress, orderGroupId); | ||||
| Integer freightPrice = 0; | |||||
| //在线配送加上运费 | //在线配送加上运费 | ||||
| if (EnumOrderShopingType.DISTRIBUTION.getCode().equals(orderdto.getShippingType())) { | if (EnumOrderShopingType.DISTRIBUTION.getCode().equals(orderdto.getShippingType())) { | ||||
| perPrice = perPrice + coupon.getFreightPrice(); | |||||
| freightPrice = coupon.getFreightPrice(); | |||||
| } | } | ||||
| return new WxComposeChildOrderPrice(perPrice, couponNumber, coupon.getId()); | |||||
| return new WxComposeChildOrderPrice(perPrice, couponNumber, freightPrice, coupon.getId()); | |||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||