From 8944105945fa053736da3cd7720b3e50f866eaa4 Mon Sep 17 00:00:00 2001 From: oosedus Date: Thu, 25 Jul 2024 21:50:34 +0900 Subject: [PATCH 1/4] =?UTF-8?q?S3=20=EB=B2=84=ED=82=B7=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gradle/8.8/checksums/checksums.lock | Bin 17 -> 17 bytes .gradle/8.8/checksums/md5-checksums.bin | Bin 20847 -> 24347 bytes .gradle/8.8/checksums/sha1-checksums.bin | Bin 23681 -> 31187 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/8.8/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes build.gradle | 8 +++++ .../api/member/MemberController.java | 4 +-- .../likelion/MZConnent/config/S3Config.java | 31 ++++++++++++++++++ 9 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 src/main/java/likelion/MZConnent/config/S3Config.java diff --git a/.gradle/8.8/checksums/checksums.lock b/.gradle/8.8/checksums/checksums.lock index b35efe2aff0a5bda0f83f0f13792d1c6cccf7cf1..51b9879cb0050f29a04cf959751785bdd43b71da 100644 GIT binary patch literal 17 UcmZSXKG0g(lk~Za0Sp*(06KRC5dZ)H literal 17 UcmZSXKG0g(lk~Za0Rkoi06LrnHvj+t diff --git a/.gradle/8.8/checksums/md5-checksums.bin b/.gradle/8.8/checksums/md5-checksums.bin index bb41d80d47c06a94b615e0bdba189355b59cc1e5..12c57f59778f6b7aee6d1f85a9d8091ae098c313 100644 GIT binary patch literal 24347 zcmeI3i8ofy|G*#0zC=XUiVBe>NtQ?@+4p@5gJKxcr?0G$Ck19S%H4A2>%GeBp6&H$YOIsN^FjRTLhi$uyuY9>w@^BaYXGbyo{|9?lt=Yn-)>aL<>sriX5{GXmAJ`)oEo5Avc*c z&JW#5FX5~Dg6?06dFChEBdYR$Vj*{%k9pS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>(V=tOMci*y4 z=PM^NN?;8BE~=4u(dw}s<9PR*+2w2AFSJQVMjos-lloo3o}Doccw@ln>Psl zeqy!?{r$m9#3E())nTPt&|Xx?k7|59F8O=&cbWC=0^7nZRI@_}Bj5ibdOk!1sYd-A&B^h}$=gfsu8G;c z`|omOWWrWS*isGQ7q*;9?q!85SPe~l8)mDZR<$t=7Nr`hvCg<-$ZOb0Mb<&`X~vQ3 z_!&g~SfWEU+D5PE+0S=hJ(RQkBb)e6v}e#n>(!zYR6{9OGH{LS8Girrj_GO7W&grf zX$mk~#i$}$M;ec+cZ@4>?hESzzG~ZwcL+a123UoNVg$yAY}g;vN@IEES1PG@AS#B9 z*bsv;zZ(x$Q{p2Ru|kky2rFBA=Ey(Y6PA~M?4oQqc#@a~dd@WqsD`G|?toQxW{oaQ zCDA<7ZWtjWj|jnF=n^I=23z}nolm9NiH$mAe%2+jw~>*?6j+prW|9owH}a1I-9oFL WJR9*2d6@*pf!QjwmgxQ=jQ;^ztB9@u delta 165 zcmbQekMaE?#tkMCg8Ho!e(vpGwN8uy4E#1v?v+rOd{;tZGOwh;^Mh$)<7=laB(it-QqKRv`Wh#JUOw zlS>s6C%;qBpKPiKlvgyE%&R0ZITVPWDoODChXMu$mdcHaKg2g0ED+x8=%L360C3Pg ABme*a diff --git a/.gradle/8.8/checksums/sha1-checksums.bin b/.gradle/8.8/checksums/sha1-checksums.bin index 4dc390e7894422f0302092abcae4d8ed63c0f0e7..94075388511c68acc6c9d66beccf3de89d342b2c 100644 GIT binary patch literal 31187 zcmeI4X*gA1|L~6~V}>MzN&_;MDI!BEQ!*v9%tPjRh>DV_L6ZoH29ZJ{ks%Z^M}w4E zDk(#$C_Q_hwf6o$_c{J=&UL?ep6jd^JJ;v;{p|1B-@W!)>zuRidl!Mg$N3L7!v8d$ z|M`>p7qtS^3Q#LRtpK$G)Cy25K&=3^0@MmnD?qIPwF1-%P%A*K0JQ?t3Q#LRtpK$G z)C&CnQUNpMLRi4X@JZ65e{h5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;ZPV6Qu!~S=hrsg(I2P*Q=;#>1A>Et~{)~df z$)TfTC+VnLMqQ-fB6x<6d*Q(0y#II)uio>ycvB3dk9#@8n>ZLP$f?j8N4`Sp3-0_& zeDlAlT;sE%V5)*!DykM~V6hGaLCqqo3Ffq+VV!xM9U(hHi)H9Ahy+ixi5#vP8ncGN zA8#*Kn8bodTE`kYO@*u}FvcM_7Aqq-JZ4Ty+CC9vWKJz|TG6EC@YUjmHaE1VFi9V? iM4?C=(hhq&4)dHq)$ diff --git a/build.gradle b/build.gradle index d96cf3e..14a5bb3 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,14 @@ dependencies { // swagger implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + + // s3 + implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE' + + // 파일 업로드 + implementation 'commons-io:commons-io:2.6' + implementation 'commons-fileupload:commons-fileupload:1.4' + } tasks.named('test') { diff --git a/src/main/java/likelion/MZConnent/api/member/MemberController.java b/src/main/java/likelion/MZConnent/api/member/MemberController.java index 471c450..d4e54de 100644 --- a/src/main/java/likelion/MZConnent/api/member/MemberController.java +++ b/src/main/java/likelion/MZConnent/api/member/MemberController.java @@ -25,7 +25,7 @@ public ResponseEntity getMyInfo(@AuthenticationPrincipal Use MemberInfoResponse memberInfo = memberService.getMemberInfoByEmail(email); log.info("멤버 정보 조회 성공: {}", memberInfo.getUsername()); - + return ResponseEntity.ok(memberInfo); } @@ -38,4 +38,4 @@ public ResponseEntity getMemberInfo(@PathVariable("userId") return ResponseEntity.ok(memberInfo); } -} +} \ No newline at end of file diff --git a/src/main/java/likelion/MZConnent/config/S3Config.java b/src/main/java/likelion/MZConnent/config/S3Config.java new file mode 100644 index 0000000..50d29c9 --- /dev/null +++ b/src/main/java/likelion/MZConnent/config/S3Config.java @@ -0,0 +1,31 @@ +package likelion.MZConnent.config; + + +import com.amazonaws.auth.AWSCredentials; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3Client; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class S3Config { + @Value("${cloud.aws.credentials.access-key}") + private String accessKey; + @Value("${cloud.aws.credentials.secret-key}") + private String secretKey; + @Value("${cloud.aws.region.static}") + private String region; + + @Bean + public AmazonS3Client amazonS3Client(){ + BasicAWSCredentials awsCreds = new BasicAWSCredentials(accessKey, secretKey); + return (AmazonS3Client) AmazonS3ClientBuilder.standard() + .withRegion(region) + .withCredentials(new AWSStaticCredentialsProvider(awsCreds)) + .build(); + } +} From 728037ddaa47aa857348f05620b6c3c8700984ad Mon Sep 17 00:00:00 2001 From: oosedus Date: Thu, 25 Jul 2024 22:11:35 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=EB=AA=A8=EC=9E=84=20=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=9B=84=20=EC=B5=9C=EB=8C=80=20=EC=9D=B8=EC=9B=90?= =?UTF-8?q?=20=EB=8F=84=EB=8B=AC=EC=8B=9C=20=EB=AA=A8=EC=9E=84=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20CLOSE=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/likelion/MZConnent/service/club/ClubService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/likelion/MZConnent/service/club/ClubService.java b/src/main/java/likelion/MZConnent/service/club/ClubService.java index c0a7b35..80a958a 100644 --- a/src/main/java/likelion/MZConnent/service/club/ClubService.java +++ b/src/main/java/likelion/MZConnent/service/club/ClubService.java @@ -92,6 +92,10 @@ public void joinClub(Long clubId, Member member) { clubMemberRepository.save(clubMember); club.setCurrentParticipant(club.getCurrentParticipant() + 1); + + if(club.getCurrentParticipant() == club.getMaxParticipant()) { + club.setStatus("CLOSE"); + } } private void validateJoinClub(Club club, Member member) { From 48afe04574f4b39789a56b3170ab5a12f5f5d53a Mon Sep 17 00:00:00 2001 From: oosedus Date: Thu, 25 Jul 2024 23:24:45 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=EB=AA=A8=EC=9E=84=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=A0=95=EB=B3=B4=20=EC=A1=B0=ED=9A=8C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/8.8/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .../MZConnent/api/club/ClubController.java | 17 ++++ .../MZConnent/config/SecurityConfig.java | 3 +- .../MZConnent/dto/club/LeaderDto.java | 22 +++++ .../dto/club/SelfIntroductionDto.java | 18 ++++ .../dto/club/response/ClubDetailResponse.java | 55 ++++++++++++ .../service/club/ClubInfoService.java | 80 ++++++++++++++++++ .../MZConnent/service/club/ClubService.java | 3 +- 10 files changed, 195 insertions(+), 3 deletions(-) create mode 100644 src/main/java/likelion/MZConnent/dto/club/LeaderDto.java create mode 100644 src/main/java/likelion/MZConnent/dto/club/SelfIntroductionDto.java create mode 100644 src/main/java/likelion/MZConnent/dto/club/response/ClubDetailResponse.java create mode 100644 src/main/java/likelion/MZConnent/service/club/ClubInfoService.java diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 1ad87d63aaa031f3fb91756559d60d5805da9825..2b1859b5c38eda211f0a8fe1be79007c51dfff80 100644 GIT binary patch literal 17 TcmZSHP-fmz;vOKx009XAD1!rH literal 17 TcmZSHP-fmz;vOKx00992D02f+ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index 34452bd3b4947282b3a146a43faf68f5ffe0b523..f96e492a701e797c262455aeabee36ac7fbdf7d6 100644 GIT binary patch literal 17 VcmZRcGGUkcmR8wd1~6cr2>>we1Wo_| literal 17 VcmZRcGGUkcmR8wd1~6a_1OPCm1O@;A diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 3ea33ccb340c20d919df4801601a4cc8b9edee0c..ed80e72f173494ef5def81dc7418dc44d9e77b23 100644 GIT binary patch literal 17 VcmZSnsC8m)WKdT(0~j!h0RT3{1X} getClubDetail(@PathVariable Long clubId, @AuthenticationPrincipal UserPrinciple userPrinciple) { + ClubDetailResponse clubDetail; + if (userPrinciple == null) { + clubDetail = clubInfoService.getClubDetail(clubId); + } else { + Member member = memberRepository.findByEmail(userPrinciple.getEmail()) + .orElseThrow(() -> new IllegalArgumentException("존재하지 않는 사용자입니다.")); + clubDetail = clubInfoService.getClubDetail(clubId, member); + } + + return ResponseEntity.ok(clubDetail); + } } diff --git a/src/main/java/likelion/MZConnent/config/SecurityConfig.java b/src/main/java/likelion/MZConnent/config/SecurityConfig.java index f3b0526..905050f 100644 --- a/src/main/java/likelion/MZConnent/config/SecurityConfig.java +++ b/src/main/java/likelion/MZConnent/config/SecurityConfig.java @@ -30,10 +30,11 @@ public class SecurityConfig { "/api/auth/login", "/api/auth/logout", // 회원 "/api/categories/culture", // 문화 "/api/clubs", "/api/clubs/*/join", // 동아리 + "/api/clubs/*", "/swagger", "/swagger-ui.html", "/swagger-ui/**", "/api-docs", "/api-docs/**", "/v3/api-docs/**", //swagger }; private final String[] anonymousUrl = { - "/api/auth/signup", "/api/categories/region" + "/api/auth/signup", "/api/categories/region", "/api/clubs/*" }; diff --git a/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java b/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java new file mode 100644 index 0000000..89f5dab --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java @@ -0,0 +1,22 @@ +package likelion.MZConnent.dto.club; + +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Getter +@NoArgsConstructor +public class LeaderDto { + private String username; + private String profileImageUrl; + private List selfIntroductions; + + @Builder + public LeaderDto(String username, String profileImageUrl, List selfIntroductions) { + this.username = username; + this.profileImageUrl = profileImageUrl; + this.selfIntroductions = selfIntroductions; + } +} diff --git a/src/main/java/likelion/MZConnent/dto/club/SelfIntroductionDto.java b/src/main/java/likelion/MZConnent/dto/club/SelfIntroductionDto.java new file mode 100644 index 0000000..aef6082 --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/SelfIntroductionDto.java @@ -0,0 +1,18 @@ +package likelion.MZConnent.dto.club; + +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@NoArgsConstructor +public class SelfIntroductionDto { + private Long cultureCategoryId; + private String name; + + @Builder + public SelfIntroductionDto(Long cultureCategoryId, String name) { + this.cultureCategoryId = cultureCategoryId; + this.name = name; + } +} diff --git a/src/main/java/likelion/MZConnent/dto/club/response/ClubDetailResponse.java b/src/main/java/likelion/MZConnent/dto/club/response/ClubDetailResponse.java new file mode 100644 index 0000000..bdcbe17 --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/response/ClubDetailResponse.java @@ -0,0 +1,55 @@ +package likelion.MZConnent.dto.club.response; + +import likelion.MZConnent.domain.club.AgeRestriction; +import likelion.MZConnent.domain.club.GenderRestriction; +import likelion.MZConnent.dto.club.LeaderDto; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; + +@Slf4j +@Getter +@NoArgsConstructor +public class ClubDetailResponse { + private Long clubId; + private String title; + private LocalDate meetingDate; + private LocalDateTime createdDate; + private String content; + private GenderRestriction genderRestriction; + private AgeRestriction ageRestriction; + private String cultureImageUrl; + private String cultureName; + private String regionName; + private int currentParticipant; + private int maxParticipant; + private String registrationStatus; + private List leader; + + @Builder + public ClubDetailResponse(Long clubId, String title, LocalDate meetingDate, LocalDateTime createdDate, String content, + GenderRestriction genderRestriction, AgeRestriction ageRestriction, String cultureImageUrl, + String cultureName, String regionName, int currentParticipant, int maxParticipant, + String registrationStatus, List leader) { + this.clubId = clubId; + this.title = title; + this.meetingDate = meetingDate; + this.createdDate = createdDate; + this.content = content; + this.genderRestriction = genderRestriction; + this.ageRestriction = ageRestriction; + this.cultureImageUrl = cultureImageUrl; + this.cultureName = cultureName; + this.regionName = regionName; + this.currentParticipant = currentParticipant; + this.maxParticipant = maxParticipant; + this.registrationStatus = registrationStatus; + this.leader = leader; + } + +} diff --git a/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java new file mode 100644 index 0000000..cdbba40 --- /dev/null +++ b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java @@ -0,0 +1,80 @@ +package likelion.MZConnent.service.club; + +import likelion.MZConnent.domain.club.ClubRole; +import likelion.MZConnent.domain.member.Member; +import likelion.MZConnent.dto.club.LeaderDto; +import likelion.MZConnent.dto.club.SelfIntroductionDto; +import likelion.MZConnent.dto.club.response.ClubDetailResponse; +import likelion.MZConnent.repository.club.ClubRepository; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import likelion.MZConnent.domain.club.Club; + +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +@RequiredArgsConstructor +public class ClubInfoService { + private final ClubRepository clubRepository; + + // 로그인하지 않은 사용자 + public ClubDetailResponse getClubDetail(Long clubId) { + return buildClubDetailResponse(clubId, null); + } + + // 로그인한 사용자 + public ClubDetailResponse getClubDetail(Long clubId, Member member) { + return buildClubDetailResponse(clubId, member); + } + + private ClubDetailResponse buildClubDetailResponse(Long clubId, Member member) { + Club club = clubRepository.findById(clubId) + .orElseThrow(() -> new IllegalArgumentException("존재하지 않는 모임입니다.")); + + List leaderResponses = club.getClubMembers().stream() + .filter(cm -> cm.getClubRole() == ClubRole.LEADER) + .map(cm -> LeaderDto.builder() + .username(cm.getMember().getUsername()) + .profileImageUrl(cm.getMember().getProfileImageUrl()) + .selfIntroductions(cm.getMember().getSelfIntroductions().stream() + .map(si -> SelfIntroductionDto.builder() + .cultureCategoryId(si.getCultureCategory().getId()) + .name(si.getCultureCategory().getName()) + .build()) + .collect(Collectors.toList())) + .build()) + .collect(Collectors.toList()); + + String registrationStatus = "신청하기"; + + // 로그인한 사용자가 해당 모임에 가입되어 있는지 확인 + if (member != null) { + boolean isMemberJoined = club.getClubMembers().stream() + .anyMatch(cm -> { + return cm.getMember().getId().equals(member.getId()); + }); + registrationStatus = isMemberJoined ? "신청완료" : "신청하기"; + } + + + return ClubDetailResponse.builder() + .clubId(club.getClubId()) + .title(club.getTitle()) + .meetingDate(club.getMeetingDate()) + .createdDate(club.getCreatedDate()) + .content(club.getContent()) + .genderRestriction(club.getGenderRestriction()) + .ageRestriction(club.getAgeRestriction()) + .cultureImageUrl(club.getCulture().getCultureImageUrl()) + .cultureName(club.getCulture().getName()) + .regionName(club.getRegion().getName()) + .currentParticipant(club.getCurrentParticipant()) + .maxParticipant(club.getMaxParticipant()) + .registrationStatus(registrationStatus) + .leader(leaderResponses) + .build(); + } +} diff --git a/src/main/java/likelion/MZConnent/service/club/ClubService.java b/src/main/java/likelion/MZConnent/service/club/ClubService.java index 80a958a..8e9153e 100644 --- a/src/main/java/likelion/MZConnent/service/club/ClubService.java +++ b/src/main/java/likelion/MZConnent/service/club/ClubService.java @@ -3,7 +3,6 @@ import jakarta.transaction.Transactional; import likelion.MZConnent.domain.club.*; import likelion.MZConnent.domain.culture.Culture; -import likelion.MZConnent.domain.member.Gender; import likelion.MZConnent.domain.member.Member; import likelion.MZConnent.dto.club.request.CreateClubRequest; import likelion.MZConnent.dto.club.response.CreateClubResponse; @@ -36,7 +35,7 @@ public CreateClubResponse createClub(CreateClubRequest request, Member member) { .meetingDate(request.getMeetingDate()) .createdDate(LocalDateTime.now()) .maxParticipant(request.getMaxParticipant()) - .currentParticipant(0) + .currentParticipant(1) .content(request.getContent()) .genderRestriction(request.getGenderRestriction()) .ageRestriction(request.getAgeRestriction()) From 7d05ae9c6c1e90b8853338969ee789bcbdfc414b Mon Sep 17 00:00:00 2001 From: oosedus Date: Fri, 26 Jul 2024 01:47:51 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=EB=AA=A8=EC=9E=84=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/8.8/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .../MZConnent/api/club/ClubController.java | 29 +++++++++-- .../MZConnent/config/SecurityConfig.java | 2 +- .../dto/club/request/ClubSimpleRequest.java | 19 ++++++++ .../dto/club/response/ClubSimpleResponse.java | 46 ++++++++++++++++++ .../club/response/PageContentResponse.java | 22 +++++++++ .../repository/club/ClubRepository.java | 14 ++++++ .../service/club/ClubInfoService.java | 43 ++++++++++++++++ 10 files changed, 171 insertions(+), 4 deletions(-) create mode 100644 src/main/java/likelion/MZConnent/dto/club/request/ClubSimpleRequest.java create mode 100644 src/main/java/likelion/MZConnent/dto/club/response/ClubSimpleResponse.java create mode 100644 src/main/java/likelion/MZConnent/dto/club/response/PageContentResponse.java diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 2b1859b5c38eda211f0a8fe1be79007c51dfff80..b7ef009f1da51e6e17ce726bd9da8c9213768f49 100644 GIT binary patch literal 17 TcmZSHP-fmz;vOKx009L6D3b$n literal 17 TcmZSHP-fmz;vOKx009XAD1!rH diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index f96e492a701e797c262455aeabee36ac7fbdf7d6..61f9f9a6901375990e096b9a0b8087cf4c17e11b 100644 GIT binary patch literal 17 VcmZRcGGUkcmR8wd1~6d00RS;A1dRXy literal 17 VcmZRcGGUkcmR8wd1~6cr2>>we1Wo_| diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index ed80e72f173494ef5def81dc7418dc44d9e77b23..87e9da00e81c27eb37c0aed83a1d3501a874e14e 100644 GIT binary patch literal 17 VcmZSnsC8m)WKdT(0~jz`0suDW1bzSj literal 17 VcmZSnsC8m)WKdT(0~j!h0RT3{1X} getClubDetail(@PathVariable Long clubI return ResponseEntity.ok(clubDetail); } + + @GetMapping("/api/clubs/list") + public ResponseEntity> getClubList( + @RequestParam(value = "page", defaultValue = "0") int pageNumber, + @RequestParam(value = "sort", defaultValue = "createdDate") String sortWay, + @RequestBody ClubSimpleRequest request) { + + Pageable pageable; + if(sortWay.equals("meetingDate")){ + pageable = PageRequest.of(pageNumber, 6, Sort.by(sortWay).ascending()); + } + else { + pageable = PageRequest.of(pageNumber, 6, Sort.by(sortWay).descending()); + } + + PageContentResponse clubList = clubInfoService.getClubList(request, pageable); + return ResponseEntity.ok(clubList); + } } diff --git a/src/main/java/likelion/MZConnent/config/SecurityConfig.java b/src/main/java/likelion/MZConnent/config/SecurityConfig.java index 905050f..7bb03f8 100644 --- a/src/main/java/likelion/MZConnent/config/SecurityConfig.java +++ b/src/main/java/likelion/MZConnent/config/SecurityConfig.java @@ -34,7 +34,7 @@ public class SecurityConfig { "/swagger", "/swagger-ui.html", "/swagger-ui/**", "/api-docs", "/api-docs/**", "/v3/api-docs/**", //swagger }; private final String[] anonymousUrl = { - "/api/auth/signup", "/api/categories/region", "/api/clubs/*" + "/api/auth/signup", "/api/categories/region", "/api/clubs/*", "/api/clubs/list" }; diff --git a/src/main/java/likelion/MZConnent/dto/club/request/ClubSimpleRequest.java b/src/main/java/likelion/MZConnent/dto/club/request/ClubSimpleRequest.java new file mode 100644 index 0000000..aba263a --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/request/ClubSimpleRequest.java @@ -0,0 +1,19 @@ +package likelion.MZConnent.dto.club.request; + +import lombok.AccessLevel; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class ClubSimpleRequest { + private Long cultureId; + private Long regionId; + + @Builder + public ClubSimpleRequest(Long cultureId, Long regionId) { + this.cultureId = cultureId; + this.regionId = regionId; + } +} diff --git a/src/main/java/likelion/MZConnent/dto/club/response/ClubSimpleResponse.java b/src/main/java/likelion/MZConnent/dto/club/response/ClubSimpleResponse.java new file mode 100644 index 0000000..451a7d1 --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/response/ClubSimpleResponse.java @@ -0,0 +1,46 @@ +package likelion.MZConnent.dto.club.response; + +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +@Getter +@NoArgsConstructor +public class ClubSimpleResponse { + private Long clubId; + private String title; + private Long regionId; + private String regionName; + private Long cultureCategoryId; + private String cultureName; + private String leaderProfileImage; + private LocalDate meetingDate; + private LocalDateTime createdDate; + private String genderRestriction; + private String ageRestriction; + private int currentParticipant; + private int maxParticipant; + + @Builder + public ClubSimpleResponse(Long clubId, String title, Long regionId, String regionName, Long cultureCategoryId, + String cultureName, String leaderProfileImage, LocalDate meetingDate, + LocalDateTime createdDate, String genderRestriction, String ageRestriction, + int currentParticipant, int maxParticipant) { + this.clubId = clubId; + this.title = title; + this.regionId = regionId; + this.regionName = regionName; + this.cultureCategoryId = cultureCategoryId; + this.cultureName = cultureName; + this.leaderProfileImage = leaderProfileImage; + this.meetingDate = meetingDate; + this.createdDate = createdDate; + this.genderRestriction = genderRestriction; + this.ageRestriction = ageRestriction; + this.currentParticipant = currentParticipant; + this.maxParticipant = maxParticipant; + } +} diff --git a/src/main/java/likelion/MZConnent/dto/club/response/PageContentResponse.java b/src/main/java/likelion/MZConnent/dto/club/response/PageContentResponse.java new file mode 100644 index 0000000..77720e6 --- /dev/null +++ b/src/main/java/likelion/MZConnent/dto/club/response/PageContentResponse.java @@ -0,0 +1,22 @@ +package likelion.MZConnent.dto.club.response; + +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Getter +@NoArgsConstructor +public class PageContentResponse { + private List content; + private int totalPages; + private long totalElements; + private int size; + + public PageContentResponse(List content, int totalPages, long totalElements, int size) { + this.content = content; + this.totalPages = totalPages; + this.totalElements = totalElements; + this.size = size; + } +} diff --git a/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java b/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java index 4f05998..d03da70 100644 --- a/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java +++ b/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java @@ -1,10 +1,24 @@ package likelion.MZConnent.repository.club; import likelion.MZConnent.domain.club.Club; +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 org.springframework.stereotype.Repository; @Repository public interface ClubRepository extends JpaRepository { + + // status가 OPEN인 클럽만 조회 + // cultureId와 regionId가 0이면 무시 + // cultureId와 regionId가 0이 아니면 해당 cultureId와 regionId에 맞는 클럽만 조회 + @Query("SELECT c FROM Club c WHERE c.status = 'OPEN' " + + "AND (:cultureId = 0 OR c.culture.cultureId = :cultureId) " + + "AND (:regionId = 0 OR c.region.regionId = :regionId)") + Page findAllByFilters(@Param("cultureId") Long cultureId, + @Param("regionId") Long regionId, + Pageable pageable); } diff --git a/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java index cdbba40..83b10c7 100644 --- a/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java +++ b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java @@ -4,10 +4,15 @@ import likelion.MZConnent.domain.member.Member; import likelion.MZConnent.dto.club.LeaderDto; import likelion.MZConnent.dto.club.SelfIntroductionDto; +import likelion.MZConnent.dto.club.request.ClubSimpleRequest; import likelion.MZConnent.dto.club.response.ClubDetailResponse; +import likelion.MZConnent.dto.club.response.ClubSimpleResponse; +import likelion.MZConnent.dto.club.response.PageContentResponse; import likelion.MZConnent.repository.club.ClubRepository; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import likelion.MZConnent.domain.club.Club; @@ -77,4 +82,42 @@ private ClubDetailResponse buildClubDetailResponse(Long clubId, Member member) { .leader(leaderResponses) .build(); } + + public PageContentResponse getClubList(ClubSimpleRequest request, Pageable pageable) { + Page clubs = clubRepository.findAllByFilters( + request.getCultureId(), + request.getRegionId(), + pageable); + + return new PageContentResponse<>( + clubs.stream() + .map(club -> ClubSimpleResponse.builder() + .clubId(club.getClubId()) + .title(club.getTitle()) + .regionId(club.getRegion().getRegionId()) + .regionName(club.getRegion().getName()) + .cultureCategoryId(club.getCulture().getCultureCategory().getId()) + .cultureName(club.getCulture().getName()) + .leaderProfileImage(getLeaderProfileImage(club)) + .meetingDate(club.getMeetingDate()) + .createdDate(club.getCreatedDate()) + .genderRestriction(club.getGenderRestriction().name()) + .ageRestriction(club.getAgeRestriction().name()) + .currentParticipant(club.getCurrentParticipant()) + .maxParticipant(club.getMaxParticipant()) + .build()) + .collect(Collectors.toList()), + clubs.getTotalPages(), + clubs.getTotalElements(), + pageable.getPageSize() + ); + } + + private String getLeaderProfileImage(Club club) { + return club.getClubMembers().stream() + .filter(cm -> cm.getClubRole() == ClubRole.LEADER) + .findFirst() + .map(cm -> cm.getMember().getProfileImageUrl()) + .orElse(null); + } }