forked from prgrms-be-devcourse/NBB1_2_3_Team10
-
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.
bean 충돌이 생겨서 클래스 이름을 좀 변경 했습니다
- Loading branch information
Showing
8 changed files
with
36 additions
and
40 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
...raction/like/controller/LikeController.kt → ...feedLike/controller/FeedLikeController.kt
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
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/org/tenten/bittakotlin/feedInteraction/feedLike/dto/FeedLikeDTO.kt
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,7 @@ | ||
package org.tenten.bittakotlin.feedInteraction.feedLike.dto | ||
|
||
data class FeedLikeDTO( | ||
val feedId: Long?, | ||
val profileId: Long?, | ||
val isLiked: Boolean | ||
) |
8 changes: 2 additions & 6 deletions
8
...otlin/feedInteraction/like/entity/Like.kt → ...edInteraction/feedLike/entity/FeedLike.kt
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
8 changes: 4 additions & 4 deletions
8
...raction/like/repository/LikeRepository.kt → ...feedLike/repository/FeedLikeRepository.kt
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,13 @@ | ||
package org.tenten.bittakotlin.feedInteraction.like.repository | ||
package org.tenten.bittakotlin.feedInteraction.feedLike.repository | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.tenten.bittakotlin.feed.entity.Feed | ||
import org.tenten.bittakotlin.feedInteraction.like.entity.Like | ||
import org.tenten.bittakotlin.feedInteraction.feedLike.entity.FeedLike | ||
import org.tenten.bittakotlin.profile.entity.Profile | ||
import java.util.* | ||
|
||
|
||
interface LikeRepository : JpaRepository<Like, Long> { | ||
fun findByFeedAndProfile(feed: Feed, profile: Profile): Optional<Like> | ||
interface FeedLikeRepository : JpaRepository<FeedLike, Long> { | ||
fun findByFeedAndProfile(feed: Feed, profile: Profile): Optional<FeedLike> | ||
fun countByFeedAndLikedTrue(feed: Feed): Long | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/org/tenten/bittakotlin/feedInteraction/feedLike/service/FeedLikeService.kt
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,8 @@ | ||
package org.tenten.bittakotlin.feedInteraction.feedLike.service | ||
|
||
import org.tenten.bittakotlin.feedInteraction.feedLike.dto.FeedLikeDTO | ||
|
||
interface FeedLikeService { | ||
fun toggleLike(feedId: Long, profileId: Long): FeedLikeDTO | ||
fun getLikeCount(feedId: Long): Long | ||
} |
20 changes: 10 additions & 10 deletions
20
...teraction/like/service/LikeServiceImpl.kt → ...n/feedLike/service/FeedLikeServiceImpl.kt
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
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/org/tenten/bittakotlin/feedInteraction/like/dto/LikeDTO.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/kotlin/org/tenten/bittakotlin/feedInteraction/like/service/LikeService.kt
This file was deleted.
Oops, something went wrong.