diff --git a/src/main/java/capstone/bookitty/common/RedisConfig.java b/src/main/java/capstone/bookitty/common/RedisConfig.java index 4fc245a..204ee86 100644 --- a/src/main/java/capstone/bookitty/common/RedisConfig.java +++ b/src/main/java/capstone/bookitty/common/RedisConfig.java @@ -33,7 +33,7 @@ public class RedisConfig { @Value("${spring.redis.timeout:60000}") private long timeout; - @Value("${spring.redis.cache.ttl:1800}") + @Value("${spring.redis.cache.ttl:10800}") //TTL = 3시간 private long cacheTtl; @Bean diff --git a/src/main/java/capstone/bookitty/domain/controller/BookStateController.java b/src/main/java/capstone/bookitty/domain/controller/BookStateController.java index dc149e4..3fda5be 100644 --- a/src/main/java/capstone/bookitty/domain/controller/BookStateController.java +++ b/src/main/java/capstone/bookitty/domain/controller/BookStateController.java @@ -59,6 +59,17 @@ public ResponseEntity getStateById( bookStateService.findStateByStateId(stateId))); } + @Operation(summary = "isbn과 memberId로 책 상태 가져오기") + @GetMapping(path = "/isbn/{isbn}/member/{member-id}") + public ResponseEntity getStateByMemberIdAndIsbn( + @PathVariable("member-id") Long memberId, + @PathVariable("isbn") String isbn + ){ + return ResponseEntity.ok() + .body(new ResponseCounter( + bookStateService.findStateByMemberAndIsbn(isbn,memberId))); + } + @Operation(summary = "memberId로 책 상태 리스트 가져오기 / page는 requestParam으로 요청할 수 있습니다. / "+ "size(한 페이지 당 element 수, default = 10), page(요청하는 페이지, 0부터 시작)") @GetMapping(path = "/member/{member-id}") @@ -90,6 +101,7 @@ public ResponseEntity updateState( bookStateService.updateState(stateId,request))); } + @Operation(summary = "state 삭제") @DeleteMapping(path = "/{state-id}") public ResponseEntity deleteState( diff --git a/src/main/java/capstone/bookitty/domain/controller/OpenApiBookController.java b/src/main/java/capstone/bookitty/domain/controller/OpenApiBookController.java index e639aa0..68d26b1 100644 --- a/src/main/java/capstone/bookitty/domain/controller/OpenApiBookController.java +++ b/src/main/java/capstone/bookitty/domain/controller/OpenApiBookController.java @@ -1,10 +1,7 @@ package capstone.bookitty.domain.controller; import capstone.bookitty.domain.service.OpenApiBookService; -import capstone.bookitty.global.api.dto.AladinBestSellerResponseDTO; -import capstone.bookitty.global.api.dto.AladinBookListResponseDTO; -import capstone.bookitty.global.api.dto.AladinBookSearchResponseDTO; -import capstone.bookitty.global.api.dto.NaruPopularBookListDto; +import capstone.bookitty.global.api.dto.*; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -14,6 +11,8 @@ import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Mono; +import java.util.List; + @Tag(name = "openApi(book)", description = "알라딘 api 입니다.") @RestController @RequiredArgsConstructor @@ -66,11 +65,18 @@ public Mono getBestSellerBlogChoice(){ return openApiBookService.getBlogChoice(); } - @Operation(summary = "사용자별 도서 추천 Top 10") - @GetMapping(path = "/recommend/members/{member-id}") - public NaruPopularBookListDto getRecommendationByAgeAndGender( + //@Operation(summary = "사용자별 도서 추천 Top 10") + //@GetMapping(path = "/recommend/members/{member-id}") + /*public NaruPopularBookListDto getRecommendationByAgeAndGender( @PathVariable("member-id") Long memberId ){ return openApiBookService.getGenderAndAgeRecommendation(memberId); + }*/ + + @Operation(summary = "사용자별 도서 추천 Top 10") + @GetMapping(path = "/recommend/members/{member-id}") + public NaruPopularBookListDto getRecommendations( + @PathVariable("member-id") long memberId) { + return openApiBookService.getTop10ForMember(memberId); } } diff --git a/src/main/java/capstone/bookitty/domain/controller/StarController.java b/src/main/java/capstone/bookitty/domain/controller/StarController.java index 9fbadb1..a142db0 100644 --- a/src/main/java/capstone/bookitty/domain/controller/StarController.java +++ b/src/main/java/capstone/bookitty/domain/controller/StarController.java @@ -81,6 +81,17 @@ public ResponseEntity getStarByMemberId( starService.findStarByMemberId(memberId,pageable))); } + @Operation(summary = "member id와 isbn으로 평점 가져오기") + @GetMapping(path = "/member/{member-id}/isbn/{isbn}") + public ResponseEntity getStarByIsbnAndMemberId( + @PathVariable("isbn") String isbn, + @PathVariable("member-id") Long memberId + ){ + return ResponseEntity.ok() + .body(new ResponseCounter( + starService.findStarByMemberIdAndIsbn(memberId,isbn))); + } + @Operation(summary = "평점 수정") @PatchMapping(path="/{star-id}") public ResponseEntity updateStar( diff --git a/src/main/java/capstone/bookitty/domain/entity/Gender.java b/src/main/java/capstone/bookitty/domain/entity/Gender.java index a0bc820..d54de08 100644 --- a/src/main/java/capstone/bookitty/domain/entity/Gender.java +++ b/src/main/java/capstone/bookitty/domain/entity/Gender.java @@ -4,9 +4,6 @@ @RequiredArgsConstructor public enum Gender { - MALE("남성"), - FEMALE("여성") - ; - - private final String gender; + MALE, FEMALE } + diff --git a/src/main/java/capstone/bookitty/domain/repository/BookStateRepository.java b/src/main/java/capstone/bookitty/domain/repository/BookStateRepository.java index 4bf3d5b..6c45e63 100644 --- a/src/main/java/capstone/bookitty/domain/repository/BookStateRepository.java +++ b/src/main/java/capstone/bookitty/domain/repository/BookStateRepository.java @@ -1,12 +1,14 @@ package capstone.bookitty.domain.repository; import capstone.bookitty.domain.entity.BookState; +import capstone.bookitty.domain.entity.Gender; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; - -import javax.swing.text.html.Option; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import java.time.LocalDate; import java.util.List; import java.util.Optional; @@ -17,5 +19,12 @@ public interface BookStateRepository extends JpaRepository { List findByMemberId(Long memberId); boolean existsByMemberIdAndIsbn(Long memberId, String isbn); Optional findByMemberIdAndIsbn(Long memberId, String isbn); + @Query("SELECT b.isbn, COUNT(b) as stateCount " + + "FROM BookState b " + + "WHERE b.member.gender = :gender AND b.member.birthDate BETWEEN :startDate AND :endDate " + + "GROUP BY b.isbn") + List findStateCountByGenderAndBirthDate(@Param("gender") Gender gender, + @Param("startDate") LocalDate startDate, + @Param("endDate") LocalDate endDate); } \ No newline at end of file diff --git a/src/main/java/capstone/bookitty/domain/repository/StarRepository.java b/src/main/java/capstone/bookitty/domain/repository/StarRepository.java index a88734e..857fb6a 100644 --- a/src/main/java/capstone/bookitty/domain/repository/StarRepository.java +++ b/src/main/java/capstone/bookitty/domain/repository/StarRepository.java @@ -1,14 +1,28 @@ package capstone.bookitty.domain.repository; +import capstone.bookitty.domain.entity.BookState; +import capstone.bookitty.domain.entity.Gender; import capstone.bookitty.domain.entity.Star; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import java.time.LocalDate; import java.util.List; +import java.util.Optional; public interface StarRepository extends JpaRepository { boolean existsByMemberIdAndIsbn(Long memberId, String isbn); Page findByIsbn(String isbn, Pageable pageable); Page findByMemberId(Long memberId, Pageable pageable); + Optional findByMemberIdAndIsbn(Long memberId, String isbn); + @Query("SELECT s.isbn, SUM(s.score) as totalScore " + + "FROM Star s " + + "WHERE s.member.gender = :gender AND s.member.birthDate BETWEEN :startDate AND :endDate " + + "GROUP BY s.isbn") + List findTotalScoreByGenderAndBirthDate(@Param("gender") Gender gender, + @Param("startDate") LocalDate startDate, + @Param("endDate") LocalDate endDate); } diff --git a/src/main/java/capstone/bookitty/domain/service/BookStateService.java b/src/main/java/capstone/bookitty/domain/service/BookStateService.java index 246ed45..8529c28 100644 --- a/src/main/java/capstone/bookitty/domain/service/BookStateService.java +++ b/src/main/java/capstone/bookitty/domain/service/BookStateService.java @@ -65,6 +65,13 @@ public Page findStateByISBN(String isbn, Pageable pageable) { .map(StateInfoResponse::of); } + public StateInfoResponse findStateByMemberAndIsbn(String isbn, Long memberId){ + BookState state = stateRepository.findByMemberIdAndIsbn(memberId,isbn) + .orElseThrow(()-> new EntityNotFoundException( + "BookState with memberID:"+memberId+",Isbn:"+isbn+"not found.")); + return StateInfoResponse.of(state); + } + public StateInfoResponse findStateByStateId(Long stateId) { return stateRepository.findById(stateId) .map(StateInfoResponse::of) diff --git a/src/main/java/capstone/bookitty/domain/service/OpenApiBookService.java b/src/main/java/capstone/bookitty/domain/service/OpenApiBookService.java index e812b9d..1af7f18 100644 --- a/src/main/java/capstone/bookitty/domain/service/OpenApiBookService.java +++ b/src/main/java/capstone/bookitty/domain/service/OpenApiBookService.java @@ -2,11 +2,10 @@ import capstone.bookitty.domain.entity.Gender; import capstone.bookitty.domain.entity.Member; +import capstone.bookitty.domain.repository.BookStateRepository; import capstone.bookitty.domain.repository.MemberRepository; -import capstone.bookitty.global.api.dto.AladinBestSellerResponseDTO; -import capstone.bookitty.global.api.dto.AladinBookListResponseDTO; -import capstone.bookitty.global.api.dto.AladinBookSearchResponseDTO; -import capstone.bookitty.global.api.dto.NaruPopularBookListDto; +import capstone.bookitty.domain.repository.StarRepository; +import capstone.bookitty.global.api.dto.*; import capstone.bookitty.global.api.openApi.AladinOpenApi; import capstone.bookitty.global.api.openApi.NaruOpenApi; import jakarta.persistence.EntityNotFoundException; @@ -17,6 +16,10 @@ import java.time.LocalDate; import java.time.Period; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; @Service @RequiredArgsConstructor @@ -25,6 +28,8 @@ public class OpenApiBookService { private final AladinOpenApi aladinOpenApi; private final NaruOpenApi naruOpenApi; private final MemberRepository memberRepository; + private final StarRepository starRepository; + private final BookStateRepository bookStateRepository; public Mono searchByBookISBN(String isbn) { return aladinOpenApi.searchByBookISBN(isbn); @@ -54,15 +59,101 @@ public Mono getBlogChoice() { return aladinOpenApi.getBlogChoice(); } - @Cacheable(value = "genderAndAge", key = "#a0",unless="#result == null") - public NaruPopularBookListDto getGenderAndAgeRecommendation(Long memberId) { + @Cacheable(value = "bookRecommendations", key = "#a0",unless="#result == null") + public NaruPopularBookListDto getTop10ForMember(long memberId) { Member member = memberRepository.findById(memberId) - .orElseThrow(() -> new EntityNotFoundException("Member not found for ID: " + memberId)); + .orElseThrow(() -> new IllegalArgumentException("Invalid member ID")); - int gender = (member.getGender() == Gender.MALE) ? 1 : 2; - int age = Period.between(member.getBirthDate(), LocalDate.now()).getYears(); - age = (age / 10) * 10; + Gender gender = member.getGender(); + LocalDate birthDate = member.getBirthDate(); + int age = Period.between(birthDate, LocalDate.now()).getYears(); + String ageGroup = determineAgeGroup(age); - return naruOpenApi.getPopularBook(gender, age); + List top10IsbnList = getTop10IsbnForMember(gender, ageGroup); + List bookInfoList = top10IsbnList.stream() + .map(this::searchByBookISBN) + .map(mono -> mono.block()) // Mono를 block하여 동기적으로 결과를 가져오기 + .map(this::convertToNaruPopularBookDto) + .collect(Collectors.toList()); + + // 각 책의 랭킹을 설정 + for (int i = 0; i < bookInfoList.size(); i++) { + bookInfoList.get(i).getDoc().setRanking(i + 1); + } + + NaruPopularBookListDto responseWrapper = new NaruPopularBookListDto(); + NaruPopularBookListDto.PopularBookListResponse response = new NaruPopularBookListDto.PopularBookListResponse(); + response.setResultNum(bookInfoList.size()); + response.setDocs(bookInfoList); + responseWrapper.setResponse(response); + + return responseWrapper; + } + + private String determineAgeGroup(int age) { + if (age <= 20) { + return "TEEN"; + } else if (age <= 40) { + return "ADULT"; + } else { + return "MIDDLE_AGED"; + } + } + + private NaruPopularBookDto convertToNaruPopularBookDto(AladinBookListResponseDTO aladinBook) { + NaruPopularBookDto dto = new NaruPopularBookDto(); + NaruPopularBookDto.PopularBook popularBook = new NaruPopularBookDto.PopularBook(); + + AladinBookListResponseDTO.DetailBook detailBook = aladinBook.getItem().get(0); // 첫 번째 책 정보 사용 + popularBook.setBookname(detailBook.getTitle()); + popularBook.setAuthors(detailBook.getAuthor()); + popularBook.setPublisher(detailBook.getPublisher()); + popularBook.setIsbn13(detailBook.getIsbn13()); + popularBook.setBookImageURL(detailBook.getCover()); + + dto.setDoc(popularBook); + return dto; + } + + private List getTop10IsbnForMember(Gender gender, String ageGroup) { + LocalDate endDate = LocalDate.now(); + LocalDate startDate; + + switch (ageGroup) { + case "TEEN": + startDate = endDate.minusYears(20); + break; + case "ADULT": + startDate = endDate.minusYears(40); + break; + case "MIDDLE_AGED": + startDate = endDate.minusYears(60); + break; + default: + throw new IllegalArgumentException("Invalid age group"); + } + + List totalScores = starRepository.findTotalScoreByGenderAndBirthDate(gender, startDate, endDate); + List stateCounts = bookStateRepository.findStateCountByGenderAndBirthDate(gender, startDate, endDate); + + Map isbnScores = new HashMap<>(); + + for (Object[] scoreData : totalScores) { + String isbn = (String) scoreData[0]; + Double score = (Double) scoreData[1]; + isbnScores.put(isbn, score); + } + + for (Object[] stateData : stateCounts) { + String isbn = (String) stateData[0]; + Long count = (Long) stateData[1]; + isbnScores.merge(isbn, count * 5.0, Double::sum); + } + + return isbnScores.entrySet().stream() + .sorted((e1, e2) -> e2.getValue().compareTo(e1.getValue())) + .limit(10) + .map(Map.Entry::getKey) + .collect(Collectors.toList()); } } diff --git a/src/main/java/capstone/bookitty/domain/service/StarService.java b/src/main/java/capstone/bookitty/domain/service/StarService.java index fba9ed8..b489421 100644 --- a/src/main/java/capstone/bookitty/domain/service/StarService.java +++ b/src/main/java/capstone/bookitty/domain/service/StarService.java @@ -80,4 +80,11 @@ public Page findAllStar(Pageable pageable) { return starRepository.findAll(pageable) .map(StarInfoResponse::of); } + + public StarInfoResponse findStarByMemberIdAndIsbn(Long memberId, String isbn) { + Star star = starRepository.findByMemberIdAndIsbn(memberId,isbn) + .orElseThrow(()-> new EntityNotFoundException( + "Star with memberID:"+memberId+",Isbn:"+isbn+"not found.")); + return StarInfoResponse.of(star); + } } diff --git a/src/main/java/capstone/bookitty/global/api/dto/AladinBookListResponseDTO.java b/src/main/java/capstone/bookitty/global/api/dto/AladinBookListResponseDTO.java index 2cf420b..8ad3b88 100644 --- a/src/main/java/capstone/bookitty/global/api/dto/AladinBookListResponseDTO.java +++ b/src/main/java/capstone/bookitty/global/api/dto/AladinBookListResponseDTO.java @@ -1,11 +1,15 @@ package capstone.bookitty.global.api.dto; +import lombok.Getter; + import java.util.List; +@Getter public class AladinBookListResponseDTO { public List item; + @Getter public static class DetailBook { public String title; public String link; diff --git a/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookDto.java b/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookDto.java index b37e926..9f7f00a 100644 --- a/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookDto.java +++ b/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookDto.java @@ -8,6 +8,8 @@ public class NaruPopularBookDto { public PopularBook doc; + @Getter + @Setter public static class PopularBook { public String bookname; public String authors; @@ -15,6 +17,5 @@ public static class PopularBook { public int ranking; public String isbn13; public String bookImageURL; - } } diff --git a/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookListDto.java b/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookListDto.java index a8cc184..beb80a0 100644 --- a/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookListDto.java +++ b/src/main/java/capstone/bookitty/global/api/dto/NaruPopularBookListDto.java @@ -5,10 +5,13 @@ import java.util.List; -@Getter @Setter +@Getter +@Setter public class NaruPopularBookListDto { public PopularBookListResponse response; + @Getter + @Setter public static class PopularBookListResponse { public int resultNum; public List docs; diff --git a/src/main/java/capstone/bookitty/global/api/dto/ResponseWrapper.java b/src/main/java/capstone/bookitty/global/api/dto/ResponseWrapper.java new file mode 100644 index 0000000..d86567e --- /dev/null +++ b/src/main/java/capstone/bookitty/global/api/dto/ResponseWrapper.java @@ -0,0 +1,19 @@ +package capstone.bookitty.global.api.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class ResponseWrapper { + private Response response; + + @Getter + @Setter + public static class Response { + private int resultNum; + private List docs; + } +} diff --git a/src/main/java/capstone/bookitty/initDB.java b/src/main/java/capstone/bookitty/initDB.java index 6a8beac..a347cd4 100644 --- a/src/main/java/capstone/bookitty/initDB.java +++ b/src/main/java/capstone/bookitty/initDB.java @@ -19,7 +19,7 @@ public class initDB { private final InitService initService; - //@PostConstruct + @PostConstruct public void init(){ initService.dbInit(); } @@ -47,9 +47,9 @@ public void dbInit(){ new Member("안지성", "dkswltjd@gmail.com", pwEncoder.encode("Wo1902!si11"), null, Gender.MALE, LocalDate.of(2002, 8, 8)), new Member("황예린", "ghkddPfls@gmail.com", pwEncoder.encode("Wo1902!si12"), null, Gender.FEMALE, LocalDate.of(1991, 11, 28)), new Member("송현우", "thdgusdn@gmail.com", pwEncoder.encode("Wo1902!si13"), null, Gender.MALE, LocalDate.of(1999, 9, 8)), - new Member("정우진", "wjddnwls@gmail.com", pwEncoder.encode("Wo1902!si14"), null, Gender.MALE, LocalDate.of(2004, 1, 13)), + new Member("정우진", "wjddnwls@gmail.com", pwEncoder.encode("Wo1902!si14"), null, Gender.MALE, LocalDate.of(1964, 1, 13)), new Member("서은우", "tjdnsdmj@gmail.com", pwEncoder.encode("Wo1902!si15"), null, Gender.MALE, LocalDate.of(2008, 2, 20)), - new Member("이예진","dldPwls@gmail.com", pwEncoder.encode("Testtest123!"),null,Gender.FEMALE,LocalDate.of(2001,2,16)) + new Member("이예진","dldPwls@gmail.com", pwEncoder.encode("Wo1902!si16"),null,Gender.FEMALE,LocalDate.of(2001,2,16)) ); for (Member member : members) { @@ -58,21 +58,107 @@ public void dbInit(){ // Stars List stars = Arrays.asList( - new Star(members.get(0), "9791189327156", 4.5), - new Star(members.get(1), "9791189327156", 3.0), - new Star(members.get(2), "9791189327156", 5.0), - new Star(members.get(3), "9791189327156", 4.0), - new Star(members.get(4), "9788901276533", 2.5), - new Star(members.get(5), "9788901276533", 3.5), + new Star(members.get(0), "9791189327156", 3.0), + new Star(members.get(1), "9791189327156", 5.0), + new Star(members.get(2), "9791189327156", 4.0), + new Star(members.get(3), "9791189327156", 5.0), + new Star(members.get(4), "9788901276533", 4.0), + new Star(members.get(5), "9788901276533", 4.0), new Star(members.get(6), "9788901276533", 4.0), - new Star(members.get(7), "9788957365793", 5.0), - new Star(members.get(8), "9788957365793", 1.5), - new Star(members.get(9), "9788957365793", 3.0), - new Star(members.get(10), "9791162203620", 4.5), - new Star(members.get(11), "9791162203620", 4.0), + new Star(members.get(7), "9788957365793", 3.0), + new Star(members.get(8), "9788957365793", 2.0), + new Star(members.get(9), "9788957365793", 4.0), + new Star(members.get(10), "9791162203620", 5.0), + new Star(members.get(11), "9791162203620", 3.0), new Star(members.get(12), "9791162203620", 3.0), - new Star(members.get(13), "9791190313186", 5.0), - new Star(members.get(14), "9791190313186", 2.0) + new Star(members.get(13), "9791190313186", 3.0), + new Star(members.get(14), "9791190313186", 4.0), + new Star(members.get(15), "9791190313186", 4.0), + //추가 + new Star(members.get(0), "9791198632647",5.0), + new Star(members.get(1), "9791141600778", 5.0), + new Star(members.get(2), "9791198517425", 4.0), + new Star(members.get(3), "9788998441012", 5.0), + new Star(members.get(4), "9788932473901", 5.0), + new Star(members.get(5), "9791193904046", 5.0), + new Star(members.get(6), "9791130649672", 4.0), + new Star(members.get(7), "9788998441012", 5.0), + new Star(members.get(8), "9791198517425", 5.0), + new Star(members.get(9), "9791141600778", 5.0), + new Star(members.get(10), "9791193904046", 4.0), + new Star(members.get(11), "9788934942740", 4.0), + new Star(members.get(12), "9791198632647", 5.0), + new Star(members.get(13), "9788932473901", 5.0), + new Star(members.get(14), "9791191013634", 5.0), + new Star(members.get(15), "9788901283470", 5.0), + + new Star(members.get(0), "9788954697941",5.0), + new Star(members.get(1), "9788932473901", 4.0), + new Star(members.get(2), "9791193154274", 5.0), + new Star(members.get(3), "9791193528129", 4.0), + new Star(members.get(4), "9788932473901", 4.0), + new Star(members.get(5), "9788937460586", 4.0), + new Star(members.get(6), "9791168341890", 5.0), + new Star(members.get(7), "9791192389325", 5.0), + new Star(members.get(8), "9791130646381", 5.0), + new Star(members.get(9), "9788937460586", 5.0), + new Star(members.get(10), "9788954697941", 5.0), + new Star(members.get(11), "9791130646381", 5.0), + new Star(members.get(12), "9791168341890", 4.0), + new Star(members.get(13), "9791193154274", 4.0), + new Star(members.get(14), "9791193528129", 4.0), + new Star(members.get(15), "9791190182560", 4.0), + + new Star(members.get(0), "9788954636834",5.0), + new Star(members.get(1), "9791190313186", 4.0), + new Star(members.get(2), "9791192372600", 5.0), + new Star(members.get(3), "9788997575169", 4.0), + new Star(members.get(4), "9791171712014", 5.0), + new Star(members.get(5), "9788954636834", 3.0), + new Star(members.get(6), "9788932042787", 4.0), + new Star(members.get(7), "9788997575169", 5.0), + new Star(members.get(8), "9788937437564", 3.0), + new Star(members.get(9), "9788934972204", 3.0), + new Star(members.get(10), "9791190313186", 4.0), + new Star(members.get(11), "9788937437564", 4.0), + new Star(members.get(12), "9791192372600", 3.0), + new Star(members.get(13), "9791158510619", 5.0), + new Star(members.get(14), "9788932042787", 4.0), + new Star(members.get(15), "9791171712014", 4.0), + + new Star(members.get(0), "9791198340924",5.0), + new Star(members.get(1), "9788954695053", 3.0), + new Star(members.get(2), "9788947549363", 5.0), + new Star(members.get(3), "9791168340855", 4.0), + new Star(members.get(4), "9791191114591", 4.0), + new Star(members.get(5), "9788954696012", 4.0), + new Star(members.get(6), "9791191114591", 4.0), + new Star(members.get(7), "9791193869093", 5.0), + new Star(members.get(8), "9788954695053", 5.0), + new Star(members.get(9), "9788947549363", 3.0), + new Star(members.get(10), "9791193869093", 4.0), + new Star(members.get(11), "9788954681155", 4.0), + new Star(members.get(12), "9788954442718", 3.0), + new Star(members.get(13), "9788954696012", 5.0), + new Star(members.get(14), "9791198340924", 4.0), + new Star(members.get(15), "9788954681155", 4.0), + + new Star(members.get(0), "9791167741448",5.0), + new Star(members.get(1), "9788936439545", 4.0), + new Star(members.get(2), "9791167961709", 5.0), + new Star(members.get(3), "9788955965254", 4.0), + new Star(members.get(4), "9788937438363", 4.0), + new Star(members.get(5), "9788937443848", 3.0), + new Star(members.get(6), "9791167961709", 4.0), + new Star(members.get(7), "9791193063484", 5.0), + new Star(members.get(8), "9791162203620", 5.0), + new Star(members.get(9), "9788934971351", 3.0), + new Star(members.get(10), "9791167741448", 4.0), + new Star(members.get(11), "9791190090261", 4.0), + new Star(members.get(12), "9788937438363", 3.0), + new Star(members.get(13), "9788955965254", 5.0), + new Star(members.get(14), "9788937443848", 2.0), + new Star(members.get(15), "9791193063484", 4.0) ); for (Star star : stars) {