['title', 'type'], ]; } /** * @notes 获取日程安排列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/05/23 11:53 */ public function lists(): array { return OaPlan::where($this->searchWhere)->where('admin_id',$this->adminId) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ $data['type_text'] = $data->type_text; $data['remind_type_text'] = $data->remind_type_text; }) ->toArray(); } /** * @notes 获取日程安排数量 * @return int * @author likeadmin * @date 2024/05/23 11:53 */ public function count(): int { return OaPlan::where($this->searchWhere)->where('admin_id',$this->adminId)->count(); } }