WIN-2308041133\Administrator il y a 6 mois
Parent
commit
ddf6e6a783
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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('等级已存在');
         }
         }