["ask"] ]; } /** * @notes 获取思维导图对话列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/9/16 18:55 */ public function lists(): array { $this->searchWhere[] = ['user_id', '=', $this->userId]; return MindMap::where($this->searchWhere) ->order('id desc') ->limit($this->limitOffset, $this->limitLength) ->select() ->toArray(); } /** * @notes 获取数量 * @return int * @throws DbException * @author 段誉 * @date 2022/9/16 18:55 */ public function count(): int { $this->searchWhere[] = ['user_id', '=', $this->userId]; return MindMap::where($this->searchWhere)->count(); } }