File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
src/main/java/treehouse/server
api/user/presentation/dto Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id ' java'
3
3
id ' org.springframework.boot' version ' 3.1.11'
4
- id ' io.spring.dependency-management' version ' 1.1.4 '
4
+ id ' io.spring.dependency-management' version ' 1.1.6 '
5
5
}
6
6
7
7
group = ' treehouse'
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ public static class checkName {
14
14
15
15
@ Getter
16
16
public static class registerUser {
17
+ @ NotBlank (message = "전화번호를 입력해주세요." )
17
18
private String phoneNumber ;
19
+ @ NotBlank (message = "유저이름(고유)을 입력해주세요." )
18
20
private String userName ;
19
21
}
20
22
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public class User extends BaseDateTimeEntity {
47
47
private Integer activeRate = 0 ; //활동량
48
48
@ Builder .Default
49
49
private Integer invitationCount = 3 ; //남아있는 초대장의 개수
50
+ @ Builder .Default
51
+ private Integer invitationCreatedCount = 0 ; //초대장 생성 횟수
50
52
51
53
52
54
// 탈퇴일자 필요한지 확인하기
@@ -76,5 +78,15 @@ public boolean updatePushAgree(boolean pushAgree){
76
78
77
79
public void reduceInvitationCount () {
78
80
this .invitationCount --;
81
+ this .invitationCreatedCount ++; // 초대장 생성 횟수 증가
82
+ checkAndIncreaseInvitationCount (); // 3회마다 invitationCount 증가
83
+ }
84
+
85
+ // 초대 횟수가 3번째일 때만 invitationCount 1 증가
86
+ private void checkAndIncreaseInvitationCount () {
87
+ if (this .invitationCreatedCount == 3 ) {
88
+ this .invitationCount ++; // 3번째일 때만 증가
89
+ this .invitationCreatedCount = 0 ; // 카운트 초기화
90
+ }
79
91
}
80
92
}
You can’t perform that action at this time.
0 commit comments