|
|
@ -235,7 +235,6 @@ class Goods extends GoodsModel |
|
|
|
'is_change' => 0, |
|
|
|
'is_change' => 0, |
|
|
|
'status' => 1, |
|
|
|
'status' => 1, |
|
|
|
])->order('id desc')->find(); |
|
|
|
])->order('id desc')->find(); |
|
|
|
|
|
|
|
|
|
|
|
if ($info) { |
|
|
|
if ($info) { |
|
|
|
$goods = explode(',', $info->goods_list); |
|
|
|
$goods = explode(',', $info->goods_list); |
|
|
|
|
|
|
|
|
|
|
@ -267,7 +266,6 @@ class Goods extends GoodsModel |
|
|
|
|
|
|
|
|
|
|
|
public function presaleCateList() |
|
|
|
public function presaleCateList() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$info = PreSale::where([ |
|
|
|
$info = PreSale::where([ |
|
|
|
'store_id' => request()->header()['storeid'], |
|
|
|
'store_id' => request()->header()['storeid'], |
|
|
|
'is_change' => 0, |
|
|
|
'is_change' => 0, |
|
|
@ -283,8 +281,8 @@ class Goods extends GoodsModel |
|
|
|
'a.status' => 10, |
|
|
|
'a.status' => 10, |
|
|
|
'c.parent_id' => 0, |
|
|
|
'c.parent_id' => 0, |
|
|
|
])->whereIn('a.goods_id', $goods)->field('c.*,a.sales_initial,a.sales_actual')->select()->toArray(); |
|
|
|
])->whereIn('a.goods_id', $goods)->field('c.*,a.sales_initial,a.sales_actual')->select()->toArray(); |
|
|
|
|
|
|
|
|
|
|
|
$list = $this->removeDuplicatesByField($list, 'category_id'); |
|
|
|
$list = $this->removeDuplicatesByField($list, 'category_id'); |
|
|
|
|
|
|
|
$info['end_time'] = strtotime($info->p_time) - time(); |
|
|
|
$res['info'] = $info; |
|
|
|
$res['info'] = $info; |
|
|
|
$res['category'] = $list; |
|
|
|
$res['category'] = $list; |
|
|
|
return $res; |
|
|
|
return $res; |
|
|
|