文档:注释翻译为中文

This commit is contained in:
seahi 2024-12-24 09:37:24 +08:00
parent 4c8a1da4f8
commit 8f1c8815d7
3 changed files with 11 additions and 11 deletions

View File

@ -44,7 +44,7 @@ public class LeaveRequestService {
System.out.println("提交请假失败:数据库插入失败");
return false;
}
System.out.println("提交请假成功ID=" + request.getId());
System.out.println("提交请假成功ID=" + request.getId() + " 学生:" + student.getName());
return true;
}

View File

@ -27,12 +27,12 @@ public class StudentService {
*/
public Student login(String studentId, String password) {
Student student = studentDAO.findByStudentId(studentId);
System.out.println("Login attempt - StudentID: " + studentId);
System.out.println("Student found: " + (student != null));
System.out.println("尝试登录 - 学号: " + studentId);
System.out.println("找到学生:" + (student != null));
if (student != null) {
System.out.println("Stored password: " + student.getPassword());
System.out.println("Input password: " + password);
System.out.println("Password match: " + password.equals(student.getPassword()));
System.out.println("存储密码:" + student.getPassword());
System.out.println("输入密码:" + password);
System.out.println("密码匹配:" + password.equals(student.getPassword()));
}
if (student != null && password.equals(student.getPassword())) {
return student;

View File

@ -19,12 +19,12 @@ public class TeacherService {
*/
public Teacher login(String teacherId, String password) {
Teacher teacher = teacherDAO.findByTeacherId(teacherId);
System.out.println("Login attempt - TeacherID: " + teacherId);
System.out.println("Teacher found: " + (teacher != null));
System.out.println("尝试登录:教师工号:" + teacherId);
System.out.println("教师存在:" + (teacher != null));
if (teacher != null) {
System.out.println("Stored password: " + teacher.getPassword());
System.out.println("Input password: " + password);
System.out.println("Password match: " + password.equals(teacher.getPassword()));
System.out.println("存储密码:" + teacher.getPassword());
System.out.println("输入密码:" + password);
System.out.println("密码匹配:" + password.equals(teacher.getPassword()));
}
if (teacher != null && password.equals(teacher.getPassword())) {
return teacher;