修改商品免审的错误
This commit is contained in:
parent
5b96056942
commit
4092436eb4
@ -14,6 +14,7 @@
|
||||
namespace app\common\repositories\store\product;
|
||||
|
||||
use app\common\model\store\product\ProductLabel;
|
||||
use app\common\model\store\product\Spu;
|
||||
use app\common\model\user\User;
|
||||
use app\common\repositories\community\CommunityRepository;
|
||||
use app\common\repositories\store\coupon\StoreCouponRepository;
|
||||
@ -307,7 +308,7 @@ class ProductRepository extends BaseRepository
|
||||
$settleParams['attr'] = $this->setAttr($data['attr'], $id);
|
||||
$data['price'] = $settleParams['data']['price'];
|
||||
unset($data['attrValue'],$data['attr'],$data['mer_cate_id']);
|
||||
$ret = app()->make(SpuRepository::class)->getSearch(['product_id' => $id, 'product_type' => 0,])->find();
|
||||
$ret = Spu::getInstance()->where('product_id', $id)->whereIn('product_type',[0, 98])->find();
|
||||
Db::transaction(function () use ($id, $data, $settleParams,$ret) {
|
||||
$this->save($id, $settleParams, null, [], 0);
|
||||
app()->make(SpuRepository::class)->update($ret->spu_id,['price' => $data['price']]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user