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