调整商品上架事件
This commit is contained in:
parent
ea733f9fb8
commit
6b54927d33
@ -284,6 +284,9 @@ class ProductRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
app()->make(SpuRepository::class)->baseUpdate($spuData, $id, 0, $productType);
|
app()->make(SpuRepository::class)->baseUpdate($spuData, $id, 0, $productType);
|
||||||
event('product.update',compact('id'));
|
event('product.update',compact('id'));
|
||||||
|
if ($data['status'] == 0) {
|
||||||
|
event('product.sell', ['source_mer_id' => $merId, 'product_id' => $id, 'status' => $data['status']]);
|
||||||
|
}
|
||||||
app()->make(SpuRepository::class)->changeStatus($id, $productType);
|
app()->make(SpuRepository::class)->changeStatus($id, $productType);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -120,9 +120,6 @@ class StoreProduct extends BaseController
|
|||||||
$data['mer_status'] = ($merchant['is_del'] || !$merchant['mer_state'] || !$merchant['status']) ? 0 : 1;
|
$data['mer_status'] = ($merchant['is_del'] || !$merchant['mer_state'] || !$merchant['status']) ? 0 : 1;
|
||||||
$data['mer_id'] = $merId;
|
$data['mer_id'] = $merId;
|
||||||
$this->repository->edit($id, $data, $merId, 0, 1);
|
$this->repository->edit($id, $data, $merId, 0, 1);
|
||||||
if ($data['status'] == 0) {
|
|
||||||
event('product.sell', ['source_mer_id' => $merId, 'product_id' => $id, 'status' => $data['status']]);
|
|
||||||
}
|
|
||||||
return app('json')->success('编辑成功');
|
return app('json')->success('编辑成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user