实现前端对学号和用户名的异步判断,核心技术为axios
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.fjy.spring.service;
|
||||
|
||||
import com.fjy.spring.domain.TbStudent;
|
||||
import com.fjy.spring.domain.TbStudentlist;
|
||||
import com.fjy.spring.domain.TbUser;
|
||||
import com.fjy.spring.repository.TbStudentListRepository;
|
||||
import com.fjy.spring.repository.TbStudentRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -13,4 +15,15 @@ public class StudentService {
|
||||
@Autowired
|
||||
private TbStudentRepository tbStudentRepository;
|
||||
|
||||
@Autowired
|
||||
private TbStudentListRepository tbStudentListRepository;
|
||||
|
||||
public TbStudentlist findStudentByNo(String studentno){
|
||||
return tbStudentListRepository.findByColstudentno(studentno);
|
||||
}
|
||||
|
||||
public TbStudentlist findByColstudentnoAndColrealname(String studentno,String realname){
|
||||
return tbStudentListRepository.findByColstudentnoAndColrealname(studentno,realname);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user