diff --git a/src/main/java/com/nanal/backend/domain/auth/dto/LoginInfo.java b/src/main/java/com/nanal/backend/domain/auth/dto/LoginInfo.java index 1c99fbe0..a3b2d865 100644 --- a/src/main/java/com/nanal/backend/domain/auth/dto/LoginInfo.java +++ b/src/main/java/com/nanal/backend/domain/auth/dto/LoginInfo.java @@ -23,16 +23,19 @@ public class LoginInfo { private Boolean onBoardingCompleted; + private Boolean isSponsor; + public LoginInfo(String nickname, Token token) { this.nickname = nickname; this.token = token.getToken(); this.refreshToken = token.getRefreshToken(); } - public LoginInfo(String nickname, Token token, Boolean onBoardingCompleted) { + public LoginInfo(String nickname, Token token, Boolean onBoardingCompleted, Boolean isSponsor) { this.nickname = nickname; this.token = token.getToken(); this.refreshToken = token.getRefreshToken(); this.onBoardingCompleted = onBoardingCompleted; + this.isSponsor = isSponsor; } } diff --git a/src/main/java/com/nanal/backend/domain/auth/service/AuthService.java b/src/main/java/com/nanal/backend/domain/auth/service/AuthService.java index 75b39f25..7770ad6c 100644 --- a/src/main/java/com/nanal/backend/domain/auth/service/AuthService.java +++ b/src/main/java/com/nanal/backend/domain/auth/service/AuthService.java @@ -70,7 +70,7 @@ public LoginInfo commonAuth(String accessToken, String providerInfo) { // Redis에 Refresh Token 저장 tokenUtil.storeRefreshToken(authenticatedMember.getSocialId(), token); - return new LoginInfo(authenticatedMember.getNickname(), token, authenticatedMember.getRole().equals(Member.Role.USER)); + return new LoginInfo(authenticatedMember.getNickname(), token, authenticatedMember.getRole().equals(Member.Role.USER), authenticatedMember.getGoods() != null); } @Counted("auth.api.count") @@ -92,7 +92,7 @@ public LoginInfo appleAuth(String identityToken, String providerInfo) { // Redis에 Refresh Token 저장 tokenUtil.storeRefreshToken(authenticatedMember.getSocialId(), token); - return new LoginInfo(authenticatedMember.getNickname(), token, authenticatedMember.getRole().equals(Member.Role.USER)); + return new LoginInfo(authenticatedMember.getNickname(), token, authenticatedMember.getRole().equals(Member.Role.USER), authenticatedMember.getGoods() != null); } @Counted("auth.api.count") diff --git a/src/main/java/com/nanal/backend/domain/diary/dto/req/KeywordDto.java b/src/main/java/com/nanal/backend/domain/diary/dto/req/KeywordDto.java index bcc800aa..053a160d 100644 --- a/src/main/java/com/nanal/backend/domain/diary/dto/req/KeywordDto.java +++ b/src/main/java/com/nanal/backend/domain/diary/dto/req/KeywordDto.java @@ -22,7 +22,7 @@ public class KeywordDto { private String keyword; @Valid - @Size(min = 3, max = 3, message ="emotion 의 개수는 3개여야 합니다.") + @Size(min = 1, max = 3, message ="emotion 의 개수는 3개여야 합니다.") private List keywordEmotions; public KeywordDto(Keyword keyword) { @@ -31,4 +31,4 @@ public KeywordDto(Keyword keyword) { .map(ke -> new KeywordEmotionDto(ke.getEmotion().getEmotion())) .collect(Collectors.toList()); } -} \ No newline at end of file +} diff --git a/src/main/java/com/nanal/backend/domain/mypage/dto/resp/RespGetUserDto.java b/src/main/java/com/nanal/backend/domain/mypage/dto/resp/RespGetUserDto.java index 60143cd1..77265387 100644 --- a/src/main/java/com/nanal/backend/domain/mypage/dto/resp/RespGetUserDto.java +++ b/src/main/java/com/nanal/backend/domain/mypage/dto/resp/RespGetUserDto.java @@ -8,6 +8,7 @@ import lombok.NoArgsConstructor; import java.time.DayOfWeek; +import java.util.Optional; @Builder @AllArgsConstructor @@ -28,6 +29,8 @@ public class RespGetUserDto { private String retrospectAlarmTime; + private String goods; + public static RespGetUserDto createRespGetUserDto(Member member) { Alarm alarm = member.getAlarm(); return RespGetUserDto.builder() @@ -38,6 +41,7 @@ public static RespGetUserDto createRespGetUserDto(Member member) { .diaryAlarmTime(alarm.getDiaryTime()) .retrospectAlarmActive(alarm.getRetrospectActive()) .retrospectAlarmTime(alarm.getRetrospectTime()) + .goods(member.getGoods() != null ? member.getGoods() : null) .build(); } } diff --git a/src/main/java/com/nanal/backend/domain/mypage/service/MypageService.java b/src/main/java/com/nanal/backend/domain/mypage/service/MypageService.java index 24488172..51d39ff2 100644 --- a/src/main/java/com/nanal/backend/domain/mypage/service/MypageService.java +++ b/src/main/java/com/nanal/backend/domain/mypage/service/MypageService.java @@ -33,7 +33,6 @@ public class MypageService { private final FeedbackRepository feedbackRepository; @Counted("mypage.api.count") - @Transactional(readOnly = true) public RespGetUserDto getUser(String socialId) { // socialId 로 유저 조회 Member member = findMember(socialId); diff --git a/src/main/resources/static/docs/Alarm-API.html b/src/main/resources/static/docs/Alarm-API.html index 094104f0..fca889ac 100644 --- a/src/main/resources/static/docs/Alarm-API.html +++ b/src/main/resources/static/docs/Alarm-API.html @@ -648,7 +648,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Auth-API.html b/src/main/resources/static/docs/Auth-API.html index 53654fdc..9890fcbf 100644 --- a/src/main/resources/static/docs/Auth-API.html +++ b/src/main/resources/static/docs/Auth-API.html @@ -490,7 +490,7 @@

HTTP response

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -500,7 +500,8 @@ 

HTTP response

"nickname" : "유저 닉네임", "token" : "SERVER_ACCESS_TOKEN", "refreshToken" : "SERVER_REFRESH_TOKEN", - "onBoardingCompleted" : true + "onBoardingCompleted" : true, + "isSponsor" : true } }
@@ -557,6 +558,11 @@

