-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] 조회수 로직 추가 및 자잘한 수정을 위한 Service 로직 추가, 수정, 그리고 viewCount 레포지토리 추가
- 글쓴이가 자신의 글에 방문해도 조회수 늘지 않음
- Loading branch information
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...a/com/haejwo/tripcometrue/domain/triprecord/repository/TripRecordViewCountRepository.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.haejwo.tripcometrue.domain.triprecord.repository; | ||
|
||
import com.haejwo.tripcometrue.domain.triprecord.entity.TripRecord; | ||
import com.haejwo.tripcometrue.domain.triprecord.entity.TripRecordViewCount; | ||
import java.time.LocalDate; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface TripRecordViewCountRepository extends JpaRepository<TripRecordViewCount, Long> { | ||
|
||
Optional<TripRecordViewCount> findByTripRecordAndDate(TripRecord tripRecord, LocalDate date); | ||
|
||
} |
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