['label_name'], ]; } /** * @notes 获取用户标签列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author admin * @date 2024/06/17 17:02 */ public function lists(): array { return UserLabel::where($this->searchWhere) ->field(['label_id', 'label_name']) ->limit($this->limitOffset, $this->limitLength) ->order(['label_id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取用户标签数量 * @return int * @author admin * @date 2024/06/17 17:02 */ public function count(): int { return UserLabel::where($this->searchWhere)->count(); } }