feat: Lecture 내 강의 조회 수정
This commit is contained in:
parent
e224f0096b
commit
09d86ebcdf
@ -205,12 +205,14 @@ public class LectureServiceImpl implements LectureService {
|
|||||||
for (Registration registration : registrationList) {
|
for (Registration registration : registrationList) {
|
||||||
Lecture lecture = registration.getLecture();
|
Lecture lecture = registration.getLecture();
|
||||||
|
|
||||||
LectureSearchResponse lectureSearchResponse = LectureSearchResponse.builder()
|
if (registration.getStatus() == RegistrationStatus.ACCEPTED) {
|
||||||
.id(lecture.getId())
|
LectureSearchResponse lectureSearchResponse = LectureSearchResponse.builder()
|
||||||
.title(lecture.getTitle())
|
.id(lecture.getId())
|
||||||
.image(lecture.getImage()).build();
|
.title(lecture.getTitle())
|
||||||
|
.image(lecture.getImage()).build();
|
||||||
|
|
||||||
myLectureList.add(lectureSearchResponse);
|
myLectureList.add(lectureSearchResponse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,16 +235,13 @@ public class LectureServiceImpl implements LectureService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Lecture l;
|
Lecture l;
|
||||||
l = lecture.get();
|
l = lecture.get();
|
||||||
if(l.isOnline())
|
if (l.isOnline()) {
|
||||||
{
|
l.setOnline(false);
|
||||||
l.setOnline(false);
|
} else {
|
||||||
}
|
l.setOnline(true);
|
||||||
else
|
}
|
||||||
{
|
|
||||||
l.setOnline(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lectureRepository.save(l);
|
lectureRepository.save(l);
|
||||||
|
Loading…
Reference in New Issue
Block a user