更新排序
This commit is contained in:
parent
6856704551
commit
2f86f37838
@ -154,6 +154,16 @@ class SpuRepository extends BaseRepository
|
||||
]);
|
||||
$productMake = app()->make(ProductRepository::class);
|
||||
$count = $query->fetchSql(false)->count();
|
||||
|
||||
if ($limit == 0) {
|
||||
$list = $query->setOption('field', [])->field($this->productFiled)->select()
|
||||
->each(function ($item) use ($is_sku, $productMake, $userInfo) {
|
||||
if ($is_sku == true) {
|
||||
$sku = $productMake->detailAttrValue($item['product']['attrValue'], $userInfo);
|
||||
$item['sku'] = $sku;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$list = $query->page($page, $limit)->setOption('field', [])->field($this->productFiled)->select()
|
||||
->each(function ($item) use ($is_sku, $productMake, $userInfo) {
|
||||
if ($is_sku == true) {
|
||||
@ -161,6 +171,9 @@ class SpuRepository extends BaseRepository
|
||||
$item['sku'] = $sku;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$append = ['stop_time', 'svip_price', 'show_svip_info', 'is_svip_price'];
|
||||
if ($productMake->getUserIsPromoter($userInfo))
|
||||
$append[] = 'max_extension';
|
||||
|
@ -82,7 +82,7 @@ class CloudWarehouse extends BaseController
|
||||
$query->whereOr('mer_labels', '')
|
||||
->whereOr('mer_labels',',5,');
|
||||
})->count();
|
||||
$products = $this->spuRepository->getApiSearch($where, $page, 10, false, true);
|
||||
$products = $this->spuRepository->getApiSearch($where, $page, 0, false, true);
|
||||
if ($products['list']) {
|
||||
$list = $products['list'];
|
||||
foreach ($cloud_product_arr as $key => $value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user