-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from SW-CSS/develop
Release
- Loading branch information
Showing
32 changed files
with
557 additions
and
95 deletions.
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
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
2 changes: 1 addition & 1 deletion
2
backend/src/main/java/sw_css/admin/auth/application/dto/request/DeleteFacultyRequest.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package sw_css.admin.auth.application.dto.request; | ||
|
||
public record DeleteFacultyRequest( | ||
Long member_id | ||
Long faculty_id | ||
) { | ||
} |
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
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
29 changes: 29 additions & 0 deletions
29
...end/src/main/java/sw_css/admin/member/application/dto/response/FacultyMemberResponse.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,29 @@ | ||
package sw_css.admin.member.application.dto.response; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.PageImpl; | ||
import org.springframework.data.domain.Pageable; | ||
import sw_css.member.domain.FacultyMember; | ||
|
||
public record FacultyMemberResponse( | ||
Long id, | ||
Long facultyId, | ||
String email, | ||
String name, | ||
String phoneNumber) { | ||
public static FacultyMemberResponse from(final FacultyMember facultyMember) { | ||
return new FacultyMemberResponse( | ||
facultyMember.getMember().getId(), | ||
facultyMember.getId(), | ||
facultyMember.getMember().getEmail(), | ||
facultyMember.getMember().getName(), | ||
facultyMember.getMember().getPhoneNumber() | ||
); | ||
} | ||
|
||
public static Page<FacultyMemberResponse> from(final Page<FacultyMember> faculties, final Pageable pageable) { | ||
return new PageImpl<>(faculties.stream() | ||
.map(FacultyMemberResponse::from) | ||
.toList(), pageable, faculties.getTotalElements()); | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
...ain/java/sw_css/admin/milestone/persistence/StudentAndMilestoneTotalScoreInfoMapping.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,17 @@ | ||
package sw_css.admin.milestone.persistence; | ||
|
||
import jakarta.persistence.ColumnResult; | ||
import java.lang.reflect.Array; | ||
import java.util.List; | ||
import sw_css.milestone.domain.MilestoneGroup; | ||
|
||
public record StudentAndMilestoneTotalScoreInfoMapping( | ||
Long studentId, | ||
String studentName, | ||
String categoryIds, | ||
String categoryNames, | ||
String milestoneGroups, | ||
String limitScores, | ||
String scores, | ||
Long totalScore) { | ||
} |
26 changes: 26 additions & 0 deletions
26
backend/src/main/java/sw_css/member/domain/FacultySearchField.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,26 @@ | ||
package sw_css.member.domain; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
import lombok.RequiredArgsConstructor; | ||
import sw_css.member.exception.MemberException; | ||
import sw_css.member.exception.MemberExceptionType; | ||
|
||
@RequiredArgsConstructor | ||
public enum FacultySearchField { | ||
FACULTY_ID(1), | ||
MEMBER_NAME(2), | ||
MEMBER_EMAIL(3); | ||
|
||
final Integer fieldId; | ||
|
||
public static FacultySearchField fromValue(final Integer fieldId) { | ||
return Arrays.stream(values()).filter(field -> Objects.equals(field.getFieldId(), fieldId)).findFirst() | ||
.orElseThrow(() -> new MemberException( | ||
MemberExceptionType.INVALID_SEARCH_FIELD_ID)); | ||
} | ||
|
||
public Integer getFieldId() { | ||
return fieldId; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
backend/src/main/java/sw_css/member/domain/repository/FacultyMemberCustomRepository.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 sw_css.member.domain.repository; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.lang.Nullable; | ||
import sw_css.member.domain.FacultyMember; | ||
|
||
public interface FacultyMemberCustomRepository { | ||
|
||
Page<FacultyMember> findFacultyMembers(@Nullable final Integer field, | ||
@Nullable final String keyword, | ||
final Pageable pageable); | ||
} |
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
Oops, something went wrong.