1、swagger接口文档

beetlsql3-dev
陈沅 1 year ago
parent fccfe3d7e3
commit 09fe5e33eb

@ -47,4 +47,6 @@ public interface UniversitiesCollegesDao extends BaseMapper<UniversitiesColleges
List<Map<String,Object>> findAllUniversitiesColleges();
List<UniversitiesColleges> getAll();
}

@ -96,6 +96,18 @@ public class UniversitiesColleges extends BaseEntity {
private Long userId ;
//智云2.0ID
private Long oldSchoolId;
public Long getOldSchoolId() {
return oldSchoolId;
}
public void setOldSchoolId(Long oldSchoolId) {
this.oldSchoolId = oldSchoolId;
}
public UniversitiesColleges(){
}

@ -361,4 +361,8 @@ public class UniversitiesCollegesService extends CoreBaseService<UniversitiesCol
public List<Map<String,Object>> findAll(){
return universitiesCollegesDao.findAllUniversitiesColleges();
}
public List<UniversitiesColleges> getAll(){
return universitiesCollegesDao.getAll();
}
}

@ -389,7 +389,7 @@ public class TestController {
" JOIN EduColleges col ON stu.CollegeId = col.Id " +
" JOIN EduMajors maj ON stu.MajorId = maj.Id " +
" JOIN EduSchools sch ON stu.SchoolId = sch.Id " +
" JOIN EduClasses cla ON stu.ClassId = cla.Id where sch.Id = 117";
" JOIN EduClasses cla ON stu.ClassId = cla.Id";
ps = conn.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery();
while (resultSet.next()) {
@ -399,7 +399,7 @@ public class TestController {
student.setStudentMobile(resultSet.getString(6));
String username = resultSet.getString(5);
Map<String, Object> studentByNo = coreUserService.getStudentByNo(username);
if(studentByNo!=null){
if (studentByNo != null) {
continue;
}
int anInt = resultSet.getInt(7);
@ -526,4 +526,28 @@ public class TestController {
// e.printStackTrace();
// }
// }
@ApiOperation("修改学校2.0ID")
@PostMapping("updateOldSchoolId.json")
public void updateOldSchoolId() throws SQLException {
List<UniversitiesColleges> colleges = universitiesCollegesService.getAll();
Connection connection = openConn();
PreparedStatement ps = null;
Long a = 1000L;
for (UniversitiesColleges colleges1 : colleges) {
String sql = "select * from EduSchools where Name = '" + colleges1.getUniversitiesCollegesName() + "' and IsDeleted = 0";
ps = connection.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery();
Long oldId=null;
while (resultSet.next()) {
oldId = resultSet.getLong("id");
}
if(oldId==null){
oldId = a++;
}
colleges1.setOldSchoolId(oldId);
universitiesCollegesService.updateTemplate(colleges1);
}
}
}

@ -196,4 +196,4 @@ select class_id as id,class_name as name from school_class where university_syst
getClassesBySchoolId
===
select class_id as id,class_name as name from school_class where universities_colleges_id = #schoolId#
select 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#

@ -2214,4 +2214,4 @@ pagedListStudentInfoByClassId
findAllBySchoolId
===
select * from student join universities_colleges uc on student.org_id = uc.org_id where universities_colleges_id = #schoolId#
select * from student join universities_colleges uc on student.org_id = uc.org_id where old_school_id = #schoolId#

@ -561,4 +561,4 @@ getTeacherUserInfoRuleInfo
findAllTeacherBySchoolId
===
select * from teacher where universities_colleges_id =#schoolId#
select * from teacher join universities_colleges on teacher.universities_colleges_id=universities_colleges.universities_colleges_id where old_school_id =#schoolId#

@ -282,4 +282,8 @@ getAllUniversitiesColleges
findAllUniversitiesColleges
===
select universities_colleges_id as id,universities_colleges_name as name from universities_colleges
select old_school_id as id,universities_colleges_name as name from universities_colleges
getAll
===
select * from universities_colleges
Loading…
Cancel
Save