From fa80c2fca3ada00649f9d7146314fd4dc6489b0e Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Tue, 4 Nov 2025 17:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E8=90=A5=E4=B8=9A=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=A2=9E=E5=8A=A0=20=E5=BC=80=E4=B8=9A=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E7=AD=B9=E5=A4=87=E4=B8=AD=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/common/constant/CommonConstant.java | 9 +++++++ .../common/modules/store/ShopStoreBase.java | 2 +- .../impl/ShopProductItemServiceImpl.java | 2 +- .../controller/mobile/StoreController.java | 4 ++-- .../store/service/ShopStoreBaseService.java | 4 ++-- .../impl/ShopStoreBaseServiceImpl.java | 24 ++++++++++--------- .../service/impl/ShopUserCartServiceImpl.java | 12 +++++----- .../src/main/resources/static/diy/js/diy.js | 2 +- 8 files changed, 35 insertions(+), 24 deletions(-) diff --git a/mall-common/src/main/java/com/suisung/mall/common/constant/CommonConstant.java b/mall-common/src/main/java/com/suisung/mall/common/constant/CommonConstant.java index db946b39..ee2e5dfa 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/constant/CommonConstant.java +++ b/mall-common/src/main/java/com/suisung/mall/common/constant/CommonConstant.java @@ -127,4 +127,13 @@ public class CommonConstant { // 预约下单从当前时间延迟的最小分钟数(单位分钟),不能低于35分钟 public final static Integer MIN_DELAY_MINUTES_FOR_BOOKING_ORDER = 50; + + + // 店铺营业状态:1-营业中;2-已打烊;3-开业(活动)筹备中; + //1-营业中; + public final static Integer Store_Biz_State_Opening = 1; + //2-已打烊; + public final static Integer Store_Biz_State_Closed = 2; + //3-开业(活动)筹备中; + public final static Integer Store_Biz_State_PreActivity = 3; } diff --git a/mall-common/src/main/java/com/suisung/mall/common/modules/store/ShopStoreBase.java b/mall-common/src/main/java/com/suisung/mall/common/modules/store/ShopStoreBase.java index 8b1b0ef9..6d2aeb3b 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/modules/store/ShopStoreBase.java +++ b/mall-common/src/main/java/com/suisung/mall/common/modules/store/ShopStoreBase.java @@ -80,7 +80,7 @@ public class ShopStoreBase implements Serializable { @ApiModelProperty(value = "店铃声开关:1-开启;2-关闭;") private Integer ringtone_is_enable; - @ApiModelProperty(value = "店铺营业状态:1-营业中;2-已打烊;") + @ApiModelProperty(value = "店铺营业状态:1-营业中;2-已打烊;3-开业(活动)筹备中;") private Integer store_biz_state; @ApiModelProperty(value = "上级店铺编号:创建店铺决定,所属分销商-不可更改! 佣金公平性考虑") diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/product/service/impl/ShopProductItemServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/product/service/impl/ShopProductItemServiceImpl.java index 0029f7f0..79b68972 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/product/service/impl/ShopProductItemServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/product/service/impl/ShopProductItemServiceImpl.java @@ -487,7 +487,7 @@ public class ShopProductItemServiceImpl extends BaseServiceImpl { * 修改店铺的营业状态 * * @param storeId - * @param bizState 营业状态 1-营业;2-打烊 + * @param bizState 店铺营业状态:1-营业中;2-已打烊;3-开业(活动)筹备中; * @return */ Boolean updateStoreBizState(Integer storeId, Integer bizState); @@ -233,7 +233,7 @@ public interface ShopStoreBaseService extends IBaseService { * * @param shopStoreBase 店铺基础信息 * @param shopStoreInfo 店铺详细信息 - * @return 店铺营业状态:1-营业中;2-已打烊; + * @return 店铺营业状态:1-营业中;2-已打烊;3-开业(活动)筹备中; */ Integer getStoreBizState(ShopStoreBase shopStoreBase, ShopStoreInfo shopStoreInfo); diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java index a0c8a445..9b5667f9 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java @@ -4199,13 +4199,13 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl getStoreBizState(Integer storeId) { // 参数校验 if (CheckUtil.isEmpty(storeId)) { log.warn("店铺ID为空,无法确定营业状态"); - return Pair.of(CommonConstant.Disable2, "店铺营业状态有误"); + return Pair.of(CommonConstant.Store_Biz_State_Closed, "店铺营业状态有误"); } try { StoreBizTimeInfoDTO storeBizTimeInfo = baseMapper.getStoreBizTimeInfo(storeId); if (storeBizTimeInfo == null) { log.warn("未找到店铺营业时间信息,storeId: {}", storeId); - return Pair.of(CommonConstant.Disable2, "店铺营业状态有误"); + return Pair.of(CommonConstant.Store_Biz_State_Closed, "店铺营业状态有误"); } Integer storeBizState = storeBizTimeInfo.getStore_biz_state(); @@ -4261,7 +4261,7 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl storeBizState = shopStoreBaseService.getStoreBizState(storeId); - if (storeBizState != null && CommonConstant.Disable2.equals(storeBizState.getFirst())) { - throw new ApiException(I18nUtil._(storeBizState.getSecond() + ",无法加购商品。")); - } + + // 判断店铺是否打烊?打烊不能放入购物车 RMK 已移至统一放到下单支付的时候校验 +// Pair storeBizState = shopStoreBaseService.getStoreBizState(storeId); +// if (storeBizState != null && CommonConstant.Disable2.equals(storeBizState.getFirst())) { +// throw new ApiException(I18nUtil._(storeBizState.getSecond() + ",无法加购商品。")); +// } Integer cart_type = Convert.toInt(data.get("cart_type")); // 判断是新增还是更新 diff --git a/mall-shop/src/main/resources/static/diy/js/diy.js b/mall-shop/src/main/resources/static/diy/js/diy.js index 3fe8121c..c46760f0 100644 --- a/mall-shop/src/main/resources/static/diy/js/diy.js +++ b/mall-shop/src/main/resources/static/diy/js/diy.js @@ -20809,7 +20809,7 @@ c(); }, s, o, r)); }) : 17 == i[_x41903[4420]] && $[_x41903[39]](i[_x41903[4617]][_x41903[473]], function(e, t) { - t[_x41903[124]] == a && (s = r = o = 100, publicFun[_x41903[4586]]($(n[_x41903[476]])[_x41903[217]](_x41903[124]), function(e) { + t[_x41903[124]] == a && (s = r = o = 10240, publicFun[_x41903[4586]]($(n[_x41903[476]])[_x41903[217]](_x41903[124]), function(e) { 250 == e[_x41903[686]] && $[_x41903[2030]][_x41903[4089]](e[_x41903[4587]] || __(_x41903[4618])), t[_x41903[2345]] = e[_x41903[473]][_x41903[688]], c();