|
|
@@ -68,7 +68,7 @@ class CategoryController extends BaseController
|
|
|
$category = CategoryService::getById($categoryId);
|
|
|
CategoryService::valid($category, $this->sjId);
|
|
|
if ($category['goodsNum'] > 0) {
|
|
|
- util::fail('删除失败,该分类已被商品使用');
|
|
|
+ util::fail('分类下还有商品');
|
|
|
}
|
|
|
$count = CategoryService::deleteCategory($categoryId);
|
|
|
if (!$count) {
|
|
|
@@ -92,6 +92,11 @@ class CategoryController extends BaseController
|
|
|
$where['sjId'] = $this->sjId;
|
|
|
$where['cId'] = $categoryId;
|
|
|
$where['delStatus'] = 0;
|
|
|
+
|
|
|
+ $status = Yii::$app->request->get('status', '');
|
|
|
+ if (is_numeric($status)) {
|
|
|
+ $where['status'] = $status;
|
|
|
+ }
|
|
|
$data = GoodsCategoryService::getGoodsList($where);
|
|
|
util::success($data);
|
|
|
}
|