Response fields

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -609,7 +615,7 @@

HTTP response

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -619,7 +625,8 @@ 

HTTP response

"nickname" : "유저 닉네임", "token" : "SERVER_ACCESS_TOKEN", "refreshToken" : "SERVER_REFRESH_TOKEN", - "onBoardingCompleted" : true + "onBoardingCompleted" : true, + "isSponsor" : true } }
@@ -676,6 +683,11 @@

Response fields

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -728,7 +740,7 @@

HTTP response

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -738,7 +750,8 @@ 

HTTP response

"nickname" : "유저 닉네임", "token" : "SERVER_ACCESS_TOKEN", "refreshToken" : "SERVER_REFRESH_TOKEN", - "onBoardingCompleted" : true + "onBoardingCompleted" : true, + "isSponsor" : true } }
@@ -795,6 +808,11 @@

Response fields

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -847,7 +865,7 @@

HTTP response

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -857,7 +875,8 @@ 

HTTP response

"nickname" : "유저 닉네임", "token" : "SERVER_ACCESS_TOKEN", "refreshToken" : "SERVER_REFRESH_TOKEN", - "onBoardingCompleted" : true + "onBoardingCompleted" : true, + "isSponsor" : true } }
@@ -914,6 +933,11 @@

Response fields

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -1029,7 +1053,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Diary-API.html b/src/main/resources/static/docs/Diary-API.html index 350a5839..7b47eeeb 100644 --- a/src/main/resources/static/docs/Diary-API.html +++ b/src/main/resources/static/docs/Diary-API.html @@ -1305,7 +1305,7 @@

Response fields

