['rating_start', 'rating_end', 'commission', 'tenant_id'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2025/02/26 18:03 */ public function lists(): array { //'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) ->select() ->toArray(); } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2025/02/26 18:03 */ public function count(): int { return TenantRatingCommission::field(['tenant_id'])->where($this->searchWhere)->group('tenant_id')->count('tenant_id'); } }