-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
126 additions
and
48 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
...est/skhuming/error/dto/ErrorResponse.java → ...uming/global/error/dto/ErrorResponse.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,13 +1,12 @@ | ||
package com.itcontest.skhuming.error.dto; | ||
package com.itcontest.skhuming.global.error.dto; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ErrorResponse { | ||
private final String message; | ||
|
||
public ErrorResponse(final String message) { | ||
this.message = message; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
} | ||
} |
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/com/itcontest/skhuming/member/api/dto/response/DepartmentRankResDto.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 com.itcontest.skhuming.member.api.dto.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class DepartmentRankResDto { | ||
|
||
private Long departmentId; | ||
private String department; | ||
private int score; | ||
|
||
public DepartmentRankResDto(Long departmentId, String department, int score) { | ||
this.departmentId = departmentId; | ||
this.department = department; | ||
this.score = score; | ||
} | ||
} |
8 changes: 6 additions & 2 deletions
8
src/main/java/com/itcontest/skhuming/member/api/dto/response/MemberRankResDto.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,23 +1,27 @@ | ||
package com.itcontest.skhuming.member.api.dto.response; | ||
|
||
import com.itcontest.skhuming.member.domain.Tier; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class MemberRankResDto { | ||
|
||
private Long memberId; | ||
private Tier tier; | ||
private int score; | ||
private String nickname; | ||
private String department; | ||
private int myRanking; | ||
|
||
public MemberRankResDto(Long memberId, Tier tier, int score, String nickname, String department) { | ||
public MemberRankResDto(Long memberId, Tier tier, int score, String nickname, String department, int myRanking) { | ||
this.memberId = memberId; | ||
this.tier = tier; | ||
this.score = score; | ||
this.nickname = nickname; | ||
this.department = department; | ||
this.myRanking = myRanking; | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
...ain/java/com/itcontest/skhuming/member/domain/repository/MemberScrapNoticeRepository.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,13 +1,28 @@ | ||
package com.itcontest.skhuming.member.domain.repository; | ||
|
||
import com.itcontest.skhuming.member.domain.Member; | ||
import com.itcontest.skhuming.member.domain.MemberScrapNotice; | ||
import com.itcontest.skhuming.notice.domain.Notice; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
|
||
@Repository | ||
public interface MemberScrapNoticeRepository extends JpaRepository<MemberScrapNotice, Long> { | ||
List<MemberScrapNotice> findByNotice(Notice notice); | ||
|
||
@Query("select m " + | ||
"from MemberScrapNotice m " + | ||
"where m.member = :member " ) | ||
List<MemberScrapNotice> findByMyScrapNotice(@Param("member") Member member); | ||
|
||
@Query("select m " + | ||
"from MemberScrapNotice m " + | ||
"where m.member = :member ") | ||
Page<MemberScrapNotice> findByMyScrapNotice(@Param("member") Member member, PageRequest pageRequest); | ||
} |
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.