-
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.
Merge pull request #20 from giwoong01/develop
페이징 기능 구현
- Loading branch information
Showing
23 changed files
with
368 additions
and
39 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
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
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
35 changes: 35 additions & 0 deletions
35
src/main/java/com/itcontest/skhuming/member/domain/MemberHistoryMileage.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,35 @@ | ||
package com.itcontest.skhuming.member.domain; | ||
|
||
import com.itcontest.skhuming.mileage.domain.Mileage; | ||
import lombok.Getter; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@Getter | ||
public class MemberHistoryMileage { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
private String systemDate; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "mileage_id") | ||
private Mileage mileage; | ||
|
||
protected MemberHistoryMileage() { | ||
|
||
} | ||
|
||
public MemberHistoryMileage(Member member, Mileage mileage, String systemDate) { | ||
this.member = member; | ||
this.mileage = mileage; | ||
this.systemDate = systemDate; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
.../java/com/itcontest/skhuming/member/domain/repository/MemberHistoryMileageRepository.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 com.itcontest.skhuming.member.domain.repository; | ||
|
||
import com.itcontest.skhuming.member.domain.Member; | ||
import com.itcontest.skhuming.member.domain.MemberHistoryMileage; | ||
import com.itcontest.skhuming.mileage.domain.Mileage; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface MemberHistoryMileageRepository extends JpaRepository<MemberHistoryMileage, Long> { | ||
MemberHistoryMileage findByMemberAndMileage(Member member, Mileage mileage); | ||
boolean existsByMemberAndMileage(Member member, Mileage mileage); | ||
} |
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
13 changes: 13 additions & 0 deletions
13
...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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.itcontest.skhuming.member.domain.repository; | ||
|
||
import com.itcontest.skhuming.member.domain.MemberScrapNotice; | ||
import com.itcontest.skhuming.notice.domain.Notice; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
|
||
@Repository | ||
public interface MemberScrapNoticeRepository extends JpaRepository<MemberScrapNotice, Long> { | ||
List<MemberScrapNotice> findByNotice(Notice notice); | ||
} |
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/itcontest/skhuming/mileage/api/response/MileageHistoryResDto.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,25 @@ | ||
package com.itcontest.skhuming.mileage.api.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class MileageHistoryResDto { | ||
|
||
private Long mileageId; | ||
|
||
private String title; | ||
|
||
private int mileageScore; | ||
|
||
private String systemDate; | ||
|
||
public MileageHistoryResDto(Long mileageId, String title, int mileageScore, String systemDate) { | ||
this.mileageId = mileageId; | ||
this.title = title; | ||
this.mileageScore = mileageScore; | ||
this.systemDate = systemDate; | ||
} | ||
} |
Oops, something went wrong.