WIN-2308041133\Administrator 5 months ago
parent
commit
ddf6e6a783
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controller/admin/user/Award.php

+ 1 - 1
app/controller/admin/user/Award.php

@@ -118,7 +118,7 @@ class Award extends BaseController
         $data = $this->oil_checkParams($validate);
         $data = $this->oil_checkParams($validate);
 //        if (!$this->repository->merExists($this->request->merId(), $id))
 //        if (!$this->repository->merExists($this->request->merId(), $id))
 //            return app('json')->fail('数据不存在');
 //            return app('json')->fail('数据不存在');
-        $grade = app()->make(OilLevelRepository::class)->getSearch([])->where('grade', $data['grade'])->find();
+        $grade = app()->make(OilLevelRepository::class)->getSearch([])->whereNotIn('id',[$id])->where('grade', $data['grade'])->find();
         if ($grade){
         if ($grade){
             return app('json')->fail('等级已存在');
             return app('json')->fail('等级已存在');
         }
         }