瀏覽代碼

fix(product): 解决阿里巴产品属性值验证问题

- 添加了 is_alibaba 字段检查逻辑
- 当产品为阿里巴产品时跳过 SPU ID 验证
- 修复了相关产品的属性值处理流程
shichen 3 月之前
父節點
當前提交
75b17f89f5
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/common/repositories/store/product/ProductAttrValueRepository.php

+ 5 - 0
app/common/repositories/store/product/ProductAttrValueRepository.php

@@ -96,6 +96,11 @@ class ProductAttrValueRepository extends BaseRepository
96 96
         if($debug){
97 97
             return true;
98 98
         }
99
+        $is_alibaba = Db::name('store_product') -> where('product_id',$product_id)->value('is_alibaba');
100
+        if ($is_alibaba) {
101
+            return true;
102
+        }
103
+
99 104
         $spu_id = Db::name('store_product') -> where('product_id',$product_id)->value('spu_id');
100 105
 
101 106
         if($spu_id == ''){