|
|
@@ -54,10 +54,12 @@ class TenantRatingCommissionLists extends BaseAdminDataLists implements ListsSea
|
|
|
*/
|
|
|
public function lists(): array
|
|
|
{
|
|
|
- return TenantRatingCommission::where($this->searchWhere)
|
|
|
- ->field(['id', 'rating_start', 'rating_end', 'commission', 'tenant_id'])
|
|
|
+ //'id', 'rating_start', 'rating_end', 'commission',
|
|
|
+ return TenantRatingCommission::with(['allCommission'])->where($this->searchWhere)
|
|
|
+ ->field(['tenant_id'])
|
|
|
+ ->group('tenant_id')
|
|
|
+ ->order(['create_time' => 'desc'])
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
- ->order(['id' => 'desc'])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
}
|
|
|
@@ -71,7 +73,7 @@ class TenantRatingCommissionLists extends BaseAdminDataLists implements ListsSea
|
|
|
*/
|
|
|
public function count(): int
|
|
|
{
|
|
|
- return TenantRatingCommission::where($this->searchWhere)->count();
|
|
|
+ return TenantRatingCommission::field(['tenant_id'])->where($this->searchWhere)->group('tenant_id')->count('tenant_id');
|
|
|
}
|
|
|
|
|
|
}
|