From 5444358a9e1bc53c6ab22bd0cbb2e1ae0b1c04ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B2=85?= <907037276@qq.com> Date: Sun, 24 Dec 2023 16:03:33 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81swagger=E6=8E=A5=E5=8F=A3=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ibeetl/jlw/dao/SchoolClassDao.java | 4 +++ .../jlw/service/SchoolClassService.java | 9 +++++++ .../com/ibeetl/jlw/web/AccountController.java | 6 +++++ web/src/main/resources/sql/jlw/schoolClass.md | 25 ++++++++++++++++++- 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/web/src/main/java/com/ibeetl/jlw/dao/SchoolClassDao.java b/web/src/main/java/com/ibeetl/jlw/dao/SchoolClassDao.java index 56f60bba..4fa8fb9e 100644 --- a/web/src/main/java/com/ibeetl/jlw/dao/SchoolClassDao.java +++ b/web/src/main/java/com/ibeetl/jlw/dao/SchoolClassDao.java @@ -40,4 +40,8 @@ public interface SchoolClassDao extends BaseMapper { List> getClassesBySchoolId(Long schoolId); + + ListgetClassesByOldSchoolId(Long oldSchoolId); + + List> getClassIdsByZhiyun(Long userId); } \ No newline at end of file diff --git a/web/src/main/java/com/ibeetl/jlw/service/SchoolClassService.java b/web/src/main/java/com/ibeetl/jlw/service/SchoolClassService.java index fd0c51fd..34496501 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/SchoolClassService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/SchoolClassService.java @@ -296,4 +296,13 @@ public class SchoolClassService extends CoreBaseService { public List getAll(){ return schoolClassDao.all(); } + + + public List getClassesByOldSchoolId(Long oldSchoolId){ + return schoolClassDao.getClassesByOldSchoolId(oldSchoolId); + } + + public List> getClassIdsByZhiyun(Long userId){ + return schoolClassDao.getClassIdsByZhiyun(userId); + } } \ No newline at end of file diff --git a/web/src/main/java/com/ibeetl/jlw/web/AccountController.java b/web/src/main/java/com/ibeetl/jlw/web/AccountController.java index 68bd559a..40bb691c 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/AccountController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/AccountController.java @@ -1087,4 +1087,10 @@ public class AccountController { HsValues hsValues = hsValuesService.findByCreateTime(createTime); return JsonResult.success(hsValues); } + + @ApiOperation("理财接口:获取教师授课班级列表") + @GetMapping("getClassIdsByZhiyun.json") + public JsonResult getClassIdsByZhiyun(Long userId) { + return JsonResult.success(schoolClassService.getClassIdsByZhiyun(userId)); + } } diff --git a/web/src/main/resources/sql/jlw/schoolClass.md b/web/src/main/resources/sql/jlw/schoolClass.md index de2b41b3..079f90d7 100644 --- a/web/src/main/resources/sql/jlw/schoolClass.md +++ b/web/src/main/resources/sql/jlw/schoolClass.md @@ -199,4 +199,27 @@ select class_id as id,class_name as name from school_class where university_syst getClassesBySchoolId === -select old_class_id as id,class_name as name from school_class join universities_colleges on school_class.universities_colleges_id=universities_colleges.universities_colleges_id where universities_colleges.old_school_id = #schoolId# \ No newline at end of file +select old_class_id as id,class_name as name from school_class join universities_colleges on school_class.universities_colleges_id=universities_colleges.universities_colleges_id where universities_colleges.old_school_id = #schoolId# + + +getClassesByOldSchoolId +=== +select* from school_class where universities_colleges_id = #oldSchoolId# + +getClassIdsByZhiyun +=== +SELECT +teacher.teacher_id as userId, +GROUP_CONCAT(DISTINCT school_class.class_id ORDER BY school_class.class_id SEPARATOR ',') AS class_ids, +3 as roleId +FROM +universities_colleges +JOIN +school_class ON universities_colleges.universities_colleges_id = school_class.universities_colleges_id +JOIN +teacher ON teacher.universities_colleges_id = universities_colleges.universities_colleges_id +WHERE teacher_id = #userId# +GROUP BY +teacher.teacher_id, universities_colleges.universities_colleges_id, universities_colleges.universities_colleges_name +ORDER BY +teacher.teacher_id; \ No newline at end of file