[ 'user_id'], ]; } /** * @notes 获取卡单规则列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author BD * @date 2024/04/24 17:00 */ public function lists(): array { return UserKadan::where($this->searchWhere) ->field(['id', 'user_id', 'sn', 'num', 'money', 'commission', 'status', 'create_time', 'finish_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取卡单规则数量 * @return int * @author BD * @date 2024/04/24 17:00 */ public function count(): int { return UserKadan::where($this->searchWhere)->count(); } }