|
@@ -119,7 +119,7 @@ class SupplyDemandCateValidate extends BaseValidate
|
|
|
* @date 2022/2/10 15:10
|
|
* @date 2022/2/10 15:10
|
|
|
*/
|
|
*/
|
|
|
public function checkName($value){
|
|
public function checkName($value){
|
|
|
- $category = SupplyDemandCate::findOrEmpty($value);
|
|
|
|
|
|
|
+ $category = SupplyDemandCate::where(['name'=>$value])->findOrEmpty();
|
|
|
if (!$category->isEmpty()) {
|
|
if (!$category->isEmpty()) {
|
|
|
return '已存在改分类名称';
|
|
return '已存在改分类名称';
|
|
|
}
|
|
}
|