Ver Fonte

[智价云] 增加关键字信息返回

tangyuanwang há 16 horas atrás
pai
commit
cc82bfc972

+ 1 - 0
app/Http/Controllers/Manager/Collect/Product.php

@@ -53,6 +53,7 @@ class Product extends Controller
         // 查询数据
         $result = $ProductModel->query()
             ->where($map)
+            ->with(['product_keyword'])
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据

+ 1 - 0
app/Http/Controllers/Manager/WashConfig/LowPriceGoods.php

@@ -74,6 +74,7 @@ class LowPriceGoods extends Controller
         }
         $result = $LowPriceGoodsModel
             ->where($map)
+            ->with(['product_keyword'])
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据

+ 1 - 0
app/Http/Controllers/Manager/WashConfig/ViolationProduct.php

@@ -74,6 +74,7 @@ class ViolationProduct extends Controller
         }
         $result = $ViolationProductModel
             ->where($map)
+            ->with(['product_keyword'])
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据

+ 10 - 0
app/Models/Manager/Collect/Product.php

@@ -49,6 +49,16 @@ class Product extends Model
         return $Product_id;
     }
 
+    /**
+     * 连表查询商品关键字
+     * @author 唐远望
+     * @version 1.0
+     * @date 2026-03-31
+     */
+    public function product_keyword(){
+        return $this->hasMany(ProductKeywordModel::class,'collect_product_id','id');
+    }
+
 
     /**
      * 写入数据

+ 11 - 0
app/Models/Manager/WashConfig/LowPriceGoods.php

@@ -53,6 +53,17 @@ class LowPriceGoods extends Model
     }
 
 
+    /**
+     * 连表查询商品关键字
+     * @author 唐远望
+     * @version 1.0
+     * @date 2026-03-31
+     */
+    public function product_keyword(){
+        return $this->hasMany(LowPriceGoodsKeywordModel::class,'lowprice_product_logid','id');
+    }
+
+
     /**
      * 写入数据
      * @author 唐远望

+ 11 - 0
app/Models/Manager/WashConfig/ViolationProduct.php

@@ -54,6 +54,17 @@ class ViolationProduct extends Model
     }
 
 
+    /**
+     * 连表查询商品关键字
+     * @author 唐远望
+     * @version 1.0
+     * @date 2026-03-31
+     */
+    public function product_keyword(){
+        return $this->hasMany(ViolationProductKeywordModel::class,'violation_product_id','id');
+    }
+
+
     /**
      * 写入数据
      * @author 唐远望