Gaosheng 1 dag sedan
förälder
incheckning
9fc9f45d82

+ 4 - 1
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/controller/seller/front/FrontStoreController.java

@@ -182,9 +182,12 @@ public class FrontStoreController {
                 store.setDescriptionScore(descriptionScore);
             }
         }
-        if (store.getState() != StoreConst.STORE_STATE_OPEN  || store.getBusinessState() != StoreConst.STORE_BUSINESS_STATE_OPEN) {
+        if (store.getState() != StoreConst.STORE_STATE_OPEN) {
             throw new MallException("店铺已关闭", ResponseConst.STATE_STORE_CLOSE);
         }
+        if (store.getBusinessState() != StoreConst.STORE_BUSINESS_STATE_OPEN) {
+            throw new MallException("店铺暂停营业", ResponseConst.STATE_FAIL);
+        }
         //默认店铺logo
         if (StringUtil.isEmpty(store.getStoreLogo())) {
             store.setStoreLogo(stringRedisTemplate.opsForValue().get("default_image_store_logo"));

+ 6 - 1
xinkeaboard-server/b2b2c-web/src/main/java/com/slodon/b2b2c/controller/system/front/FrontPcDecoController.java

@@ -134,11 +134,16 @@ public class FrontPcDecoController {
                 storeDb.setState(state);
             }
         }
-        if (storeDb.getState().equals(StoreConst.STORE_STATE_CLOSE) || !storeDb.getBusinessState().equals(StoreConst.STORE_BUSINESS_STATE_OPEN)) {
+        if (storeDb.getState().equals(StoreConst.STORE_STATE_CLOSE) ) {
             JsonResult jsonResult = SldResponse.fail("店铺已关闭");
             jsonResult.setState(ResponseConst.STATE_STORE_CLOSE);
             return jsonResult;
         }
+        if (!storeDb.getBusinessState().equals(StoreConst.STORE_BUSINESS_STATE_OPEN)){
+            JsonResult jsonResult = SldResponse.fail("店铺暂停经营");
+            jsonResult.setState(ResponseConst.STATE_FAIL);
+            return jsonResult;
+        }
         Map<String, Object> modelMap = new HashMap();
         String data = null;
         //decoId不为空说明是预览