Commit 1c9d4c57 by xiaoer.li@freemud.com

fixbug

parent c7104f76
......@@ -238,14 +238,14 @@ public class CheckOrder {
if (!Arrays.asList(1, 2).contains(storeDeliveryInfoDto.getDeliveryCondition())) {
throw new ServiceException(ResponseResult.STORE_DISCONTENT_DELIVERY_CONDITION);
}
if ("1".equals(storeDeliveryInfoDto)) {
if (1 == storeDeliveryInfoDto.getDeliveryCondition()) {
int sum = shoppingCartGoodsDto.getProducts().stream().mapToInt(ShoppingCartGoodsDto.CartGoodsDetailDto::getQty).sum();
if (sum < storeDeliveryInfoDto.getFreeDeliveryCup()) {
throw new ServiceException(ResponseResult.STORE_DISCONTENT_DELIVERY_CUP);
}
}
//订单金额小于起送费提示
else if ("2".equals(storeDeliveryInfoDto) && storeDeliveryInfoDto.getDeliveryLimitAmount() > shoppingCartGoodsDto.getTotalAmount()) {
else if (2 == storeDeliveryInfoDto.getDeliveryCondition() && storeDeliveryInfoDto.getDeliveryLimitAmount() > shoppingCartGoodsDto.getTotalAmount()) {
throw new ServiceException(ResponseResult.STORE_DISCONTENT_DELIVERY_FEE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment