where($where)->order('create_time','desc')->paginate(['list_rows'=>10, "query" => $params]); } /** * @return AuthGroupModel[]|array|\think\Collection * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function fetchAllGroups() { return $this->where('is_delete',0)->select(); } public function fetchByDepartmentId($d_id) { return $this->where([ ['is_delete', '=', 0], ['department_id', '=', $d_id] ])->select(); } }