From d32f1a683d3e8e5ec1f0f7a682918bfe51d10bd6 Mon Sep 17 00:00:00 2001 From: soma-devops Date: Tue, 1 Aug 2023 16:54:55 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20Member=EC=97=90=20isAgreeWithEventInf?= =?UTF-8?q?o=20=EC=B6=94=EA=B0=80=20-=20=EC=9D=B4=EB=B2=A4=ED=8A=B8,=20?= =?UTF-8?q?=EA=B4=91=EA=B3=A0=EC=84=B1=20=EC=A0=95=EB=B3=B4=20=EC=95=88?= =?UTF-8?q?=EB=82=B4=20=EC=88=98=EC=8B=A0=20=EC=97=AC=EB=B6=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hkcc/LGTM/app/modules/auth/dto/signUp/CommonUserData.java | 3 +++ .../java/swm/hkcc/LGTM/app/modules/member/domain/Member.java | 4 ++++ .../LGTM/app/modules/auth/controller/SignupJuniorTest.java | 3 +++ .../LGTM/app/modules/auth/controller/SignupSeniorTest.java | 3 +++ 4 files changed, 13 insertions(+) diff --git a/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/auth/dto/signUp/CommonUserData.java b/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/auth/dto/signUp/CommonUserData.java index 32ed827e..5563220d 100644 --- a/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/auth/dto/signUp/CommonUserData.java +++ b/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/auth/dto/signUp/CommonUserData.java @@ -34,6 +34,9 @@ public class CommonUserData { @Size(max = 1000) protected String introduction; + @NotNull + protected boolean isAgreeWithEventInfo; + @NotNull protected List tagList; } diff --git a/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/member/domain/Member.java b/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/member/domain/Member.java index a51269be..ae23bbf8 100644 --- a/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/member/domain/Member.java +++ b/API-Server/src/main/java/swm/hkcc/LGTM/app/modules/member/domain/Member.java @@ -42,6 +42,9 @@ public class Member extends BaseEntity { @Column(nullable = false) private String introduction; + @Column + private boolean isAgreeWithEventInfo; + @OneToOne(mappedBy = "member", cascade = CascadeType.ALL) private Junior junior; @@ -70,6 +73,7 @@ public static Member from(CommonUserData request) { .deviceToken(request.getDeviceToken()) .profileImageUrl(request.getProfileImageUrl()) .introduction(request.getIntroduction()) + .isAgreeWithEventInfo(request.isAgreeWithEventInfo()) .build(); } } diff --git a/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupJuniorTest.java b/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupJuniorTest.java index 30787f13..eaa64ecb 100644 --- a/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupJuniorTest.java +++ b/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupJuniorTest.java @@ -80,6 +80,7 @@ public void setUp(@Autowired WebApplicationContext webApplicationContext, RestDo .deviceToken("Test_DeviceToken") .profileImageUrl("http://test.ProfileImageUrl.com/img.png") .introduction("Test Introduction") + .isAgreeWithEventInfo(true) .tagList(Arrays.asList("JAVA", "Python", "JavaScript")) .educationalHistory("대학생") .realName("홍길동") @@ -136,6 +137,7 @@ void juniorSignup() throws Exception { tableRow("deviceToken", "String", "디바이스 토큰"), tableRow("profileImageUrl", "String", "프로필 이미지 URL"), tableRow("introduction", "String", "나의 한줄 소개, 최대 500자, 클라이언트에서 trim()처리하여 보낸다"), + tableRow("agreeWithEventInfo", "boolean", "이벤트, 광고성 정보 안내 수신 여부"), tableRow("tagList", "List", "태그 리스트, 텍스트의 리스트로 전달한다. 1개 이상이어야 한다. 선택가능한 태그 외의 문자열이 전달될 경우 400에러 반환"), tableRow("educationalHistory", "String", "학력"), tableRow("realName", "String", "실명") @@ -161,6 +163,7 @@ void juniorSignup() throws Exception { fieldWithPath("nickName").type(JsonFieldType.STRING).description("닉네임"), fieldWithPath("deviceToken").type(JsonFieldType.STRING).description("디바이스 토큰"), fieldWithPath("profileImageUrl").type(JsonFieldType.STRING).description("프로필 이미지 URL"), + fieldWithPath("agreeWithEventInfo").type(JsonFieldType.BOOLEAN).description("이벤트, 광고성 정보 안내 수신 여부"), fieldWithPath("introduction").type(JsonFieldType.STRING).description("나의 한줄 소개"), fieldWithPath("tagList").type(JsonFieldType.ARRAY).description("태그 리스트"), fieldWithPath("educationalHistory").type(JsonFieldType.STRING).description("학력"), diff --git a/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupSeniorTest.java b/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupSeniorTest.java index acc25eb7..ad09fece 100644 --- a/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupSeniorTest.java +++ b/API-Server/src/test/java/swm/hkcc/LGTM/app/modules/auth/controller/SignupSeniorTest.java @@ -82,6 +82,7 @@ public void setUp(@Autowired WebApplicationContext webApplicationContext, RestDo .deviceToken("Test_DeviceToken") .profileImageUrl("http://test.ProfileImageUrl.com/img.png") .introduction("Test Introduction") + .isAgreeWithEventInfo(true) .tagList(Arrays.asList("JAVA", "Python", "JavaScript")) .companyInfo("(주)TestCompany") .careerPeriod(36) @@ -140,6 +141,7 @@ void seniorSignup() throws Exception { tableRow("deviceToken", "String", "디바이스 토큰"), tableRow("profileImageUrl", "String", "프로필 이미지 URL"), tableRow("introduction", "String", "나의 한줄 소개, 최대 500자, 클라이언트에서 trim()처리하여 보낸다"), + tableRow("agreeWithEventInfo", "boolean", "이벤트, 광고성 정보 안내 수신 여부"), tableRow("tagList", "List", "태그 리스트, 텍스트의 리스트로 전달한다. 1개 이상이어야 한다. 선택가능한 태그 외의 문자열이 전달될 경우 400에러 반환"), tableRow("companyInfo", "String", "회사 정보, 법인명에 해당하는 이름"), tableRow("careerPeriod", "Integer", "경력 기간, 개월 단위로 입력, 1 이상의 정수, 12개월 이상이어야 한다."), @@ -176,6 +178,7 @@ void seniorSignup() throws Exception { fieldWithPath("nickName").type(JsonFieldType.STRING).description("닉네임"), fieldWithPath("deviceToken").type(JsonFieldType.STRING).description("디바이스 토큰"), fieldWithPath("profileImageUrl").type(JsonFieldType.STRING).description("프로필 이미지 URL"), + fieldWithPath("agreeWithEventInfo").type(JsonFieldType.BOOLEAN).description("이벤트, 광고성 정보 안내 수신 여부"), fieldWithPath("introduction").type(JsonFieldType.STRING).description("자기소개"), fieldWithPath("tagList").type(JsonFieldType.ARRAY).description("태그 리스트"), fieldWithPath("companyInfo").type(JsonFieldType.STRING).description("회사 정보"),