moonsflyer 4 месяцев назад
Родитель
Сommit
47c4abbc0b
1 измененных файлов с 9 добавлено и 9 удалено
  1. 9 9
      app/adminapi/validate/goods/GoodsCategoryValidate.php

+ 9 - 9
app/adminapi/validate/goods/GoodsCategoryValidate.php

@@ -85,15 +85,15 @@ class GoodsCategoryValidate extends BaseValidate
      */
     public function checkName($value,$rule,$data)
     {
-        $where[] = ['name', '=', $value];
-        // 编辑的情况,要排除自身ID
-        if (isset($data['id'])) {
-            $where[] = ['id', '<>', $data['id']];
-        }
-        $result = GoodsCategory::where($where)->select()->toArray();
-        if ($result) {
-            return '该商品分类名称已存在';
-        }
+//        $where[] = ['name', '=', $value];
+//        // 编辑的情况,要排除自身ID
+//        if (isset($data['id'])) {
+//            $where[] = ['id', '<>', $data['id']];
+//        }
+//        $result = GoodsCategory::where($where)->select()->toArray();
+//        if ($result) {
+//            return '该商品分类名称已存在';
+//        }
         return true;
     }