diff --git a/src/main/resources/static/docs/MyPage-API.html b/src/main/resources/static/docs/MyPage-API.html index 7fd02eba..5e283e5a 100644 --- a/src/main/resources/static/docs/MyPage-API.html +++ b/src/main/resources/static/docs/MyPage-API.html @@ -482,7 +482,7 @@

HTTP response

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 366
+Content-Length: 386
 
 {
   "isSuccess" : true,
@@ -495,7 +495,8 @@ 

HTTP response

"diaryAlarmActive" : true, "diaryAlarmTime" : "20:00", "retrospectAlarmActive" : true, - "retrospectAlarmTime" : "20:00" + "retrospectAlarmTime" : "20:00", + "goods" : "A" } }
@@ -567,6 +568,11 @@

Response fields

String

회고 알림 시간

+ +

result.goods

+

String

+

후원 세트 이름

+ @@ -1275,7 +1281,7 @@

Response fields

diff --git a/src/main/resources/static/docs/OnBoarding-API.html b/src/main/resources/static/docs/OnBoarding-API.html index a5e6f879..5c2bfced 100644 --- a/src/main/resources/static/docs/OnBoarding-API.html +++ b/src/main/resources/static/docs/OnBoarding-API.html @@ -542,7 +542,7 @@

Response fields diff --git a/src/main/resources/static/docs/Overview.html b/src/main/resources/static/docs/Overview.html index 720dc6da..fde41bab 100644 --- a/src/main/resources/static/docs/Overview.html +++ b/src/main/resources/static/docs/Overview.html @@ -659,7 +659,7 @@

Retrospect Status Codes

diff --git a/src/main/resources/static/docs/Retrospect-API-V2.html b/src/main/resources/static/docs/Retrospect-API-V2.html index 98fc3089..79ac6614 100644 --- a/src/main/resources/static/docs/Retrospect-API-V2.html +++ b/src/main/resources/static/docs/Retrospect-API-V2.html @@ -1011,7 +1011,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Retrospect-API.html b/src/main/resources/static/docs/Retrospect-API.html index d410d811..7bf444bf 100644 --- a/src/main/resources/static/docs/Retrospect-API.html +++ b/src/main/resources/static/docs/Retrospect-API.html @@ -2017,7 +2017,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Search-API.html b/src/main/resources/static/docs/Search-API.html index 86ea5931..efac0d44 100644 --- a/src/main/resources/static/docs/Search-API.html +++ b/src/main/resources/static/docs/Search-API.html @@ -789,7 +789,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Sponsor-API.html b/src/main/resources/static/docs/Sponsor-API.html index 8abc2239..ecc2d934 100644 --- a/src/main/resources/static/docs/Sponsor-API.html +++ b/src/main/resources/static/docs/Sponsor-API.html @@ -563,7 +563,7 @@ diff --git a/src/main/resources/static/docs/api.html b/src/main/resources/static/docs/api.html index 2088b809..df2800a1 100644 --- a/src/main/resources/static/docs/api.html +++ b/src/main/resources/static/docs/api.html @@ -797,7 +797,7 @@

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -807,7 +807,8 @@ 

@@ -864,6 +865,11 @@

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -916,7 +922,7 @@

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -926,7 +932,8 @@ 

@@ -983,6 +990,11 @@

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -1035,7 +1047,7 @@

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -1045,7 +1057,8 @@ 

@@ -1102,6 +1115,11 @@

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -1154,7 +1172,7 @@

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 272
+Content-Length: 297
 
 {
   "isSuccess" : true,
@@ -1164,7 +1182,8 @@ 

@@ -1221,6 +1240,11 @@

Boolean

온보딩 여부 확인

+ +

result.isSponsor

+

Boolean

+

후원자 여부 확인 true : 후원자, false : 후원자 아님

+ @@ -1472,7 +1496,7 @@

HTTP/1.1 200 OK
 Content-Type: application/json;charset=UTF-8
-Content-Length: 366
+Content-Length: 386
 
 {
   "isSuccess" : true,
@@ -1485,7 +1509,9 @@ 

@@ -1557,6 +1583,11 @@

String

회고 알림 시간

+ +

result.goods

+

String

+

후원 세트 이름

+ @@ -5015,7 +5046,7 @@

@@ -5934,7 +5965,7 @@