diff --git a/src/DataService/ExamTypeSubjectInterface.php b/src/DataService/ExamTypeSubjectInterface.php index c9e0ffb..d95ae10 100644 --- a/src/DataService/ExamTypeSubjectInterface.php +++ b/src/DataService/ExamTypeSubjectInterface.php @@ -37,6 +37,15 @@ interface ExamTypeSubjectInterface */ public function getSubjectsByRegionExamType(int $regionId, int $examTypeId): array; + /** + * App 平台方法:指定地区+招考类型下的科目列表。 + * region_id=0 聚合全部地区去重;具体地区同时包含通用关系(region_id=0)。 + * @param int $regionId 招考地区ID,0=全部 + * @param int $examTypeId 招考类型ID + * @return array + */ + public function appGetSubjectsByRegionExamType(int $regionId, int $examTypeId): array; + /** * 获取多个适用地区共同可用的科目,避免调用方分别查询后自行求交集。 * @param int[] $regionIds diff --git a/src/DataService/RegionExamTypeInterface.php b/src/DataService/RegionExamTypeInterface.php index 879d5de..e4a0c19 100644 --- a/src/DataService/RegionExamTypeInterface.php +++ b/src/DataService/RegionExamTypeInterface.php @@ -34,6 +34,14 @@ interface RegionExamTypeInterface */ public function getExamTypesByRegion(int $regionId): array; + /** + * App 平台方法:指定地区可用的招考类型列表。 + * 全国类型始终包含;地区专属类型仅返回该地区启用关系,展示名优先使用地区别名。 + * @param int $regionId 招考地区ID,0=全部 + * @return array + */ + public function appGetExamTypesByRegion(int $regionId): array; + /** * 覆盖设置招考类型的适用地区(多选地区一次性写入) * @param int $examTypeId 招考类型ID diff --git a/src/DataService/RegionInterface.php b/src/DataService/RegionInterface.php index dafefab..7b3a3b2 100644 --- a/src/DataService/RegionInterface.php +++ b/src/DataService/RegionInterface.php @@ -14,6 +14,13 @@ interface RegionInterface public function appGetRegionCampus(int $id): array; + /** + * App 招考地区菜单(V2):首项固定 id=0/region_id=0 表示全部,不再输出历史全国值 1。 + * @param array $params 兼容分页/过滤参数 + * @return array + */ + public function appGetRegionsV2(array $params = []): array; + public function getRegionBy(int $id): array; public function createRegion(array $data): int; diff --git a/src/ExamService/CampusRelationInterface.php b/src/ExamService/CampusRelationInterface.php index e02b6bd..8e3173e 100644 --- a/src/ExamService/CampusRelationInterface.php +++ b/src/ExamService/CampusRelationInterface.php @@ -11,8 +11,27 @@ interface CampusRelationInterface */ public function getCampusRelationData(int $campusId = 1, int $examTypeId = 1, int $subjectId = 1, int $userId = 0): array; + /** + * App 平台方法:首页级联数据(地区/招考类型/科目/题型分类)。 + * @param int $regionId 招考地区ID,0=全部 + * @param int $examTypeId 招考类型ID,0=不限制 + * @param int $subjectId 考试科目ID,0=不限制 + * @param int $userId 用户ID,0=未登录 + * @return array + */ + public function appGetCampusRelationData(int $regionId = 0, int $examTypeId = 0, int $subjectId = 0, int $userId = 0): array; + /** * 按条件获取题型分类树. */ public function getCategoriesByConditions(int $campusId, int $examTypeId, int $subjectId): array; + + /** + * App 平台方法:指定地区+招考类型+科目下的题型分类树。 + * @param int $regionId 招考地区ID,0=全部 + * @param int $examTypeId 招考类型ID + * @param int $subjectId 考试科目ID + * @return array + */ + public function appGetCategoriesByRegionExamTypeSubject(int $regionId, int $examTypeId, int $subjectId): array; }