wang hou sheng 10 months ago
parent 74f2e3843c
commit f01afc88dd
  1. 6
      app/api/model/Goods.php

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

Loading…
Cancel
Save