更新
This commit is contained in:
parent
0336d6a59b
commit
968504744a
@ -2346,7 +2346,7 @@ class ProductRepository extends BaseRepository
|
||||
foreach ($data['attrValue'] as $k => $item) {
|
||||
//$data['attrValue'][$k]['stock'] = 0;
|
||||
}
|
||||
app()->make(ProductLabelRepository::class)->checkHas($merId, $data['mer_labels']);
|
||||
app()->make(ProductLabelRepository::class)->checkHas(0, $data['mer_labels']);
|
||||
$count = app()->make(StoreCategoryRepository::class)->getWhereCount(['store_category_id' => $data['cate_id'], 'is_show' => 1]);
|
||||
if (!$count) throw new ValidateException('平台分类不存在或不可用');
|
||||
app()->make(StoreProductValidate::class)->check($data);
|
||||
|
@ -62,8 +62,7 @@ class ProductLabel extends BaseController
|
||||
$data = $this->checkParams($validate);
|
||||
if (!$this->repository->check($data['label_name'], $this->request->merId(),$id))
|
||||
return app('json')->fail('名称重复');
|
||||
//'mer_id' => $this->request->merId()
|
||||
$getOne = $this->repository->getWhere(['product_label_id' => $id]);
|
||||
$getOne = $this->repository->getWhere(['product_label_id' => $id,'mer_id' => $this->request->merId()]);
|
||||
if (!$getOne) return app('json')->fail('数据不存在');
|
||||
$this->repository->update($id, $data);
|
||||
return app('json')->success('编辑成功');
|
||||
|
Loading…
x
Reference in New Issue
Block a user