feat: Lecture 강의 상세보기시 강의 시간 조회 추가
This commit is contained in:
parent
1b709325b7
commit
c4373a24af
@ -15,7 +15,8 @@ import java.util.Date;
|
||||
@AllArgsConstructor
|
||||
public class Lecture {
|
||||
|
||||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column
|
||||
private Long id;
|
||||
|
||||
@ -29,6 +30,9 @@ public class Lecture {
|
||||
@Lob
|
||||
private String description;
|
||||
|
||||
@Lob
|
||||
private String plan;
|
||||
|
||||
@Column
|
||||
private String image;
|
||||
|
||||
@ -40,8 +44,8 @@ public class Lecture {
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date endDate;
|
||||
|
||||
@Lob
|
||||
private String plan;
|
||||
@Column
|
||||
private String time;
|
||||
|
||||
@Column
|
||||
private boolean online;
|
||||
|
@ -15,10 +15,12 @@ public class LectureCreateRequest {
|
||||
|
||||
private String description;
|
||||
|
||||
private String plan;
|
||||
|
||||
private Date startDate;
|
||||
|
||||
private Date endDate;
|
||||
|
||||
private String plan;
|
||||
private String time;
|
||||
|
||||
}
|
||||
|
@ -21,13 +21,15 @@ public class LectureDetailResponse {
|
||||
|
||||
private String description;
|
||||
|
||||
private String plan;
|
||||
|
||||
private String image;
|
||||
|
||||
private Date startDate;
|
||||
|
||||
private Date endDate;
|
||||
|
||||
private String plan;
|
||||
private String time;
|
||||
|
||||
private boolean online;
|
||||
|
||||
|
@ -43,9 +43,10 @@ public class LectureServiceImpl implements LectureService {
|
||||
.user(user)
|
||||
.title(lectureCreateRequest.getTitle())
|
||||
.description(lectureCreateRequest.getDescription())
|
||||
.plan(lectureCreateRequest.getPlan())
|
||||
.startDate(lectureCreateRequest.getStartDate())
|
||||
.endDate(lectureCreateRequest.getEndDate())
|
||||
.plan(lectureCreateRequest.getPlan())
|
||||
.time(lectureCreateRequest.getTime())
|
||||
.build();
|
||||
|
||||
if (image != null && !image.isEmpty()) {
|
||||
@ -81,14 +82,17 @@ public class LectureServiceImpl implements LectureService {
|
||||
if (lectureCreateRequest.getDescription() != null) {
|
||||
lecture.setDescription(lectureCreateRequest.getDescription());
|
||||
}
|
||||
if (lectureCreateRequest.getPlan() != null) {
|
||||
lecture.setPlan(lectureCreateRequest.getPlan());
|
||||
}
|
||||
if (lectureCreateRequest.getStartDate() != null) {
|
||||
lecture.setStartDate(lectureCreateRequest.getStartDate());
|
||||
}
|
||||
if (lectureCreateRequest.getEndDate() != null) {
|
||||
lecture.setEndDate(lectureCreateRequest.getEndDate());
|
||||
}
|
||||
if (lectureCreateRequest.getPlan() != null) {
|
||||
lecture.setPlan(lectureCreateRequest.getPlan());
|
||||
if (lectureCreateRequest.getTime() != null) {
|
||||
lecture.setTime(lectureCreateRequest.getTime());
|
||||
}
|
||||
|
||||
lectureRepository.save(lecture);
|
||||
@ -167,10 +171,11 @@ public class LectureServiceImpl implements LectureService {
|
||||
.id(lecture.get().getId())
|
||||
.title(lecture.get().getTitle())
|
||||
.description(lecture.get().getDescription())
|
||||
.plan(lecture.get().getPlan())
|
||||
.image(lecture.get().getImage())
|
||||
.startDate(lecture.get().getStartDate())
|
||||
.endDate(lecture.get().getEndDate())
|
||||
.plan(lecture.get().getPlan())
|
||||
.time(lecture.get().getTime())
|
||||
.online(lecture.get().isOnline())
|
||||
.teacherName(lecture.get().getUser().getName())
|
||||
.status(userStatus)
|
||||
|
Loading…
Reference in New Issue
Block a user