shish 9 месяцев назад
Родитель
Сommit
ac14668fa6

+ 6 - 0
app-mall/controllers/CategoryController.php

@@ -20,6 +20,9 @@ class CategoryController extends BaseController
             util::success([]);
         }
 
+        $get = Yii::$app->request->get();
+        $flower = $get['flower'] ?? -1;
+
         //普莲花艺、叶上花、丰行、小武鲜花、九江云朵、源花汇、紫荆不能在花卉宝下单,多处要同步修改,关键词ls_mall_not_open
         $mainId = $this->mainId;
         if (getenv('YII_ENV') == 'production') {
@@ -36,6 +39,9 @@ class CategoryController extends BaseController
         CustomClass::buildRelation($this->shop, $this->user);
         $mainId = $this->mainId ?? 0;
         $where = ['mainId' => $mainId, 'delStatus' => 0, 'status' => 1];
+        if ($flower > -1) {
+            $where['flower'] = $flower;
+        }
         //默认列出正常分类,美团等第三方分类不列表
         $where['style'] = 0;
         $return = CategoryService::getAllCategory($where);

+ 0 - 1
biz-hd/goods/services/CategoryService.php

@@ -106,7 +106,6 @@ class CategoryService extends BaseService
                 util::fail('分类名称已经存在');
             }
         }
-        unset($post['flower']);
         CategoryClass::updateById($categoryId, $post);
         //同步更新分类商品表
         GoodsCategoryClass::updateByCondition(['cId' => $categoryId], ['cName' => $post['categoryName']]);