diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/department/controller/DepartmentController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/department/controller/DepartmentController.java index d4024e3b..cc12c99a 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/department/controller/DepartmentController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/department/controller/DepartmentController.java @@ -30,9 +30,9 @@ public class DepartmentController { private final DepartmentService departmentService; @GetMapping - @ApiOperation(value = "Get All Department By Status") + @ApiOperation(value = "Get All Departments By Status") public ResponseEntity>> getAllDepartmentsByStatus( - final DepartmentStatus status) { + @RequestParam final DepartmentStatus status) { final List departmentResponses = departmentService.getAllDepartmentsByStatus(status); return successResponse(departmentResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/department/repository/impl/scripts/DepartmentSqlScripts.java b/src/main/java/com/graduationproject/studentinformationsystem/university/department/repository/impl/scripts/DepartmentSqlScripts.java index b1714a86..33dfb310 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/department/repository/impl/scripts/DepartmentSqlScripts.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/department/repository/impl/scripts/DepartmentSqlScripts.java @@ -1,7 +1,7 @@ package com.graduationproject.studentinformationsystem.university.department.repository.impl.scripts; import com.graduationproject.studentinformationsystem.common.util.sql.SisSqlUtil; -import com.graduationproject.studentinformationsystem.university.officer.model.enums.OfficerStatus; +import com.graduationproject.studentinformationsystem.university.department.model.enums.DepartmentStatus; import static com.graduationproject.studentinformationsystem.university.department.model.mapping.DepartmentMapping.DEPARTMENT_ID; @@ -99,7 +99,7 @@ private DepartmentSqlScripts() { .isExistByColumnNameAndStatus("UNIV_DEPARTMENT", DEPARTMENT_ID.getColumnName(), DEPARTMENT_ID.getModelName(), - OfficerStatus.DELETED.toString()); + DepartmentStatus.DELETED.toString()); /** * SELECT CASE WHEN MAX(DEPARTMENT_ID) IS NULL THEN 'false' ELSE 'true' END IS_EXIST @@ -109,7 +109,7 @@ private DepartmentSqlScripts() { .isExistByColumnNameAndStatus("UNIV_DEPARTMENT", DEPARTMENT_ID.getColumnName(), DEPARTMENT_ID.getModelName(), - OfficerStatus.PASSIVE.toString()); + DepartmentStatus.PASSIVE.toString()); /** * SELECT CASE WHEN MAX(DEPARTMENT_ID) IS NULL THEN 'false' ELSE 'true' END IS_EXIST @@ -119,5 +119,5 @@ private DepartmentSqlScripts() { .isExistByColumnNameAndStatus("UNIV_DEPARTMENT", DEPARTMENT_ID.getColumnName(), DEPARTMENT_ID.getModelName(), - OfficerStatus.ACTIVE.toString()); + DepartmentStatus.ACTIVE.toString()); } diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/faculty/controller/FacultyController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/faculty/controller/FacultyController.java index 17967fab..c9f92f34 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/faculty/controller/FacultyController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/faculty/controller/FacultyController.java @@ -30,9 +30,9 @@ public class FacultyController { private final FacultyService facultyService; @GetMapping - @ApiOperation(value = "Get All Faculty By Status") + @ApiOperation(value = "Get All Faculties By Status") public ResponseEntity>> getAllFacultiesByStatus( - final FacultyStatus status) { + @RequestParam final FacultyStatus status) { final List facultyResponses = facultyService.getAllFacultiesByStatus(status); return successResponse(facultyResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/common/controller/LessonController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/common/controller/LessonController.java index acf6783a..9570df8a 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/common/controller/LessonController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/common/controller/LessonController.java @@ -30,9 +30,9 @@ public class LessonController { private final LessonService lessonService; @GetMapping - @ApiOperation(value = "Get All Lesson By Status") + @ApiOperation(value = "Get All Lessons By Status") public ResponseEntity>> getAllFacultiesByStatus( - final LessonStatus status) { + @RequestParam final LessonStatus status) { final List lessonResponses = lessonService.getAllLessonsByStatus(status); return successResponse(lessonResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/TeacherLessonController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/TeacherLessonController.java index bf3fc502..20042399 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/TeacherLessonController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/TeacherLessonController.java @@ -38,10 +38,10 @@ public ResponseEntity>> getAllTea return successResponse(lessonResponses); } - @GetMapping(TeacherLessonControllerEndpoint.GET) + @GetMapping(TeacherLessonControllerEndpoint.GET_BY_TEACHER_ID) @ApiOperation(value = "Get Teacher All Lessons By Teacher ID") public ResponseEntity>> getTeacherLessonsById( - @RequestParam final Long teacherId) { + @PathVariable final Long teacherId) { final List lessonResponses = lessonService.getTeacherLessonsById(teacherId); return successResponse(lessonResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/endpoint/TeacherLessonControllerEndpoint.java b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/endpoint/TeacherLessonControllerEndpoint.java index 6bcd5b9c..50e5836f 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/endpoint/TeacherLessonControllerEndpoint.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/controller/endpoint/TeacherLessonControllerEndpoint.java @@ -5,8 +5,8 @@ public class TeacherLessonControllerEndpoint { private TeacherLessonControllerEndpoint() { } - public static final String TEACHER_ID = "/{teacherId}"; - public static final String GET = "/get"; + private static final String TEACHER_ID = "/{teacherId}"; + public static final String GET_BY_TEACHER_ID = "/get" + TEACHER_ID; public static final String SAVE = "/save"; public static final String DELETE = "/delete"; } diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/model/mapping/TeacherLessonMapping.java b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/model/mapping/TeacherLessonMapping.java index 37968860..9165475c 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/model/mapping/TeacherLessonMapping.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/lesson/teacher/model/mapping/TeacherLessonMapping.java @@ -13,12 +13,6 @@ public enum TeacherLessonMapping { TEACHER_ID("TEACHER_ID", "teacherId"), LESSON_ID("LESSON_ID", "lessonId"), - DEPARTMENT_ID("DEPARTMENT_ID", "departmentId"), - NAME("NAME", "name"), - SEMESTER("SEMESTER", "semester"), - CREDIT("CREDIT", "credit"), - COMPULSORY_OR_ELECTIVE("COMPULSORY_OR_ELECTIVE", "compulsoryOrElective"), - STATUS("STATUS", "status"), CREATED_DATE("CREATED_DATE", "createdDate"), CREATED_USER_ID("CREATED_USER_ID", "createdUserId"); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/officer/controller/OfficerController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/officer/controller/OfficerController.java index 2d275723..2449e455 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/officer/controller/OfficerController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/officer/controller/OfficerController.java @@ -33,9 +33,9 @@ public class OfficerController { private final OfficerService officerService; @GetMapping - @ApiOperation(value = "Get All Officer By Status") + @ApiOperation(value = "Get All Officers By Status") public ResponseEntity>> getAllOfficersByStatus( - final OfficerStatus status) { + @RequestParam final OfficerStatus status) { final List infoResponses = officerService.getAllOfficersByStatus(status); return successResponse(infoResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/student/controller/StudentController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/student/controller/StudentController.java index 93091096..f87c9bbb 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/student/controller/StudentController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/student/controller/StudentController.java @@ -33,9 +33,9 @@ public class StudentController { private final StudentService studentService; @GetMapping - @ApiOperation(value = "Get All Student By Status") + @ApiOperation(value = "Get All Students By Status") public ResponseEntity>> getAllStudentsByStatus( - final StudentStatus status) { + @RequestParam final StudentStatus status) { final List infoResponses = studentService.getAllStudentsByStatus(status); return successResponse(infoResponses); diff --git a/src/main/java/com/graduationproject/studentinformationsystem/university/teacher/controller/TeacherController.java b/src/main/java/com/graduationproject/studentinformationsystem/university/teacher/controller/TeacherController.java index 8f496a08..8f1acf6b 100644 --- a/src/main/java/com/graduationproject/studentinformationsystem/university/teacher/controller/TeacherController.java +++ b/src/main/java/com/graduationproject/studentinformationsystem/university/teacher/controller/TeacherController.java @@ -33,9 +33,9 @@ public class TeacherController { private final TeacherService teacherService; @GetMapping - @ApiOperation(value = "Get All Teacher By Status") + @ApiOperation(value = "Get All Teachers By Status") public ResponseEntity>> getAllTeachersByStatus( - final TeacherStatus status) { + @RequestParam final TeacherStatus status) { final List infoResponses = teacherService.getAllTeachersByStatus(status); return successResponse(infoResponses);