文档:注释翻译为中文
This commit is contained in:
parent
4c8a1da4f8
commit
8f1c8815d7
@ -44,7 +44,7 @@ public class LeaveRequestService {
|
|||||||
System.out.println("提交请假失败:数据库插入失败");
|
System.out.println("提交请假失败:数据库插入失败");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
System.out.println("提交请假成功:ID=" + request.getId());
|
System.out.println("提交请假成功:ID=" + request.getId() + " 学生:" + student.getName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,12 +27,12 @@ public class StudentService {
|
|||||||
*/
|
*/
|
||||||
public Student login(String studentId, String password) {
|
public Student login(String studentId, String password) {
|
||||||
Student student = studentDAO.findByStudentId(studentId);
|
Student student = studentDAO.findByStudentId(studentId);
|
||||||
System.out.println("Login attempt - StudentID: " + studentId);
|
System.out.println("尝试登录 - 学号: " + studentId);
|
||||||
System.out.println("Student found: " + (student != null));
|
System.out.println("找到学生:" + (student != null));
|
||||||
if (student != null) {
|
if (student != null) {
|
||||||
System.out.println("Stored password: " + student.getPassword());
|
System.out.println("存储密码:" + student.getPassword());
|
||||||
System.out.println("Input password: " + password);
|
System.out.println("输入密码:" + password);
|
||||||
System.out.println("Password match: " + password.equals(student.getPassword()));
|
System.out.println("密码匹配:" + password.equals(student.getPassword()));
|
||||||
}
|
}
|
||||||
if (student != null && password.equals(student.getPassword())) {
|
if (student != null && password.equals(student.getPassword())) {
|
||||||
return student;
|
return student;
|
||||||
|
@ -19,12 +19,12 @@ public class TeacherService {
|
|||||||
*/
|
*/
|
||||||
public Teacher login(String teacherId, String password) {
|
public Teacher login(String teacherId, String password) {
|
||||||
Teacher teacher = teacherDAO.findByTeacherId(teacherId);
|
Teacher teacher = teacherDAO.findByTeacherId(teacherId);
|
||||||
System.out.println("Login attempt - TeacherID: " + teacherId);
|
System.out.println("尝试登录:教师工号:" + teacherId);
|
||||||
System.out.println("Teacher found: " + (teacher != null));
|
System.out.println("教师存在:" + (teacher != null));
|
||||||
if (teacher != null) {
|
if (teacher != null) {
|
||||||
System.out.println("Stored password: " + teacher.getPassword());
|
System.out.println("存储密码:" + teacher.getPassword());
|
||||||
System.out.println("Input password: " + password);
|
System.out.println("输入密码:" + password);
|
||||||
System.out.println("Password match: " + password.equals(teacher.getPassword()));
|
System.out.println("密码匹配:" + password.equals(teacher.getPassword()));
|
||||||
}
|
}
|
||||||
if (teacher != null && password.equals(teacher.getPassword())) {
|
if (teacher != null && password.equals(teacher.getPassword())) {
|
||||||
return teacher;
|
return teacher;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user