1、swagger接口文档

beetlsql3-dev
陈沅 1 year ago
parent e416e4e2f0
commit 92efa5694d

@ -129,4 +129,6 @@ public interface StudentDao extends BaseMapper<Student>{
List<Student> getNoBaseStudent(); List<Student> getNoBaseStudent();
List<String> findStudentNoByClassId(Long classId);
} }

@ -169,7 +169,7 @@ public class SchoolClassService extends CoreBaseService<SchoolClass> {
public SchoolClass getByOldId(Long oldClassId){ public SchoolClass getByOldId(Long oldClassId){
SchoolClassQuery query = new SchoolClassQuery(); SchoolClassQuery query = new SchoolClassQuery();
query.setOldId(oldClassId); query.setOldClassId(oldClassId);
return getFirst(getValuesByQueryNotWithPermission(query)); return getFirst(getValuesByQueryNotWithPermission(query));
} }

@ -1658,6 +1658,10 @@ public class StudentService extends CoreBaseService<Student> {
return dataList; return dataList;
} }
public List<String> findStudentNoByClassId(Long classId) {
return studentDao.findStudentNoByClassId(classId);
}
public List<Student> getAll(){ public List<Student> getAll(){
return studentDao.all(); return studentDao.all();
} }

@ -1035,4 +1035,17 @@ public class AccountController {
} }
return JsonResult.success(); return JsonResult.success();
} }
@ApiOperation("智云2.0接口:GetStudentNoByClassId")
@GetMapping("getStudentNoByClassId")
public JsonResult getStudentNoByClassId(Integer classId) {
if (classId != null) {
SchoolClass schoolClass = schoolClassService.getByOldId(Long.valueOf(classId));
if (schoolClass != null) {
List<String> studentNos = studentService.findStudentNoByClassId(schoolClass.getClassId());
return JsonResult.success(studentNos);
}
}
return JsonResult.success();
}
} }

@ -48,14 +48,14 @@ public class SchoolClassQuery extends PageParam {
@Query(name = "教师ID", display = false) @Query(name = "教师ID", display = false)
private Long teacherId; private Long teacherId;
private Long oldId; private Long oldClassId;
public Long getOldId() { public Long getOldClassId() {
return oldId; return oldClassId;
} }
public void setOldId(Long oldId) { public void setOldClassId(Long oldClassId) {
this.oldId = oldId; this.oldClassId = oldClassId;
} }
public Long getClassId(){ public Long getClassId(){
@ -143,7 +143,7 @@ public class SchoolClassQuery extends PageParam {
pojo.setAddTime(this.getAddTime()); pojo.setAddTime(this.getAddTime());
pojo.setOrgId(this.getOrgId()); pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setOldClassId(this.getOldId()); pojo.setOldClassId(this.getOldClassId());
return pojo; return pojo;
} }

@ -172,8 +172,8 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(userId)){ @if(!isEmpty(userId)){
and t.user_id =#userId# and t.user_id =#userId#
@} @}
@if(!isEmpty(oldId)){ @if(!isEmpty(oldClassId)){
and t.old_class_id =#oldId# and t.old_class_id =#oldClassId#
@} @}
getAllSchoolClass getAllSchoolClass

@ -2231,4 +2231,9 @@ select *
from student from student
where student_id not in (select student_account_asset_allocation.student_id where student_id not in (select student_account_asset_allocation.student_id
from student_account_asset_allocation from student_account_asset_allocation
group by student_account_asset_allocation.student_id) group by student_account_asset_allocation.student_id)
findStudentNoByClassId
===
select student_sn as studentNo from student where class_id =#classId#
Loading…
Cancel
Save