上传
This commit is contained in:
parent
b1d1d54187
commit
5867fe5895
@ -284,8 +284,9 @@ class ProductRepository extends BaseRepository
|
|||||||
$spuData['price'] = $settleParams['data']['price'];
|
$spuData['price'] = $settleParams['data']['price'];
|
||||||
$spuData['mer_id'] = $merId;
|
$spuData['mer_id'] = $merId;
|
||||||
$spuData['mer_labels'] = $data['mer_labels'];
|
$spuData['mer_labels'] = $data['mer_labels'];
|
||||||
Db::transaction(function () use ($id, $data, $productType, $settleParams, $content, $product, $spuData, $merId) {
|
Db::startTrans();
|
||||||
$this->save($id, $settleParams, $content, $product, $productType);
|
try{
|
||||||
|
$res=$this->save($id, $settleParams, $content, $product, $productType);
|
||||||
// if ($productType == 1) { //秒杀商品
|
// if ($productType == 1) { //秒杀商品
|
||||||
// $dat = $this->setSeckillProduct($data);
|
// $dat = $this->setSeckillProduct($data);
|
||||||
// app()->make(StoreSeckillActiveRepository::class)->updateByProduct($id, $dat);
|
// app()->make(StoreSeckillActiveRepository::class)->updateByProduct($id, $dat);
|
||||||
@ -300,8 +301,13 @@ class ProductRepository extends BaseRepository
|
|||||||
if ($data['status'] == 0) {
|
if ($data['status'] == 0) {
|
||||||
event('product.sell', ['product_id' => [$id]]);
|
event('product.sell', ['product_id' => [$id]]);
|
||||||
}
|
}
|
||||||
app()->make(SpuRepository::class)->changeStatus($id, $productType);
|
app()->make(SpuRepository::class)->changeStatus($id, $productType);
|
||||||
});
|
Db::commit();
|
||||||
|
return $res;
|
||||||
|
}catch(\Exception $e){
|
||||||
|
Db::rollback();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function freeTrial(int $id, array $data, int $merId)
|
public function freeTrial(int $id, array $data, int $merId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user