|
|
@@ -20,10 +20,11 @@ class PledgeLogic
|
|
|
public static function getByProductIdList(object $list, string $lan = 'zh')
|
|
|
{
|
|
|
$model = Loader::model('ProductLists');
|
|
|
+
|
|
|
foreach ($list as &$item) {
|
|
|
- $item['product_list'] = $model->whereIn('id', $item->product_id)
|
|
|
- ->orderRaw('field(id,'. $item->product_id.')')
|
|
|
- ->column('id,thum,'.$lan.'_name as name');
|
|
|
+ $item['product_list'] = $model->whereIn('id', $item->product_id);
|
|
|
+ if($item->type_id == ProductPledges::Combin) $item['product_list'] = $model->orderRaw('field(id,'. $item->product_id.')');
|
|
|
+ $item['product_list'] = $model->column('id,thum,'.$lan.'_name as name');
|
|
|
}
|
|
|
return $list;
|
|
|
}
|