-
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.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
7 changed files
with
44 additions
and
5 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
26 changes: 26 additions & 0 deletions
26
src/main/java/org/recordy/server/place/domain/PlaceCacheEntity.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,26 @@ | ||
package org.recordy.server.place.domain; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.redis.core.RedisHash; | ||
import org.springframework.data.redis.core.index.Indexed; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
@RedisHash("place") | ||
public class PlaceCacheEntity { | ||
|
||
@Id | ||
private Long id; | ||
@Indexed | ||
private String platformId; | ||
|
||
|
||
public static PlaceCacheEntity from(Place place) { | ||
return new PlaceCacheEntity( | ||
place.getId(), | ||
place.getPlatformId() | ||
); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/org/recordy/server/place/repository/impl/PlaceRedisRepository.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,9 +1,9 @@ | ||
package org.recordy.server.place.repository.impl; | ||
|
||
import org.recordy.server.place.domain.PlaceEntity; | ||
import org.recordy.server.place.domain.PlaceCacheEntity; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface PlaceRedisRepository extends CrudRepository<PlaceEntity, Long> { | ||
public interface PlaceRedisRepository extends CrudRepository<PlaceCacheEntity, Long> { | ||
|
||
boolean existsByPlatformId(String platformId); | ||
} |
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