['mobile', 'level', 'is_mileage', 'server_type', 'disable', 'state'], '%like%' => ['nickname'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2026/01/04 21:04 */ public function lists(): array { $lists = TeamasterUser::alias("a") ->where($this->searchWhere) ->field(['a.id', 'a.avatar', 'a.account', 'a.mobile','a.nickname', 'a.level', 'a.star', 'a.price', 'a.mileage_price','b.name', 'b.image','b.both','b.weight','b.height','b.sex','b.hobby_introduce', 'a.is_mileage', 'a.sold', 'a.server_type', 'a.address_id', 'a.is_disable', 'a.no_reflect_amount', 'a.total_amount','a.user_money', 'a.total_reflect_amount', 'a.disable', 'a.state']) ->join("teamaster b","a.id=b.team_user_id","left") ->where('b.name', 'like', '%' . $this->params['name'] . '%') ->limit($this->limitOffset, $this->limitLength) ->order(['a.id' => 'desc']) ->select() ->toArray(); if($lists){ foreach ($lists as &$item){ $item['avatar'] = !empty($item['avatar']) ? FileService::getImgUrl($item['avatar']) : ''; } } return $lists; } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2026/01/04 21:04 */ public function count(): int { return TeamasterUser::where($this->searchWhere)->count(); } }