This commit is contained in:
shengchanzhe 2023-12-25 17:30:57 +08:00
parent e2641be239
commit 0336d6a59b

View File

@ -62,7 +62,8 @@ class ProductLabel extends BaseController
$data = $this->checkParams($validate);
if (!$this->repository->check($data['label_name'], $this->request->merId(),$id))
return app('json')->fail('名称重复');
$getOne = $this->repository->getWhere(['product_label_id' => $id,'mer_id' => $this->request->merId()]);
//'mer_id' => $this->request->merId()
$getOne = $this->repository->getWhere(['product_label_id' => $id]);
if (!$getOne) return app('json')->fail('数据不存在');
$this->repository->update($id, $data);
return app('json')->success('编辑成功');