-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teacher Lesson Res Update | SIS-107 (#58)
* TeacherOutService Classes Have Been Updated * TeacherLessonResponse and TeacherLessonInfoConverter Classes Have Been Refactored
- Loading branch information
1 parent
68fcd58
commit 8c87201
Showing
4 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...duationproject/studentinformationsystem/university/teacher/service/TeacherOutService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.graduationproject.studentinformationsystem.university.teacher.service; | ||
|
||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.response.TeacherAcademicInfoResponse; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.response.TeacherInfoResponse; | ||
|
||
public interface TeacherOutService { | ||
|
||
TeacherAcademicInfoResponse getTeacherAcademicInfoResponse(Long teacherId); | ||
TeacherInfoResponse getTeacherInfoResponse(Long teacherId); | ||
} |
19 changes: 11 additions & 8 deletions
19
...oject/studentinformationsystem/university/teacher/service/impl/TeacherOutServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
package com.graduationproject.studentinformationsystem.university.teacher.service.impl; | ||
|
||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.converter.TeacherAcademicInfoConverter; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.converter.TeacherResponseConverter; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.response.TeacherAcademicInfoResponse; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.entity.TeacherAcademicInfoEntity; | ||
import com.graduationproject.studentinformationsystem.university.teacher.repository.TeacherAcademicInfoRepository; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.response.TeacherInfoResponse; | ||
import com.graduationproject.studentinformationsystem.university.teacher.model.dto.response.TeacherPersonalInfoResponse; | ||
import com.graduationproject.studentinformationsystem.university.teacher.service.TeacherAcademicInfoService; | ||
import com.graduationproject.studentinformationsystem.university.teacher.service.TeacherOutService; | ||
import com.graduationproject.studentinformationsystem.university.teacher.service.TeacherPersonalInfoService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class TeacherOutServiceImpl implements TeacherOutService { | ||
|
||
private final TeacherAcademicInfoRepository academicInfoRepository; | ||
private final TeacherAcademicInfoConverter academicInfoConverter; | ||
private final TeacherAcademicInfoService academicInfoService; | ||
private final TeacherPersonalInfoService personalInfoService; | ||
|
||
@Override | ||
public TeacherAcademicInfoResponse getTeacherAcademicInfoResponse(Long teacherId) { | ||
final TeacherAcademicInfoEntity entity = academicInfoRepository.getTeacherAcademicInfoById(teacherId); | ||
return academicInfoConverter.entityToResponse(entity); | ||
public TeacherInfoResponse getTeacherInfoResponse(Long teacherId) { | ||
final TeacherAcademicInfoResponse academicInfoResponse = academicInfoService.getTeacherAcademicInfoById(teacherId); | ||
final TeacherPersonalInfoResponse personalInfoResponse = personalInfoService.getTeacherPersonalInfoById(teacherId); | ||
return TeacherResponseConverter.infoResponsesToResponse(academicInfoResponse, personalInfoResponse); | ||
} | ||
} |