|
|
@@ -84,9 +84,9 @@ class Award extends BaseController
|
|
|
* @return mixed
|
|
|
* @author Qinii
|
|
|
*/
|
|
|
- public function create(OilLevelValidate $validate,OilLevelRepository $repository)
|
|
|
+ public function oil_create(OilLevelValidate $validate,OilLevelRepository $repository)
|
|
|
{
|
|
|
- $data = $this->checkParams($validate);
|
|
|
+ $data = $this->oil_checkParams($validate);
|
|
|
$grade = $repository->where('grade', $data['grade'])->find();
|
|
|
if ($grade){
|
|
|
return app('json')->fail('等级已存在');
|
|
|
@@ -104,7 +104,7 @@ class Award extends BaseController
|
|
|
* @email 442384644@qq.com
|
|
|
* @date 2024/7/4
|
|
|
*/
|
|
|
- public function detail($id,OilLevelRepository $repository)
|
|
|
+ public function oil_detail($id,OilLevelRepository $repository)
|
|
|
{
|
|
|
// if (!$this->repository->merExists($this->request->merId(), $id))
|
|
|
// return app('json')->fail('数据不存在');
|
|
|
@@ -119,9 +119,9 @@ class Award extends BaseController
|
|
|
* @return mixed
|
|
|
* @author Qinii
|
|
|
*/
|
|
|
- public function update($id, OilLevelValidate $validate,OilLevelRepository $repository)
|
|
|
+ public function oil_update($id, OilLevelValidate $validate,OilLevelRepository $repository)
|
|
|
{
|
|
|
- $data = $this->checkParams($validate);
|
|
|
+ $data = $this->oil_checkParams($validate);
|
|
|
// if (!$this->repository->merExists($this->request->merId(), $id))
|
|
|
// return app('json')->fail('数据不存在');
|
|
|
$grade = $repository->where('grade', $data['grade'])->find();
|
|
|
@@ -142,7 +142,7 @@ class Award extends BaseController
|
|
|
* @throws ModelNotFoundException
|
|
|
* @author Qinii
|
|
|
*/
|
|
|
- public function delete($id,OilLevelRepository $repository)
|
|
|
+ public function oil_delete($id,OilLevelRepository $repository)
|
|
|
{
|
|
|
// if (!$this->repository->merExists($this->request->merId(), $id))
|
|
|
// return app('json')->fail('数据不存在');
|
|
|
@@ -157,7 +157,7 @@ class Award extends BaseController
|
|
|
* @return array
|
|
|
* @author Qinii
|
|
|
*/
|
|
|
- public function checkParams(OilLevelValidate $validate)
|
|
|
+ public function oil_checkParams(OilLevelValidate $validate)
|
|
|
{
|
|
|
$data = $this->request->params(['name', 'grade', 'achievement','award_ratio']);
|
|
|
$validate->check($data);
|