|
@@ -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('等级已存在');
|
|
|
}
|
|
}
|