reset
This commit is contained in:
parent
1351b340a8
commit
f9b442ff41
@ -55,12 +55,14 @@ class CardService extends Service
|
||||
if (isset($conditions['card_status'])) {
|
||||
$conditions['type'] = [0, 1, 2];
|
||||
$simArray = $this->orderCardPartitionRepository->selectRaw('sim')->withConditions($conditions)->orderBy('sim')->forPage($page, $limit)->get()->pluck('sim')->toArray();
|
||||
$this->orderCardPartitionRepository->resetModel();
|
||||
|
||||
$subQuery = $this->orderCardPartitionRepository->selectRaw('sim')->withConditions($conditions)->currentModel();
|
||||
$res = DB::table(DB::raw("({$subQuery->toSql()}) as sub"))
|
||||
->select(DB::raw('count(*) as total'))
|
||||
->mergeBindings($subQuery->getQuery())
|
||||
->first();
|
||||
$this->orderCardPartitionRepository->resetModel();
|
||||
|
||||
$total = $res->total;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user