diff --git a/src/main/java/khu/bigdata/infou/business/LectureConverter.java b/src/main/java/khu/bigdata/infou/business/LectureConverter.java index e3a6ee1..55206b2 100644 --- a/src/main/java/khu/bigdata/infou/business/LectureConverter.java +++ b/src/main/java/khu/bigdata/infou/business/LectureConverter.java @@ -2,6 +2,7 @@ import khu.bigdata.infou.domain.LectureDetail; import khu.bigdata.infou.domain.LectureUdemy; +import khu.bigdata.infou.domain.PlatformStudent; import khu.bigdata.infou.web.dto.LectureResponseDTO; import java.util.List; @@ -79,8 +80,31 @@ public static LectureResponseDTO.LectureDetailDto toLectureDetailDto(LectureUdem .practice(lectureDetail.getPractice()) .rating(lectureDetail.getRating()) .level(lectureDetail.getLevel()) - .topword1(lectureUdemy.getTopic()) - .topword2(lectureUdemy.getSubcategory()) + .build(); + } + + public static LectureResponseDTO.OtherStudentsListInfo toOtherStudentInfo(PlatformStudent student) { + + return LectureResponseDTO.OtherStudentsListInfo.builder() + .inflearnUserId(Long.valueOf(student.getInflearnUserId())) + .udemyUserId(Long.valueOf(student.getUdemyUserId())) + .name(student.getName()) + .topword1(student.getTopword1()) + .topword2(student.getTopword2()) + .topword3(student.getTopword3()) + .topword4(student.getTopword4()) + .topword5(student.getTopword5()) + .build(); + } + + public static LectureResponseDTO.OtherStudentsDto toOtherStudentsDto(List students) { + + List studentInfos = students.stream() + .map(LectureConverter::toOtherStudentInfo) + .collect(Collectors.toList()); + + return LectureResponseDTO.OtherStudentsDto.builder() + .studentList(studentInfos) .build(); } } diff --git a/src/main/java/khu/bigdata/infou/domain/LectureDetail.java b/src/main/java/khu/bigdata/infou/domain/LectureDetail.java index 02b278d..7c180e0 100644 --- a/src/main/java/khu/bigdata/infou/domain/LectureDetail.java +++ b/src/main/java/khu/bigdata/infou/domain/LectureDetail.java @@ -1,7 +1,6 @@ package khu.bigdata.infou.domain; import jakarta.persistence.*; -import khu.bigdata.infou.domain.enums.LectureType; import lombok.*; import org.hibernate.annotations.DynamicInsert; @@ -11,16 +10,18 @@ @DynamicInsert @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) // 생성 로직 규정 -@Table(name = "lecture_detail", indexes = { - @Index(name = "idx_lecture_id", columnList = "lectureId")}) +@Table(name = "lecture_detail") public class LectureDetail { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; - @Column(name = "lecture_id", nullable = false) - private Integer lectureId; + @Column(name = "lecture_udemy_id", nullable = false) + private Integer lectureUdemyId; + + @Column(name = "lecture_inflearn_id", nullable = false) + private Integer lectureInflearnId; @Column(name = "good", nullable = false) private Integer good; @@ -43,13 +44,9 @@ public class LectureDetail { @Column(name = "level", nullable = false) private Float level; - @Enumerated(EnumType.STRING) - @Column(name = "lecture_type", nullable = false) - private LectureType lectureType; - - @OneToOne(fetch = FetchType.LAZY) - private LectureInflearn lectureInflearn; - - @OneToOne(fetch = FetchType.LAZY) - private LectureUdemy lectureUdemy; +// @OneToOne(fetch = FetchType.LAZY) +// private LectureInflearn lectureInflearn; +// +// @OneToOne(fetch = FetchType.LAZY) +// private LectureUdemy lectureUdemy; } diff --git a/src/main/java/khu/bigdata/infou/domain/LectureInflearn.java b/src/main/java/khu/bigdata/infou/domain/LectureInflearn.java index 2eed125..d1c5aeb 100644 --- a/src/main/java/khu/bigdata/infou/domain/LectureInflearn.java +++ b/src/main/java/khu/bigdata/infou/domain/LectureInflearn.java @@ -17,70 +17,66 @@ public class LectureInflearn { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "lecture_inflearn_id") - private int lectureInflearnId; + @Column(name = "id") + private int id; - @Column(name = "slug", columnDefinition = "TEXT") - private String slug; - - @Column(name = "thumbnailUrl", columnDefinition = "TEXT") - private String thumbnailUrl; - - @Column(name = "title", columnDefinition = "TEXT") - private String title; + @Column(name = "lecture_id", nullable = false) + private int lectureId; @Column(name = "description", columnDefinition = "TEXT") private String description; - @Column(name = "reviewCount") - private int reviewCount; + @Column(name = "instructor_id") + private int instructorId; - @Column(name = "studentCount") - private int studentCount; + @Column(name = "instructor_name", length = 50) + private String instructorName; - @Column(name = "likeCount") - private int likeCount; + @Column(name = "review_count") + private int reviewCount; @Column(name = "star") private float star; - @Column(name = "isExclusive") - private boolean isExclusive; + @Column(name = "level", length = 20) + private String level; - @Column(name = "isNew") - private boolean isNew; + @Column(name = "first_category", length = 255) + private String firstCategory; - @Column(name = "isUpdated") - private boolean isUpdated; + @Column(name = "second_category", length = 255) + private String secondCategory; - @Column(name = "updatedAt") - @Temporal(TemporalType.DATE) - private Date updatedAt; + @Column(name = "skill_tag", length = 255) + private String skillTag; - @Column(name = "publishedAt") - @Temporal(TemporalType.DATE) - private Date publishedAt; + @Column(name = "price") + private int price; - @Column(name = "metadata", columnDefinition = "JSON") - private String metadata; + @Column(name = "student_count") + private int studentCount; - @Column(name = "instructor_id") - private int instructorId; + @Column(name = "thumbnail_url", columnDefinition = "TEXT") + private String thumbnailUrl; - @Column(name = "instructor_name", length = 50) - private String instructorName; + @Column(name = "title", columnDefinition = "TEXT") + private String title; + + @Column(name = "updated_at") + @Temporal(TemporalType.DATE) + private Date updatedAt; - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "platform_student_lecture_id") - private PlatformStudentLecture platformStudentLecture; +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "platform_student_lecture_id") +// private PlatformStudentLecture platformStudentLecture; - public void setPlatformStudentLecture(PlatformStudentLecture platformStudentLecture) { - if (this.platformStudentLecture != null) { - this.platformStudentLecture.getLectureInflearnList().remove(this); - } - this.platformStudentLecture = platformStudentLecture; - } +// public void setPlatformStudentLecture(PlatformStudentLecture platformStudentLecture) { +// if (this.platformStudentLecture != null) { +// this.platformStudentLecture.getLectureInflearnList().remove(this); +// } +// this.platformStudentLecture = platformStudentLecture; +// } // getters and setters } diff --git a/src/main/java/khu/bigdata/infou/domain/LectureTag.java b/src/main/java/khu/bigdata/infou/domain/LectureTag.java index 8d3626d..aee67c6 100644 --- a/src/main/java/khu/bigdata/infou/domain/LectureTag.java +++ b/src/main/java/khu/bigdata/infou/domain/LectureTag.java @@ -38,9 +38,9 @@ public class LectureTag { @Column(name = "topword5", length = 20) private String topword5; - @OneToOne(fetch = FetchType.LAZY) - private LectureInflearn lectureInflearn; - - @OneToOne(fetch = FetchType.LAZY) - private LectureUdemy lectureUdemy; +// @OneToOne(fetch = FetchType.LAZY) +// private LectureInflearn lectureInflearn; +// +// @OneToOne(fetch = FetchType.LAZY) +// private LectureUdemy lectureUdemy; } diff --git a/src/main/java/khu/bigdata/infou/domain/LectureUdemy.java b/src/main/java/khu/bigdata/infou/domain/LectureUdemy.java index 3954ee2..24840df 100644 --- a/src/main/java/khu/bigdata/infou/domain/LectureUdemy.java +++ b/src/main/java/khu/bigdata/infou/domain/LectureUdemy.java @@ -16,7 +16,7 @@ public class LectureUdemy { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "lecture_udemy_id") + @Column(name = "id") private int id; @Column(name = "lecture_id", nullable = false) @@ -73,18 +73,18 @@ public class LectureUdemy { @Column(name = "thumbnail", columnDefinition = "TEXT") private String thumbnail; - @ManyToOne(fetch = FetchType.LAZY) - private PlatformStudentLecture platformStudentLecture; +// @ManyToOne(fetch = FetchType.LAZY) +// private PlatformStudentLecture platformStudentLecture; - @OneToOne(mappedBy = "lectureUdemy") - private LectureTag lectureTag; +// @OneToOne(mappedBy = "lectureUdemy") +// private LectureTag lectureTag; - public void setPlatformStudentLecture(PlatformStudentLecture platformStudentLecture) { - if (this.platformStudentLecture != null) { - this.platformStudentLecture.getLectureUdemyList().remove(this); - } - this.platformStudentLecture = platformStudentLecture; - } +// public void setPlatformStudentLecture(PlatformStudentLecture platformStudentLecture) { +// if (this.platformStudentLecture != null) { +// this.platformStudentLecture.getLectureUdemyList().remove(this); +// } +// this.platformStudentLecture = platformStudentLecture; +// } // getters and setters diff --git a/src/main/java/khu/bigdata/infou/domain/PlatformStudent.java b/src/main/java/khu/bigdata/infou/domain/PlatformStudent.java index 2923f89..7945c39 100644 --- a/src/main/java/khu/bigdata/infou/domain/PlatformStudent.java +++ b/src/main/java/khu/bigdata/infou/domain/PlatformStudent.java @@ -1,7 +1,6 @@ package khu.bigdata.infou.domain; import jakarta.persistence.*; -import khu.bigdata.infou.domain.enums.UserType; import lombok.*; import org.hibernate.annotations.DynamicInsert; @@ -18,10 +17,13 @@ public class PlatformStudent { @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; - @Column(name = "user_id", nullable = false) - private Integer userId; + @Column(name = "udemy_user_id", nullable = false) + private Integer udemyUserId; - @Column(name = "name", length = 30, nullable = false) + @Column(name = "inflearn_user_id", nullable = false) + private Integer inflearnUserId; + + @Column(name = "name", length = 50, nullable = false) private String name; @Column(name = "topword1", length = 20) @@ -38,8 +40,4 @@ public class PlatformStudent { @Column(name = "topword5", length = 20) private String topword5; - - @Enumerated(EnumType.STRING) - @Column(name = "user_type", nullable = false) - private UserType userType; } diff --git a/src/main/java/khu/bigdata/infou/domain/PlatformStudentLecture.java b/src/main/java/khu/bigdata/infou/domain/PlatformStudentLecture.java index 59cdf0f..b289682 100644 --- a/src/main/java/khu/bigdata/infou/domain/PlatformStudentLecture.java +++ b/src/main/java/khu/bigdata/infou/domain/PlatformStudentLecture.java @@ -5,8 +5,6 @@ import lombok.*; import org.hibernate.annotations.DynamicInsert; -import java.util.List; - @Entity @Getter @Builder @@ -23,14 +21,16 @@ public class PlatformStudentLecture { @Column(name = "user_id", nullable = false) private Integer userId; + @Column(name = "lecture_id", nullable = false) + private Integer lectureId; @Enumerated(EnumType.STRING) @Column(name = "user_type", nullable = false) - private UserType userType; - - @OneToMany(mappedBy = "platformStudentLecture") - private List lectureInflearnList; + private UserType platForm; - @OneToMany(mappedBy = "platformStudentLecture") - private List lectureUdemyList; +// @OneToMany(mappedBy = "platformStudentLecture") +// private List lectureInflearnList; +// +// @OneToMany(mappedBy = "platformStudentLecture") +// private List lectureUdemyList; } diff --git a/src/main/java/khu/bigdata/infou/implement/LectureService.java b/src/main/java/khu/bigdata/infou/implement/LectureService.java index d8ab677..d087aae 100644 --- a/src/main/java/khu/bigdata/infou/implement/LectureService.java +++ b/src/main/java/khu/bigdata/infou/implement/LectureService.java @@ -3,14 +3,19 @@ import khu.bigdata.infou.business.LectureConverter; import khu.bigdata.infou.domain.LectureDetail; import khu.bigdata.infou.domain.LectureUdemy; +import khu.bigdata.infou.domain.PlatformStudent; import khu.bigdata.infou.repository.LectureDetailRepository; import khu.bigdata.infou.repository.LectureInflearnRepository; import khu.bigdata.infou.repository.LectureUdemyRepository; +import khu.bigdata.infou.repository.PlatformStudentRepository; import khu.bigdata.infou.web.dto.LectureResponseDTO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -20,12 +25,15 @@ @Slf4j public class LectureService { + private final PlatformStudentRepository platformStudentRepository; private final LectureInflearnRepository lectureInflearnRepository; private final LectureUdemyRepository lectureUdemyRepository; private final LectureDetailRepository lectureDetailRepository; - // 카테고리별 추천 강좌 조회 + /** + * 카테고리별 추천 강좌 조회 + */ public LectureResponseDTO.CategoryRecommendLectureDto findRecommendedLectureByCategory(String category) { if (category == null) { @@ -37,12 +45,15 @@ public LectureResponseDTO.CategoryRecommendLectureDto findRecommendedLectureByCa // 일단 가져오고 상위 값 추출 List sortedList = lectureUdemyList.stream() .sorted(Comparator.comparingDouble((LectureUdemy lecture) -> lecture.getAvgRating() * lecture.getNumReviews()).reversed()) + .limit(1000) // 1000개로 제한 .collect(Collectors.toList()); return LectureConverter.toCategoryRecommendLectureDto(sortedList); } - // 선택된 키워드별 추천 강좌 조회 + /** + * 선택된 키워드별 추천 강좌 조회 + */ public LectureResponseDTO.KeywordRecommendLectureDto findRecommendedLectureByKeyword(String keyword) { // 키워드가 null이거나 빈 문자열인 경우에 대한 예외 처리 if (keyword == null || keyword.trim().isEmpty()) { @@ -55,13 +66,16 @@ public LectureResponseDTO.KeywordRecommendLectureDto findRecommendedLectureByKey // 조회된 강의 목록을 AvgRating과 NumReviews의 값을 곱한 값으로 내림차순 정렬 List sortedList = lectureUdemyList.stream() .sorted(Comparator.comparingDouble((LectureUdemy lecture) -> lecture.getAvgRating() * lecture.getNumReviews()).reversed()) + .limit(1000) // 1000개로 제한 .collect(Collectors.toList()); // 조회된 강의 목록을 DTO로 변환하여 반환 return LectureConverter.toKeywordRecommendLectureDto(sortedList); } - // 강좌 세부 조회 + /** + * 강좌 세부 조회 + */ public LectureResponseDTO.LectureDetailDto findLectureDetail(Integer lectureId) { // lectureId가 null인 경우에 대한 예외 처리 @@ -69,16 +83,41 @@ public LectureResponseDTO.LectureDetailDto findLectureDetail(Integer lectureId) throw new IllegalArgumentException("LectureId must not be null"); } - LectureUdemy lectureUdemy = lectureUdemyRepository.findByLectureId(Long.valueOf(lectureId)) + LectureUdemy lectureUdemy = lectureUdemyRepository.findByLectureId(lectureId) .orElseThrow(() -> new IllegalArgumentException("Lecture not found")); - LectureDetail lectureDetail = lectureDetailRepository.findByLectureId(Long.valueOf(lectureId)) + LectureDetail lectureDetail = lectureDetailRepository.findByLectureUdemyId(lectureId) .orElseThrow(() -> new IllegalArgumentException("Lecture detail not found")); return LectureConverter.toLectureDetailDto(lectureUdemy, lectureDetail); } + /** + * 다른 수강생들의 커리큘럼 전체 조회 + */ public LectureResponseDTO.OtherStudentsDto findOtherStudents() { - return null; + + Pageable pageable = PageRequest.of(0, 1000); + + // 쿼리 실행 + List topStudents = platformStudentRepository.findTopStudents(pageable); + + // 조회된 데이터를 List로 변환 + List studentList = new ArrayList<>(); + for (Object[] result : topStudents) { + Integer userId = (Integer) result[0]; + List students; + if (userId != null) { + students = platformStudentRepository.findByInflearnUserId(userId); + if (students.isEmpty()) { + students = platformStudentRepository.findByUdemyUserId(userId); + } + } else { + students = new ArrayList<>(); + } + studentList.addAll(students); + } + + return LectureConverter.toOtherStudentsDto(studentList); } public LectureResponseDTO.OtherLectureListDto findOtherLectureList() { diff --git a/src/main/java/khu/bigdata/infou/repository/LectureDetailRepository.java b/src/main/java/khu/bigdata/infou/repository/LectureDetailRepository.java index 90d1105..a70ccdc 100644 --- a/src/main/java/khu/bigdata/infou/repository/LectureDetailRepository.java +++ b/src/main/java/khu/bigdata/infou/repository/LectureDetailRepository.java @@ -1,14 +1,13 @@ package khu.bigdata.infou.repository; import khu.bigdata.infou.domain.LectureDetail; -import khu.bigdata.infou.domain.LectureUdemy; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; public interface LectureDetailRepository extends JpaRepository { - Optional findByLectureUdemy(LectureUdemy lectureUdemy); + Optional findByLectureUdemyId(Integer lectureId); - Optional findByLectureId(Long lectureId); + Optional findByLectureInflearnId(Integer lectureId); } diff --git a/src/main/java/khu/bigdata/infou/repository/LectureInflearnRepository.java b/src/main/java/khu/bigdata/infou/repository/LectureInflearnRepository.java index 76cebdc..fd4353f 100644 --- a/src/main/java/khu/bigdata/infou/repository/LectureInflearnRepository.java +++ b/src/main/java/khu/bigdata/infou/repository/LectureInflearnRepository.java @@ -3,6 +3,9 @@ import khu.bigdata.infou.domain.LectureInflearn; import org.springframework.data.jpa.repository.JpaRepository; +import java.util.Optional; + public interface LectureInflearnRepository extends JpaRepository { + Optional findByLectureId(Integer lectureId); } diff --git a/src/main/java/khu/bigdata/infou/repository/LectureUdemyRepository.java b/src/main/java/khu/bigdata/infou/repository/LectureUdemyRepository.java index 82eb4e7..ef9ab89 100644 --- a/src/main/java/khu/bigdata/infou/repository/LectureUdemyRepository.java +++ b/src/main/java/khu/bigdata/infou/repository/LectureUdemyRepository.java @@ -2,7 +2,6 @@ import khu.bigdata.infou.domain.LectureUdemy; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; import java.util.List; import java.util.Optional; @@ -10,11 +9,10 @@ public interface LectureUdemyRepository extends JpaRepository { - @Query("select l from LectureUdemy l left join fetch l.lectureTag where l.subcategory = :subcategory") List findAllBySubcategory(String subcategory); List findAllByTopic(String topic); - Optional findByLectureId(Long lectureId); + Optional findByLectureId(Integer lectureId); } diff --git a/src/main/java/khu/bigdata/infou/repository/PlatformStudentRepository.java b/src/main/java/khu/bigdata/infou/repository/PlatformStudentRepository.java index 121fc7c..392eef6 100644 --- a/src/main/java/khu/bigdata/infou/repository/PlatformStudentRepository.java +++ b/src/main/java/khu/bigdata/infou/repository/PlatformStudentRepository.java @@ -1,7 +1,22 @@ package khu.bigdata.infou.repository; import khu.bigdata.infou.domain.PlatformStudent; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; public interface PlatformStudentRepository extends JpaRepository { + + @Query("SELECT p.inflearnUserId AS userId, COUNT(p) AS cnt FROM PlatformStudent p WHERE p.inflearnUserId IS NOT NULL GROUP BY p.inflearnUserId " + + "UNION " + + "SELECT p.udemyUserId AS userId, COUNT(p) AS cnt FROM PlatformStudent p WHERE p.udemyUserId IS NOT NULL GROUP BY p.udemyUserId " + + "ORDER BY cnt DESC") + List findTopStudents(Pageable pageable); + + List findByInflearnUserId(Integer userId); + + List findByUdemyUserId(Integer userId); } + diff --git a/src/main/java/khu/bigdata/infou/web/controller/MainServiceController.java b/src/main/java/khu/bigdata/infou/web/controller/MainServiceController.java index f36ebd6..867232f 100644 --- a/src/main/java/khu/bigdata/infou/web/controller/MainServiceController.java +++ b/src/main/java/khu/bigdata/infou/web/controller/MainServiceController.java @@ -17,7 +17,7 @@ public class MainServiceController { private final LectureService lectureService; @GetMapping("/lectures/categories") - @Operation(summary = "카테고리별 추천 강좌 조회 API", description = "카테고리: Programming Language, Web Development, Game Development, Mobile Development, Data Science") + @Operation(summary = "카테고리별 추천 강좌 조회 API", description = "카테고리: Programming Languages, Web Development, Game Development, Mobile Development, Data Science") public ResponseEntity getRecommendedLectureByCategory( @RequestParam(name = "category") String category ) { @@ -42,11 +42,8 @@ public ResponseEntity getLectureDetail( return ResponseEntity.ok(lectureService.findLectureDetail(lectureId)); } - /** - * TODO - */ @GetMapping("/others") - @Operation(summary = "다른 수강생들의 커리큘럼 전체 조회 API") + @Operation(summary = "다른 수강생들의 커리큘럼 전체 조회 API", description = "다른 수강생들의 커리큘럼을 조회합니다.") public ResponseEntity getOtherStudents() { return ResponseEntity.ok(lectureService.findOtherStudents()); } diff --git a/src/main/java/khu/bigdata/infou/web/dto/LectureResponseDTO.java b/src/main/java/khu/bigdata/infou/web/dto/LectureResponseDTO.java index 202f6ca..a5513e0 100644 --- a/src/main/java/khu/bigdata/infou/web/dto/LectureResponseDTO.java +++ b/src/main/java/khu/bigdata/infou/web/dto/LectureResponseDTO.java @@ -24,8 +24,12 @@ public static class CategoryRecommendLectureInfo { private float price; private String instructorName; + // todo: topword1 ~ 5까지 추가 -> lecture_tag 테이블에서 가져오기 private String topword1; private String topword2; + private String topword3; + private String topword4; + private String topword5; } @@ -53,8 +57,12 @@ public static class KeywordRecommendLectureInfo { private float price; private String instructorName; + // todo: topword1 ~ 5까지 추가 -> lecture_tag 테이블에서 가져오기 private String topword1; private String topword2; + private String topword3; + private String topword4; + private String topword5; } @@ -81,7 +89,6 @@ public static class LectureDetailDto { private String instructorName; private String category; private String subcategory; - private Integer good; private Integer bad; private float teaching_quality; @@ -90,22 +97,32 @@ public static class LectureDetailDto { private float rating; private float level; - private String topword1; // topic - private String topword2; // subcategory } @Builder @Getter @NoArgsConstructor @AllArgsConstructor - public static class OtherStudentsDto { + public static class OtherStudentsListInfo { - private String userId; + private Long inflearnUserId; + private Long udemyUserId; private String name; - private String topword1; // topic - private String topword2; // subcategory - private String topword3; // (title + description) 가장 많이 나오는 단어 + private String topword1; + private String topword2; + private String topword3; + private String topword4; + private String topword5; + } + + @Builder + @Getter + @NoArgsConstructor + @AllArgsConstructor + public static class OtherStudentsDto { + + List studentList; } @Builder @@ -124,6 +141,8 @@ public static class OtherLectureListInfo { private String topword1; private String topword2; private String topword3; + private String topword4; + private String topword5; } @Builder @@ -132,14 +151,7 @@ public static class OtherLectureListInfo { @AllArgsConstructor public static class OtherLectureListDto { - // 강의 분석 관련 - private String userId; - private String name; - private String topword1; - private String topword2; - private String topword3; - - private List lectureList; // 강의 정보 관련 + private List otherLectureList; // 강의 정보 관련 } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 71b3b34..90971ea 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,7 +6,7 @@ spring: driver-class-name: com.mysql.cj.jdbc.Driver jpa: hibernate: - ddl-auto: update + ddl-auto: none properties: hibernate: dialect: org.hibernate.dialect.MySQL8Dialect