withConditions
This commit is contained in:
parent
3cbec99b4c
commit
c5cf8dd814
@ -54,7 +54,7 @@ class CardService extends Service
|
||||
|
||||
if (isset($conditions['card_status'])) {
|
||||
$conditions['type'] = [0, 1, 2];
|
||||
$simArray = $this->orderCardPartitionRepository->selectRaw('sim, MAX(created_at) as created_at')->withConditions($conditions)->orderBy('created_at', 'desc')->forPage($page, $limit)->get()->pluck('sim')->toArray();
|
||||
$simArray = $this->orderCardPartitionRepository->selectRaw('sim')->withConditions($conditions)->orderBy('sim')->forPage($page, $limit)->get()->pluck('sim')->toArray();
|
||||
$cards = $this->orderCardPartitionRepository->select($select)->whereIn('sim', $simArray)->get();
|
||||
} else {
|
||||
$cards = $this->orderCardPartitionRepository->select($select)->withConditions($conditions)->orderBy('created_at', 'desc')->forPage($page, $limit)->get();
|
||||
|
Loading…
x
Reference in New Issue
Block a user