/* * @Author: wangyang 1147192855@qq.com * @Date: 2022-07-13 11:29:05 * @LastEditors: wangyang 1147192855@qq.com * @LastEditTime: 2022-09-27 17:51:16 * @FilePath: \marking_app\lib\config\RequestClient.dart * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import 'package:dio/dio.dart'; import 'package:marking_app/common/config/request_config.dart'; import 'package:marking_app/common/model/common/base_page_data.dart'; import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/common/upload_img_secret_key.dart'; import 'package:marking_app/common/model/job/job_collect_params.dart'; import 'package:marking_app/common/model/job/job_concerned_with_student.dart'; import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart'; import 'package:marking_app/common/model/job/job_data_report.dart'; import 'package:marking_app/common/model/job/job_do_marking_status_info.dart'; import 'package:marking_app/common/model/job/job_fav_student.dart'; import 'package:marking_app/common/model/job/job_favorite_model.dart'; import 'package:marking_app/common/model/job/job_handwriting.dart'; import 'package:marking_app/common/model/job/job_knowledge_detail_student.dart'; import 'package:marking_app/common/model/job/job_knowledge_points.dart'; import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart'; import 'package:marking_app/common/model/job/job_level_set_params.dart'; import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart'; import 'package:marking_app/common/model/job/job_page_tab.dart'; import 'package:marking_app/common/model/job/job_report_join_class.dart'; import 'package:marking_app/common/model/job/job_report_knowledge_model.dart'; import 'package:marking_app/common/model/job/job_report_model.dart'; import 'package:marking_app/common/model/job/job_report_question_deatil_model.dart'; import 'package:marking_app/common/model/job/job_review_submission.dart'; import 'package:marking_app/common/model/job/job_student_goups.dart'; import 'package:marking_app/common/model/job/job_student_history.dart'; import 'package:marking_app/common/model/job/job_student_level.dart'; import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/common/model/job/marking_text_question_job.dart'; import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart'; import 'package:marking_app/common/model/job/review_again_list_params.dart'; import 'package:marking_app/common/model/job/upload_file_interface_config.dart'; import 'package:marking_app/common/model/job/upload_file_interface_config_params.dart'; import 'package:marking_app/common/model/marking/marking_abnormal_res.dart'; import 'package:marking_app/common/model/marking/marking_item.dart'; import 'package:marking_app/common/model/marking/marking_list_params.dart'; import 'package:marking_app/common/model/marking/marking_statistics.dart'; import 'package:marking_app/common/model/marking/marking_tag_single_params.dart'; import 'package:marking_app/common/model/marking/marking_text_question.dart'; import 'package:marking_app/common/model/marking/marking_text_question_params.dart'; import 'package:marking_app/common/model/marking/marking_text_question_tab.dart'; import 'package:marking_app/common/model/marking/marking_text_question_tab_params.dart'; import 'package:marking_app/common/model/marking/marking_text_question_tab_step_size.dart'; import 'package:marking_app/common/model/marking/rating_progress_model.dart'; import 'package:marking_app/common/model/marking/review_records_item.dart'; import 'package:marking_app/common/model/marking/review_records_params.dart'; import 'package:marking_app/common/model/marking/submit_exam_abnormal_params.dart'; import 'package:marking_app/common/model/marking/submit_exam_params.dart'; import 'package:marking_app/common/model/progress/progress_item.dart'; import 'package:marking_app/common/model/progress/progress_page_params.dart'; import 'package:marking_app/common/model/progress/progress_statistics.dart'; import 'package:marking_app/common/model/review/review_item.dart'; import 'package:marking_app/common/model/review/review_page_params.dart'; import 'package:marking_app/common/model/review/review_tab.dart'; import 'package:marking_app/common/model/sys/system_version.dart'; import 'package:marking_app/common/model/user/user_info.dart'; import 'package:retrofit/retrofit.dart' as the_retrofit; import 'package:marking_app/common/model/user/user_login_params.dart'; part 'rest_client.g.dart'; @the_retrofit.RestApi() @the_retrofit.Headers({"Content-Type": "application/json"}) abstract class RestClient { factory RestClient(Dio dio, {String baseUrl}) = _RestClient; // 最新版本 @the_retrofit.GET("/api/version/latest?mobileTypeEnum={mobileTypeEnum}") Future> getLatestVersion(@the_retrofit.Path("mobileTypeEnum") int mobileTypeEnum); // 1 安卓 2 ios // 用户登录 /auth/login/exam-marking/user-mobile @the_retrofit.POST("/auth/login/exam-marking/user") Future> toLogin(@the_retrofit.Body() UserLoginParams params); //获取图片上传秘钥 @the_retrofit.GET("/api/img-svr/minio-cfg") Future> getImageUploadKey(); // 获取用户信息 @the_retrofit.GET("/auth/info/cur-user") Future> getUserInfo(@the_retrofit.Header("Authorization") String token); // 阅卷列表 => 分页获取 @the_retrofit.GET("/api/marking/list") Future>> getMarkingsByPage(@the_retrofit.Queries() MarkingListParams params); // /api/marking/list // 进度 => 进度详情 分页获取 @the_retrofit.GET("/api/marking/teacher-overview") Future>> getProgressByPage( @the_retrofit.Path("markingId") String id, @the_retrofit.Queries() ProgressPageParams params); // 进度 => 进度详情 统计数据 @the_retrofit.GET("/api/marking/{examSubjectId}/overview") Future> getProgressStatistics(@the_retrofit.Path("examSubjectId") String id); // 回评 => 获取tab @the_retrofit.GET("/api/marking/{markingUserId}/review/tab") Future>> getReviewTab( @the_retrofit.Path("markingUserId") String id, @the_retrofit.Query("markingUserId") int markingUserId); // 回评 => 获取tab 下分页 @the_retrofit.GET("/api/marking/{markingUserId}/review/paged") Future>> getReviewPage( @the_retrofit.Path("markingUserId") String id, @the_retrofit.Queries() ReviewPageParams params); // 阅卷 => 获取考试试题 @the_retrofit.GET("/api/marking/question") Future> getTestQuestionsOfExam(@the_retrofit.Queries() MarkingTextQuestionParams params); // 阅卷 => 获取考试tab(试题批次) @the_retrofit.GET("/api/marking/{markingUserId}/tab") Future>> getTestQuestionsOfTab(@the_retrofit.Path("markingUserId") int markingUserId); // 阅卷 => 单个试题Tag阅卷详情 @the_retrofit.GET("/api/marking/{markingUserId}/progress") Future> getMarkingTagSingleDetails( @the_retrofit.Path("markingUserId") int markingUserId, @the_retrofit.Queries() MarkingTagSingleParams params); // 阅卷 => 获取考试tabs 下所有步长 @the_retrofit.GET("/api/marking/q/interval") Future>> getTestQuestionsOfTabStepSize( @the_retrofit.Query("examSubjectId") int examSubjectId); // 阅卷 => 获取考试tab下某次试题 @the_retrofit.GET("/api/marking/{markingUserId}/detail") Future> getTabOfExam( @the_retrofit.Path("markingUserId") int markingUserId, @the_retrofit.Queries() MarkingTextQuestionTabParams params); // 阅卷 => 提交考试试题 @the_retrofit.PUT("/api/marking") Future> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params); @the_retrofit.PUT("/api/marking/error") Future> submitTestQuestionsOfExamAbnormal(@the_retrofit.Body() SubmitExamAbnormalParams params); // 阅卷 => 提交考试试题 @the_retrofit.PUT("/api/marking/review") Future> submitTestQuestionsOfExamReview(@the_retrofit.Body() SubmitExamParams params); // 阅卷 => 结束阅卷 @the_retrofit.PUT("/api/marking/{markingUserId}/end") Future> endMarkingTask(@the_retrofit.Path("markingUserId") String markingUserId); // 阅卷 => 结束阅卷 @the_retrofit.GET("/api/marking/original-paper") Future>> getViewOriginalVolume(@the_retrofit.Query("markingUserDetailId") String markingUserDetailId); // 阅卷 => 查看答案 @the_retrofit.GET("/api/marking/answer") Future> getStandardAnswer( @the_retrofit.Query("examSubjectId") int examSubjectId, @the_retrofit.Query("questionNum") String questionNum); // 阅卷 => 获取任务列表种类统计信息 @the_retrofit.GET("/api/marking/list/count") Future>> getMarkingStatistics(); // 阅卷 => 获取异常类型集合 @the_retrofit.GET("/api/marking/errortypes") Future> getAbnormalTypes(); // 阅卷 => 获取异常类型集合 @the_retrofit.GET("/api/marking/{markingUserId}/exit") Future exitMarking(@the_retrofit.Path("markingUserId") int markingUserId); // 阅卷 => 获取异常类型集合 @the_retrofit.GET("/api/marking/{markingUserId}/records") Future>> getMarkingRecords( @the_retrofit.Path("markingUserId") String markingUserId, @the_retrofit.Queries() ReviewRecordsParams params); // 阅卷 => 获取异常详细信息 @the_retrofit.GET("/api/marking/error-info") Future> getMarkingQuestionsErrorInfo(@the_retrofit.Query("markingUserDetailId") int id); // 阅卷 => 获取仲裁详细信息 @the_retrofit.GET("/api/marking/history-score") Future>> getArbitrateOfHistoryScore(@the_retrofit.Query("markingUserDetailId") int id); // 阅卷 => 获取仲裁详细信息 @the_retrofit.GET("/api/marking/rating-info") Future>> getMarkingRatingInfo(@the_retrofit.Query("markingUserId") int id); // ------------------------------------------ 作业 ------------------------------------------ // 作业 => 作业列表 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task") Future>> getJobsByPage(@the_retrofit.Queries() MarkingListParams params); // 作业 => 批改获取tabs @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs") Future>> getJobOfTabs(@the_retrofit.Query("taskId") int taskId); // 作业 => 批改获取tabs @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/students") Future>> getJobWithStudents(@the_retrofit.Queries() JobConcernedWithStudentParams params); // 作业 => 获取考试tab下某次试题 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/detail") Future> getJobTabOfExam(@the_retrofit.Queries() MarkingTextQuestionJobTabParams params); // 作业 => 提交 @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Task") Future toSubmitMarking(@the_retrofit.Body() JobReviewSubmission params); // 作业 => 结束作业任务 @the_retrofit.PUT("${RequestConfig.hwProxyKeywords}/api/Task/end") Future toEndReviewJob(@the_retrofit.Query("taskIds") List taskIds); // 作业 => 获取考试tab下某次试题 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/questions") Future>> toGoreviewAgainPage(@the_retrofit.Queries() ReviewAgainListParams params); // 作业 => 获取参考答案 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/answer") Future> getAnswer( @the_retrofit.Query("taskId") int taskId, @the_retrofit.Query("questionNum") String questionNum, ); // 作业 => 上传图片请求参数 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Upload") Future> getUploadFile(@the_retrofit.Queries() UploadFileInterfaceConfigParams params); // 作业 => 获取参考答案 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/studentAnswerHandwriting") Future> getNoteTakingTrajectory( @the_retrofit.Query("paperId") int paperId, @the_retrofit.Query("questionNo") String questionNo); // 作业 => 查询作业是否收藏 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect") Future> getJobCollect( @the_retrofit.Query("taskId") int taskId, @the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId); // 作业 => 作业优先批阅取消 @the_retrofit.POST("/api/read/cancel-job-read-level") Future> jobPriorityReviewCancel(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId); // 作业 => 作业优先批阅加入 @the_retrofit.POST("/api/read/join-read-level") Future jobPriorityReviewJoin(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId); // 作业 => 查询作业是否收藏 @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Dpc/collect") Future> toJobFavoriteCancel(@the_retrofit.Body() JobCollectParams params); // 作业 => 一键批阅 @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Marking/auto") Future> toJobOneClickReview(@the_retrofit.Field() int taskId); // 作业 => 获取作业报告 @the_retrofit.GET("/api/jobs/job-report") Future> getJobReport(@the_retrofit.Queries() Map params); // 作业 => 获取作业班级列表(参与班级) @the_retrofit.GET("/api/jobs/student-job-for-class") Future>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId); // 作业 => 或者作业在当前题型下批阅情况 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/tab") Future> getJobPageIndexInfo( @the_retrofit.Query("taskId") int taskld, @the_retrofit.Query("pageIndex") int pagelndex); // 作业 => 报告 ==> 获取知识点详情 @the_retrofit.GET("/api/jobs/job-report-knowledge-detail") Future>> getDetailKnowledge( @the_retrofit.Query("jobid") int jobId, @the_retrofit.Query("knowid") int knowid); // 作业 => 报告 ==> 获取知识点详情 @the_retrofit.GET("/api/jobs/job-report-question-detail") Future>> getJobReportQuestionDetail( @the_retrofit.Query("jobid") int jobId, @the_retrofit.Query("questionid") int questionid); // 作业 => 列表 ==> 参与班级列表 @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks") Future>> getJobListParticipateInClass(@the_retrofit.Query("markingId") int jobId); // 作业 => 作业收藏数量 @the_retrofit.GET("/dpc-api/api/read/job-favorite-count-by-class") Future>> getListOfJobFavoriteNumber(@the_retrofit.Query("jobid") int jobId); // 作业 => 作业收藏列表 @the_retrofit.GET("/api/jobs/fav-student-jobs") Future> getListOfJobFavorites( @the_retrofit.Query("JobId") int jobId, @the_retrofit.Query("JobName") String jobName, @the_retrofit.Query("className") String? className, @the_retrofit.Query("PageSize") int pageSize, ); // 作业 => 作业收藏列表 @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/cancel-favorite") Future> toJobCancelFavorite(@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId); // 作业 => 数据快查 @the_retrofit.GET("/api/read/job-data-center-report") Future> getJobDataCenterReport(@the_retrofit.Queries() Map params); // 作业 => 数据快查--个人 @the_retrofit.GET("/api/read/job-data-center-student-report") Future> getJobPersonalReport(@the_retrofit.Queries() Map params); // 作业 => 优先批阅,学生分组列表 @the_retrofit.GET("/api/read/job-read-level-student-groups") Future>> getJobLevelStudentGroups(@the_retrofit.Query("account") String account); // 作业 => 优先批阅,优先批阅列表 @the_retrofit.GET("/api/read/job-read-level") Future>> getJobReadLevel( @the_retrofit.Query("GroupId") String groupId, @the_retrofit.Query("ReadLevel") int readLevel); // 作业 => 取消/设置优先 @the_retrofit.POST("/api/read/jc-job-read-level") Future getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params); // 作业 => 取消收藏 @the_retrofit.POST("/api/jobs/de-fav-student-job") Future getJobDeFavorites( @the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage); // 作业 => 学生作业详情历史 @the_retrofit.GET("/api/read/student-job-history") Future> getStudentJobHistory( @the_retrofit.Query("StudentId") int studentId, @the_retrofit.Query("IsPaper") bool isPaper, @the_retrofit.Query("DateStart") String? dateStart, @the_retrofit.Query("DateEnd") String? dateEnd, @the_retrofit.Query("Page") int page, @the_retrofit.Query("PageSize") int pageSize, ); // 作业 => 知识点掌握 @the_retrofit.GET("/api/jobs/knowledge-report") Future>> getKnowledgeReport( @the_retrofit.Query("dateStart") String? dateStart, @the_retrofit.Query("dateEnd") String? dateEnd, @the_retrofit.Query("knowledgeName") String? knowledgeName, ); // 作业 => 知识点掌握详情 @the_retrofit.GET("/api/jobs/knowledge-detail-report") Future>> getKnowledgeReportDetail( @the_retrofit.Query("KnowledgeId") int knowledgeId, ); // 作业 => 知识点掌握详情人员名单 @the_retrofit.GET("/api/jobs/knowledge-question-detail/{questionid}") Future>> getKnowledgeStudent( @the_retrofit.Path("questionid") int questionid, ); // 作业 => 知识点掌握详情原卷图 @the_retrofit.GET("/api/jobs/question-paper-img/{sectionid}/{questionno}") Future> getKnowledgeImg( @the_retrofit.Path("sectionid") int questionid, @the_retrofit.Path("questionno") String questionno, ); // 作业 => 获取学生原稿笔记 @the_retrofit.GET("/api/jobs/student-paper-handwriting") Future?> getHandwriting( @the_retrofit.Query("jobId") int jobId, @the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("questionNo") int? questionNo, @the_retrofit.Query("pageNum") int? pageNum, ); // 注册 @the_retrofit.POST("/auth/login/reg") Future> toRegister(@the_retrofit.Body() UserLoginParams params); // 是否显示注册 @the_retrofit.GET("/auth/login/status/reg") Future> showRegister(); // 是否显示注销 @the_retrofit.GET("/auth/login/status/lg") Future> showLogOff(); // 注销账号 @the_retrofit.POST("/auth/login/lg") Future getLogOff(@the_retrofit.Field("loginName") String loginName); }