|
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.yami.shop.bean.app.dto.ShopCartItemDto;
|
|
|
import com.yami.shop.bean.app.dto.ShopCartOrderDto;
|
|
|
import com.yami.shop.bean.app.param.OrderParam;
|
|
|
+import com.yami.shop.bean.enums.DvyType;
|
|
|
import com.yami.shop.bean.event.ConfirmOrderEvent;
|
|
|
import com.yami.shop.bean.model.FreightFeeReduction;
|
|
|
import com.yami.shop.bean.model.Product;
|
|
@@ -104,11 +105,10 @@ public class ConfirmOrderListener {
|
|
|
shopCartItem.setActualTotal(shopCartItem.getProductTotalAmount());
|
|
|
shopCartOrderDto.setTotalWeight(Arith.add(shopCartOrderDto.getTotalWeight(), Arith.mul(shopCartItem.getWeight(), shopCartItem.getProdCount())));
|
|
|
}
|
|
|
-//TODO wangjian
|
|
|
-// if (userAddr != null && !Objects.equals(orderParam.getDvyType(), DvyType.FETCH.value())) {
|
|
|
-// // 将所有订单传入处理,计算运费
|
|
|
-// transfee = transportManagerService.calculateTransfeeSecond2(shopCartItems.get(0).getShopId(), userAddr);
|
|
|
-// }
|
|
|
+ if (userAddr != null && !Objects.equals(orderParam.getDvyType(), DvyType.FETCH.value())) {
|
|
|
+ // 将所有订单传入处理,计算运费
|
|
|
+ transfee = transportManagerService.calculateTransfeeSecond2(shopCartItems.get(0).getShopId(), userAddr);
|
|
|
+ }
|
|
|
|
|
|
Double freeTransfee = 0.0;
|
|
|
List<FreightFeeReduction> feeReductions = freightFeeReductionService.list(new LambdaQueryWrapper<FreightFeeReduction>()
|