|
|
@@ -38,11 +38,13 @@ class ProductLists extends Model
|
|
|
];
|
|
|
|
|
|
//获取产品信息
|
|
|
- public static function getBySynthesisProduct(string $product_id, $lan = 'zh')
|
|
|
+ public static function getBySynthesisProduct(string $product_id, int $type_id, $lan = 'zh')
|
|
|
{
|
|
|
if(empty($product_id)) return [];
|
|
|
- $product_id = explode(',', $product_id);
|
|
|
- return self::whereIn('id', $product_id)->column('id,thum,'.$lan.'_name as name');
|
|
|
+ $info = self::whereIn('id', $product_id);
|
|
|
+ if($type_id == ProductPledges::Combin) $info = $info->orderRaw('field(id,'. $product_id.')');
|
|
|
+ $info = $info->column('id,thum,'.$lan.'_name as name');
|
|
|
+ return $info ;
|
|
|
}
|
|
|
|
|
|
//地区
|