|
|
@ -224,15 +224,13 @@ class Goods extends GoodsService |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function chartsGoodsJing($storeid): array |
|
|
|
public function chartsGoodsJing(): array |
|
|
|
{ |
|
|
|
{ |
|
|
|
$model = new CategoryModel; |
|
|
|
$model = new CategoryModel; |
|
|
|
|
|
|
|
|
|
|
|
$list = $model->where([ |
|
|
|
$list = $model->where([ |
|
|
|
'parent_id' => 0, |
|
|
|
'parent_id' => 0, |
|
|
|
'status' => 1, |
|
|
|
'status' => 1, |
|
|
|
'is_paihang' => 1, |
|
|
|
'is_paihang' => 1, |
|
|
|
'store_id' => $storeid |
|
|
|
|
|
|
|
])->order('category_id desc')->select()->toArray(); |
|
|
|
])->order('category_id desc')->select()->toArray(); |
|
|
|
$model = new GoodsModel; |
|
|
|
$model = new GoodsModel; |
|
|
|
foreach ($list as &$v) { |
|
|
|
foreach ($list as &$v) { |
|
|
@ -240,14 +238,11 @@ class Goods extends GoodsService |
|
|
|
'status' => 10, |
|
|
|
'status' => 10, |
|
|
|
'is_delete' => 0, |
|
|
|
'is_delete' => 0, |
|
|
|
'paihang' => 1, |
|
|
|
'paihang' => 1, |
|
|
|
'store_id' => $storeid, |
|
|
|
|
|
|
|
'categoryId' => $v['category_id'], |
|
|
|
'categoryId' => $v['category_id'], |
|
|
|
], 3); |
|
|
|
], 3); |
|
|
|
$list2 = $goodsList->toArray()['data']; |
|
|
|
$list2 = $goodsList->toArray()['data']; |
|
|
|
|
|
|
|
|
|
|
|
$v['goods_list'] = $this->newFormatGoodsList($list2); |
|
|
|
$v['goods_list'] = $this->newFormatGoodsList($list2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $list; |
|
|
|
return $list; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|