调整排序

This commit is contained in:
杨建炊 2024-10-30 16:08:48 +08:00
parent 86554e20d5
commit 8af2f75854
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class GoodsCombinationController extends Controller
])
->where('is_combination', 1)
->filter()
->orderBy('stock', 'desc')
->orderBy('id', 'desc')
->paginate($request->get('per_page'));
$fields = implode(',', [
'shop_id',

View File

@ -117,7 +117,8 @@ class GoodsSkusController extends Controller
$query->where('day', $day);
}])
->whereIn('id', $finalIds)
->orderByRaw("FIELD(id, {$idField})")
->orderByDesc('id')
//->orderByRaw("FIELD(id, {$idField})")
->paginate($request->get('per_page'));
$rolesName = $request->user()->getRoleNames()->toArray();
foreach ($goodsSkus as &$sku) {