|
|
|
@ -242,7 +242,6 @@ class Goods extends GoodsModel |
|
|
|
|
public function presaleGoods(array $param): array |
|
|
|
|
{ |
|
|
|
|
$list = []; |
|
|
|
|
$cate_goods_id = []; |
|
|
|
|
$model = new PreSale(); |
|
|
|
|
$info = $model->where(['is_change' => 0, 'status' => 1])->field('goods_list,p_time')->find(); |
|
|
|
|
if (!$info->isEmpty()) { |
|
|
|
@ -256,11 +255,10 @@ class Goods extends GoodsModel |
|
|
|
|
->column('distinct goods_id'); |
|
|
|
|
if (!$cate_goods_id) { |
|
|
|
|
return $list; |
|
|
|
|
} else { |
|
|
|
|
$goods_ids = $cate_goods_id; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($cate_goods_id) { |
|
|
|
|
$goods_ids = $cate_goods_id; |
|
|
|
|
} |
|
|
|
|
$result = $this->getListByIds($goods_ids); |
|
|
|
|
if (!$result->isEmpty()) { |
|
|
|
|
$result = $result->toArray(); |
|
|
|
|