|
@@ -654,14 +654,26 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
}
|
|
|
orderCloth.setOrderClothPrice(totalPrice);
|
|
|
|
|
|
- //上门收衣
|
|
|
+ BigDecimal totalDeliveryAmount = BigDecimal.ZERO;
|
|
|
+ // 上门收衣-计算收衣配送费
|
|
|
if (orderCloth.getTakeClothWay().equals(TakeOrSendClothWay.DELIVERY.getCode())) {
|
|
|
if (freeDeliveryNum > 0) {
|
|
|
freeDeliveryNum--;
|
|
|
} else {
|
|
|
+ totalDeliveryAmount.add(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode())));
|
|
|
totalPrice.add(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode())));
|
|
|
}
|
|
|
}
|
|
|
+ // 上门取衣(配送上门)-计算取衣配送费
|
|
|
+ if (orderCloth.getSendClothWay().equals(TakeOrSendClothWay.DELIVERY.getCode())) {
|
|
|
+ if (freeDeliveryNum > 0) {
|
|
|
+ freeDeliveryNum--;
|
|
|
+ } else {
|
|
|
+ totalDeliveryAmount.add(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode())));
|
|
|
+ totalPrice.add(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode())));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ orderCloth.setDeliveryAmount(totalDeliveryAmount);
|
|
|
orderCloth.setOrderAmount(totalPrice);
|
|
|
orderCloth.setPayAmount(orderCloth.getOrderAmount());
|
|
|
}
|
|
@@ -903,6 +915,8 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
}
|
|
|
orderCloth.setPayTimeType(orderClothDTO.getPayTimeType());
|
|
|
orderCloth.setPayStatus(PayStatus.WAITING_TO_PAY.getCode());
|
|
|
+ // 取衣方式
|
|
|
+ orderCloth.setSendClothWay(orderClothDTO.getSendClothWay());
|
|
|
}
|
|
|
|
|
|
/**
|