This commit is contained in:
邓皓元 2019-12-16 17:49:22 +08:00
parent 470970a3a4
commit 9536fb7fa5

View File

@ -72,7 +72,7 @@ class CardService extends Service
$cards = $this->orderCardPartitionRepository->select($select)->where('type', 0)->whereIn('sim', $simArray)->get();
} else {
$total = $this->orderCardPartitionRepository->selectRaw("COUNT(*) AS count")->withConditions($conditions)->get()->count;
$total = $this->orderCardPartitionRepository->selectRaw("COUNT(*) AS count")->withConditions($conditions)->first()->count;
$cards = $this->orderCardPartitionRepository->select($select)->withConditions($conditions)->orderBy('created_at', 'desc')->forPage($page, $limit)->get();
}