-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/#22 학생회 회원가입 시 당선 정보가 담긴 사진을 첨부하고 이를 관리자가 승인해야만 회원가입이 되도록 구현 #32
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
Merged
Merged
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5094fcb
feat: 관리자 엔티티 구현
1winhyun 3b6eb63
feat: 관리자 관련 jwt 추가
1winhyun 13fcbf8
feat: 관리자 로그인 기능 구현
1winhyun 0c6739f
refactor: 관리자 로그인 기능 PermitUrlConfig 추가
1winhyun d8f6778
refactor: conflict 해결
1winhyun f628d13
feat: conflict(충돌) 해결
1winhyun 95e55d6
Merge remote-tracking branch 'origin/refactor/#22' into refactor/#22
1winhyun bfddc06
refactor: CurrentManagerId 어노테이션 분리
1winhyun 2bfd2b5
Merge remote-tracking branch 'origin/dev' into refactor/#22
1winhyun 687c944
refactor: WebMvcConfig에 CurrentManagerIdArgumentResolver 추가
1winhyun 2367375
refactor: StudentCouncil 관리자 승인 여부 컬럼 추가
1winhyun 5d49fec
refactor: 학생회 회원가입 시 토큰 미발급되며 학생회 인증 여부는 false가 되도록 수정
1winhyun 8a3d957
feat: 학생회 회원가입 요청 시 관리자 인증 및 결과 메일 전송 로직 구현
1winhyun 1d7dfdf
refactor: 학생회 대표자 로그인 및 전용 api의 경우 학생회 조회 로직에 관리자 승인 받은 상태 조건 추가
1winhyun b76da83
feat: StudentCouncil에 councilName 컬럼 추가 및 학생회 이름 생성 로직 구현
1winhyun 5126e4d
refactor: StudentCouncilSignUpRequest에 당선 사진 추가
1winhyun 53fb30e
feat: 학생회 대표자 회원가입 요청 목록 조회 기능 구현
1winhyun cda307d
refactor: manager 관련 에러코드 변경
1winhyun 49ae65d
refactor: 학생회가 작성하는 글의 업데이트, 삭제 기능 승인되지 않은 학생회는 불가능하도록 승인상태 확인 추가
1winhyun 811b700
refactor: manager의 PasswordNotCorrectException import 경로 수정
1winhyun e07bc01
refactor: managerApprove 메서드명 오타 수정
1winhyun dbd9496
refactor: getCertifyRequestCouncil 승인 대기중인 학생회만 조회되도록 수정
1winhyun 685b4be
refactor: PermitUrlConfig 중복 제거
1winhyun 1284fa8
refactor: StudentCouncilSignUpRequest 당선 사진 @NotBlank 추가
1winhyun e9f06f9
refactor: managerApproved 컬럼 null이 될 수 없도록 설정
1winhyun 2b698dd
refactor: approveOrDenyCouncil에서 학생회의 경우 미승인 학생회만 조회되도록 수정
1winhyun 5f71d89
refactor: 학생회 회원가입 id 중복 검증 api 구현
1winhyun cebfdb1
refactor: setCouncilName을 generateCouncilName으로 메서드명 수정
1winhyun 7e65f62
refactor: validateLoginId 앤드포인트 수정
1winhyun 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
34 changes: 34 additions & 0 deletions
34
src/main/java/com/campus/campus/domain/council/application/util/CouncilNameGenerator.java
This file contains hidden or 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,34 @@ | ||
| package com.campus.campus.domain.council.application.util; | ||
|
|
||
| import org.springframework.stereotype.Component; | ||
|
|
||
| import com.campus.campus.domain.council.domain.entity.CouncilType; | ||
| import com.campus.campus.domain.council.domain.entity.StudentCouncil; | ||
|
|
||
| @Component | ||
| public class CouncilNameGenerator { | ||
| public String buildCouncilName(StudentCouncil studentCouncil) { | ||
| String schoolName = studentCouncil.getSchool() != null ? studentCouncil.getSchool().getSchoolName() : ""; | ||
| CouncilType councilType = studentCouncil.getCouncilType(); | ||
|
|
||
| return switch (councilType) { | ||
| case SCHOOL_COUNCIL -> String.format("%s 총학생회", schoolName).trim(); | ||
| case COLLEGE_COUNCIL -> String.format("%s %s 학생회", schoolName, getCollegeName(studentCouncil)).trim(); | ||
| case MAJOR_COUNCIL -> String.format("%s %s 학생회", schoolName, getMajorName(studentCouncil)).trim(); | ||
| }; | ||
| } | ||
|
|
||
| private String getCollegeName(StudentCouncil studentCouncil) { | ||
| if (studentCouncil.getCollege() == null) { | ||
| return ""; | ||
| } | ||
| return studentCouncil.getCollege().getCollegeName(); | ||
| } | ||
|
|
||
| private String getMajorName(StudentCouncil studentCouncil) { | ||
| if (studentCouncil.getMajor() == null) { | ||
| return ""; | ||
| } | ||
| return studentCouncil.getMajor().getMajorName(); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
11 changes: 11 additions & 0 deletions
11
...com/campus/campus/domain/manager/application/dto/request/CouncilApproveOrDenyRequest.java
This file contains hidden or 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,11 @@ | ||
| package com.campus.campus.domain.manager.application.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record CouncilApproveOrDenyRequest( | ||
| @NotNull | ||
| @Schema(description = "인증 결과", example = "true") | ||
| boolean certifyResult | ||
| ) { | ||
|
Comment on lines
+6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
primitive
🔎 제안하는 수정 public record CouncilApproveOrDenyRequest(
@NotNull
@Schema(description = "인증 결과", example = "true")
- boolean certifyResult
+ Boolean certifyResult
) {
}🤖 Prompt for AI Agents |
||
| } | ||
15 changes: 15 additions & 0 deletions
15
...in/java/com/campus/campus/domain/manager/application/dto/request/ManagerLoginRequest.java
This file contains hidden or 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,15 @@ | ||
| package com.campus.campus.domain.manager.application.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
|
|
||
| public record ManagerLoginRequest( | ||
| @NotBlank | ||
| @Schema(description = "로그인 id", example = "illtathebest1") | ||
| String loginId, | ||
|
|
||
| @NotBlank | ||
| @Schema(description = "로그인 비밀번호", example = "illtathebest") | ||
| String password | ||
| ) { | ||
| } |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: our-campUS/our-campUS-BE
Length of output: 150
🏁 Script executed:
Repository: our-campUS/our-campUS-BE
Length of output: 3225
councilType에@NotNull검증 추가 권장councilType필드는 데이터베이스 레벨에서nullable = false제약이 있어 NULL 값이 저장될 수 없습니다. 다만 엔티티 수준의 유효성 검증을 강화하기 위해@NotNull또는@jakarta.validation.constraints.NotNull애너테이션을 추가하는 것이 좋습니다. 이는 메모리 상태에서의 객체 생성 시에도 안전성을 보장합니다.🤖 Prompt for AI Agents