From cda5ce12cd56a327f065541f3c2ad33108c26185 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Sun, 21 Apr 2024 17:39:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E5=95=86=E5=93=81=E7=BC=96=E8=BE=91=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=90=8E=20=20=E5=95=86=E5=93=81=E8=B4=AD=E4=B9=B0=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=BC=BA=E5=88=B6=E8=A2=AB=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E8=A7=86=E4=B8=BA=E6=9C=89=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E7=9A=84=E2=80=9C=E7=A9=BA=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);