-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor attendance api #28
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5f1e9d7
refactor : 파일 위치 변경, 필드 이름 수정
ekgns33 a8d3090
feat : JPQL 쿼리를 위한 DTO생성, 쿼리 수정
ekgns33 88a10ce
feat: 다대일 연관관계 생성, JPQL 수정
ekgns33 06c1715
refactor : 출석 서비스 코드 분리, validate를 도메인 내부로 이동
ekgns33 b5bf46f
feat : JPQL 쿼리를 통해서 한번에 조회한 데이터 dto로 전환하는 코드작성
ekgns33 42d2645
fix : 엔티티를 그대로 노출하던 로직 수정, dto로 변환
ekgns33 a075735
refactor : 네이밍 수정
ekgns33 fcb6b0a
test : 변경된 로직에 따른 테스트코드 수정 및 restdocs 문서화
ekgns33 f5229d1
refactor : 다중 조인시 기준 테이블 변경
ekgns33 2cfbf2c
test : Attendance 유닛테스트
ekgns33 547a80e
chore : 빌드파일 작성
ekgns33 c3fdbf4
style : jpql 대문자표기
ekgns33 b345e34
test : import 수정
ekgns33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Start with a base image containing Java runtime | ||
FROM openjdk:17-jdk-alpine | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the executable jar file to the working directory | ||
COPY build/libs/platform-core-0.0.1-SNAPSHOT.jar app.jar | ||
|
||
# Expose the port the application runs on | ||
EXPOSE 8080 | ||
|
||
# Command to run the executable jar file | ||
ENTRYPOINT ["java", "-jar", "app.jar"] |
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 @@ | ||
#!/bin/bash | ||
|
||
# 프로젝트 클린 및 빌드 | ||
./gradlew clean bootJar | ||
|
||
# Docker 이미지 빌드 | ||
docker build -t ekgns33/gdsc-spring:latest . | ||
|
||
# Docker 이미지 푸시 | ||
docker push ekgns33/gdsc-spring:latest | ||
|
||
# 완료 메시지 | ||
echo "Docker image pushed to ekgns33/gdsc-spring:latest successfully." |
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
20 changes: 20 additions & 0 deletions
20
src/main/java/gdsc/konkuk/platformcore/application/attendance/AttendanceServiceHelper.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,20 @@ | ||
package gdsc.konkuk.platformcore.application.attendance; | ||
|
||
import gdsc.konkuk.platformcore.application.attendance.exceptions.AttendanceErrorCode; | ||
import gdsc.konkuk.platformcore.application.attendance.exceptions.AttendanceNotFoundException; | ||
import gdsc.konkuk.platformcore.domain.attendance.entity.Attendance; | ||
import gdsc.konkuk.platformcore.domain.attendance.repository.AttendanceRepository; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class AttendanceServiceHelper { | ||
|
||
public static Attendance findAttendanceById( | ||
AttendanceRepository attendanceRepository, Long attendanceId) { | ||
return attendanceRepository | ||
.findById(attendanceId) | ||
.orElseThrow( | ||
() -> AttendanceNotFoundException.of(AttendanceErrorCode.ATTENDANCE_NOT_FOUND)); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
src/main/java/gdsc/konkuk/platformcore/application/attendance/ParticipantMapper.java
This file was deleted.
Oops, something went wrong.
13 changes: 6 additions & 7 deletions
13
...pplication/attendance/AttendanceInfo.java → ...attendance/dtos/MemberAttendanceInfo.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,20 +1,19 @@ | ||
package gdsc.konkuk.platformcore.application.attendance; | ||
package gdsc.konkuk.platformcore.application.attendance.dtos; | ||
|
||
import java.time.LocalDateTime; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor | ||
public class AttendanceInfo { | ||
@Builder | ||
public class MemberAttendanceInfo { | ||
private Long attendanceId; | ||
private Long eventId; | ||
private Long memberId; | ||
private Long participantId; | ||
private boolean isAttended; | ||
private LocalDateTime attendanceDate; | ||
private boolean attendance; | ||
private Long participantId; | ||
} |
24 changes: 24 additions & 0 deletions
24
...n/java/gdsc/konkuk/platformcore/application/attendance/dtos/MemberAttendanceQueryDto.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,24 @@ | ||
package gdsc.konkuk.platformcore.application.attendance.dtos; | ||
|
||
import gdsc.konkuk.platformcore.domain.member.entity.MemberRole; | ||
import java.time.LocalDateTime; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor | ||
public class MemberAttendanceQueryDto { | ||
private Long eventId; | ||
private Long memberId; | ||
private String memberName; | ||
private MemberRole memberRole; | ||
private String memberDepartment; | ||
private Long participantId; | ||
private Long attendanceId; | ||
private LocalDateTime attendanceDate; | ||
private boolean isAttended; | ||
} |
54 changes: 0 additions & 54 deletions
54
src/main/java/gdsc/konkuk/platformcore/application/member/MemberAttendanceInfo.java
This file was deleted.
Oops, something went wrong.
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.
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.
하하 sh 부럽다...