下单总入口,打烊店铺限制下单
This commit is contained in:
parent
80ce73a168
commit
f5036d7a39
@ -1049,6 +1049,13 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
throw new ApiException(I18nUtil._("添加购物车失败!"));
|
throw new ApiException(I18nUtil._("添加购物车失败!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 店铺Id
|
||||||
|
Integer storeId = Convert.toInt(product_row.get("store_id"));
|
||||||
|
// 判断店铺是否打烊?打烊不能放入购物车
|
||||||
|
if (CheckUtil.isEmpty(storeId) || CommonConstant.Disable2.equals(shopStoreBaseService.getStoreBizState(storeId))) {
|
||||||
|
throw new ApiException(I18nUtil._("店铺打烊中,商品无法加入购物车!"));
|
||||||
|
}
|
||||||
|
|
||||||
Integer cart_type = Convert.toInt(data.get("cart_type"));
|
Integer cart_type = Convert.toInt(data.get("cart_type"));
|
||||||
// 判断是新增还是更新
|
// 判断是新增还是更新
|
||||||
|
|
||||||
@ -1117,7 +1124,7 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cart.setUser_id(user_id);
|
cart.setUser_id(user_id);
|
||||||
cart.setStore_id((Integer) product_row.get("store_id"));
|
cart.setStore_id(storeId);
|
||||||
cart.setChain_id(chain_id);
|
cart.setChain_id(chain_id);
|
||||||
cart.setProduct_id((Long) product_row.get("product_id"));
|
cart.setProduct_id((Long) product_row.get("product_id"));
|
||||||
cart.setItem_id(item_id);
|
cart.setItem_id(item_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user