diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 5341ca7..6d65441 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -296,7 +296,7 @@ class ProductRepository extends BaseRepository $buyAgreement = [ 'content' => $conType ? json_encode($data['buy_agreement']) : $data['buy_agreement'] , - 'type' => 11 + 'type' => $conType == 0 ? 11 : 12, ]; $spuData['price'] = $settleParams['data']['price']; $spuData['mer_id'] = $merId; @@ -389,6 +389,7 @@ class ProductRepository extends BaseRepository $productAttrValueRepository->add($item,$res->type); } } + if ($content){ app()->make(ProductContentRepository::class)->clearAttr($res->product_id,$content['type']); $this->dao->createContent($res->product_id, $content);