-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(meeting): Implementation of features related to meeting requests #105
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
b0112aa
fix: fix error entrance h2-console
71f4ac7
feat(meeting): add dto for request, response meeting api
1efa1f5
feat(valid): add custom bean validator for meeting request
d717937
test(valid): add kakao open chat link format validator
a86064b
feat(meeting): add repository specification
f240b34
feat(meeting): add service specification
c79d3fe
feat(meeting): add controller specification
04ddff3
style(test): change directory Integration Abstract module
74f7195
test: add AbstractServiceTest for Service Integration Test
7258668
test: add test sendRequest()
ac401f1
feat: add TeamNotFoundException
c9b7407
feat(meeting): change default status to PENDING
37eb32d
feat(meeting): implement sendRequest service method
48a0838
feat(meeting): add method loading team proxy
18726c6
test(meeting): add test loading team proxy
16f5013
refactor(meeting): sendRequest method refactoring
dca405a
feat(error): Add custom exception that might occur in the MeetingHand…
20890f8
feat(valid): Add custom validator that checking expiration given date
fb50ded
refactor(meeting): change chatLink field to NOT NULL
9b11415
refactor(meeting): add validateOpenChatLinkFormat method to CustomFor…
0d85208
refactor(meeting): Detach Meeting Accept And Reject API
9afeda3
feat(meeting): rename MeetingReadRepository and add find query for Te…
5ccf71e
feat(meeting): rename MeetingReadRepository and add find query for Te…
733a998
feat(user): add use credit method and validate message format
25a1df7
refactor(meeting): Seperate Meeting Service Components
9ba0da1
refactor(meeting): change search Meeting List specification
1860a47
fix(test): fix test error
78cacb7
test: add fixture for Meeting, Team Image
cee4a60
style(dto): add postfix "Dto" to dto classes
f663d03
refactor(meeting): add parameter find date to search meeting informat…
adbf431
refactor(meeting): add validate method before handle MeetingRequest E…
7ec1bb3
test(meeting): add test for searching meeting information query
1c4d9fa
feat(meeting): add dto to find Meeting Information from query directly
b6e265b
feat(meeting): add feature to find personal accepted meeting information
05058f5
test: modify fixture for test
49b312b
feat(meeting): add dto to find MeetingRequest Information from query …
4d7a287
feat(meeting): add feature find sent & received meeting request
3fd490b
refactor(test): change location set authentication method
d703cd1
feat(meeting): add update & find query and test
c724458
feat(meeting): add feature getting accepted meeting list
5bfb52e
fix(meeting): fix find request related deleted team
0a09448
feat(meeting): add feature update request's accept status to EXPIRED
bce6ec3
refactor(meeting): change hierarchy MeetingRequestResponseDto
5a42d0a
feat(meeting): add get list methods that sent & received request to m…
876467a
test(meeting): add get list methods test
2797080
refactor(meeting): remove duplicate 'v1' word in url
d70ac46
fix(meeting): fix tests and change syntax generate NPE
8eb7bdf
fix(resolver): throw AccessTokenNotFoundException when principal not …
f6eb57b
test(meeting): add testing class MeetingController
fc5006b
refactor(meeting): Tie up to common path '/meeting'
a011de0
feat(cost): add cost event (#104)
KAispread File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
src/main/java/com/e2i/wemeet/controller/meeting/MeetingController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package com.e2i.wemeet.controller.meeting; | ||
|
||
import com.e2i.wemeet.config.resolver.member.MemberId; | ||
import com.e2i.wemeet.domain.meeting.data.AcceptStatus; | ||
import com.e2i.wemeet.dto.request.meeting.MeetingRequestAcceptDto; | ||
import com.e2i.wemeet.dto.request.meeting.SendMeetingRequestDto; | ||
import com.e2i.wemeet.dto.request.meeting.SendMeetingWithMessageRequestDto; | ||
import com.e2i.wemeet.dto.response.ResponseDto; | ||
import com.e2i.wemeet.dto.response.meeting.AcceptedMeetingResponseDto; | ||
import com.e2i.wemeet.dto.response.meeting.ReceivedMeetingResponseDto; | ||
import com.e2i.wemeet.dto.response.meeting.SentMeetingResponseDto; | ||
import com.e2i.wemeet.service.meeting.MeetingHandleService; | ||
import com.e2i.wemeet.service.meeting.MeetingListService; | ||
import jakarta.validation.Valid; | ||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RequiredArgsConstructor | ||
@RequestMapping("/v1/meeting") | ||
@RestController | ||
public class MeetingController { | ||
|
||
private final MeetingHandleService meetingHandleService; | ||
private final MeetingListService meetingListService; | ||
|
||
@PostMapping | ||
public ResponseDto<Void> sendMeetingRequest(@MemberId Long memberId, @RequestBody @Valid SendMeetingRequestDto requestDto) { | ||
meetingHandleService.sendRequest(requestDto, memberId); | ||
|
||
return ResponseDto.success("Send meeting request success"); | ||
} | ||
|
||
@PostMapping("/message") | ||
public ResponseDto<Void> sendMeetingRequestWithMessage(@MemberId Long memberId, | ||
@RequestBody @Valid SendMeetingWithMessageRequestDto requestDto) { | ||
meetingHandleService.sendRequestWithMessage(requestDto, memberId); | ||
|
||
return ResponseDto.success("Send meeting request with message success"); | ||
} | ||
|
||
@PostMapping("/accept/{meetingRequestId}") | ||
public ResponseDto<Long> acceptMeetingRequest(@MemberId Long memberId, | ||
@RequestBody @Valid MeetingRequestAcceptDto requestDto, | ||
@PathVariable Long meetingRequestId) { | ||
final String openChatLink = requestDto.kakaoOpenChatLink(); | ||
final LocalDateTime acceptDateTime = LocalDateTime.now(); | ||
|
||
Long meetingId = meetingHandleService.acceptRequest(openChatLink, memberId, meetingRequestId, acceptDateTime); | ||
|
||
return ResponseDto.success("Meeting was successfully matched", meetingId); | ||
} | ||
|
||
@PostMapping("/reject/{meetingRequestId}") | ||
public ResponseDto<AcceptStatus> rejectMeetingRequest(@MemberId Long memberId, | ||
@PathVariable Long meetingRequestId) { | ||
LocalDateTime rejectDateTime = LocalDateTime.now(); | ||
AcceptStatus acceptStatus = meetingHandleService.rejectRequest(memberId, meetingRequestId, rejectDateTime); | ||
|
||
return ResponseDto.success("Meeting request successfully Rejected", acceptStatus); | ||
} | ||
|
||
@GetMapping("/accepted") | ||
public ResponseDto<List<AcceptedMeetingResponseDto>> getAcceptedMeetingList(@MemberId Long memberId) { | ||
final LocalDateTime findDateTime = LocalDateTime.now(); | ||
List<AcceptedMeetingResponseDto> acceptedMeetingList = meetingListService.getAcceptedMeetingList(memberId, findDateTime); | ||
|
||
return ResponseDto.success("Get accepted meeting list success", acceptedMeetingList); | ||
} | ||
|
||
|
||
@GetMapping("/sent") | ||
public ResponseDto<List<SentMeetingResponseDto>> getSentMeetingRequestList(@MemberId Long memberId) { | ||
final LocalDateTime findDateTime = LocalDateTime.now(); | ||
List<SentMeetingResponseDto> sentRequestList = meetingListService.getSentRequestList(memberId, findDateTime); | ||
|
||
return ResponseDto.success("Get sent meeting request list success", sentRequestList); | ||
} | ||
|
||
@GetMapping("/received") | ||
public ResponseDto<List<ReceivedMeetingResponseDto>> getReceivedMeetingRequestList(@MemberId Long memberId) { | ||
final LocalDateTime findDateTime = LocalDateTime.now(); | ||
List<ReceivedMeetingResponseDto> receiveRequestList = meetingListService.getReceiveRequestList(memberId, findDateTime); | ||
|
||
return ResponseDto.success("Get receive meeting request list success", receiveRequestList); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/e2i/wemeet/domain/cost/CostHistoryRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.e2i.wemeet.domain.cost; | ||
|
||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
public interface CostHistoryRepository extends JpaRepository<CostHistory, Long> { | ||
|
||
@Query("select ch from CostHistory ch where ch.member.memberId = :memberId") | ||
List<CostHistory> findAllByMemberId(@Param("memberId") Long memberId); | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/e2i/wemeet/domain/cost/CostRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.e2i.wemeet.domain.cost; | ||
|
||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
public interface CostRepository extends JpaRepository<Cost, Long> { | ||
|
||
@Query("select c.value from Cost c where c.type = :type") | ||
Optional<Integer> findValueByType(@Param(value = "type") String type); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.e2i.wemeet.domain.cost; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum Earn { | ||
EVENT("이벤트"), | ||
ADVERTISEMENT("광고 시청"); | ||
|
||
private final String detail; | ||
|
||
Earn(String detail) { | ||
this.detail = detail; | ||
} | ||
|
||
public static String getTypeName() { | ||
return "EARN"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.e2i.wemeet.domain.cost; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum Payment { | ||
PAYMENT_5900("5900원 결제"), | ||
PAYMENT_9900("9900원 결제"), | ||
PAYMENT_14900("14900원 결제"), | ||
PAYMENT_19900("19900원 결제"); | ||
|
||
private final String detail; | ||
|
||
Payment(String detail) { | ||
this.detail = detail; | ||
} | ||
|
||
public static String getTypeName() { | ||
return "PAYMENT"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.e2i.wemeet.domain.cost; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum Spent { | ||
|
||
DEFAULT("기본 값"), | ||
MEETING_REQUEST("미팅 요청"), | ||
MEETING_REQUEST_WITH_MESSAGE("쪽지와 함께 미팅 요청"), | ||
MEETING_ACCEPT("미팅 수락"), | ||
MORE_TEAM("팀 더보기"); | ||
|
||
private final String detail; | ||
|
||
Spent(String detail) { | ||
this.detail = detail; | ||
} | ||
|
||
public static String getTypeName() { | ||
return "SPENT"; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dto를 그대로 넘기지 않고 String 데이터를 빼서 Service로 넘긴 이유가 있으신가요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
미팅 요청을 처리하는 Service 입장에서는 사용자로부터 받은 오픈채팅방 링크만 필요하기때문에 String 데이터를 따로 빼서 넘겨주었습니다!
불필요한 계층간 의존성도 줄일 수 있을 것 같아요!