@ClassName LikeService @Description 用户对某个文档进行点赞或者收藏的操作 @Author luojiarui @Date 2023/2/2 22:07 @Version 1.0
| 8 | * @Version 1.0 |
| 9 | **/ |
| 10 | public interface LikeService { |
| 11 | |
| 12 | /** |
| 13 | * 增加点赞,取消点赞;增加收藏,取消收藏 |
| 14 | * @param userId 用户id |
| 15 | * @param entityType 实体类型:1:点赞;2:收藏 |
| 16 | * @param entityId 实体的id |
| 17 | */ |
| 18 | void like(String userId, Integer entityType, String entityId); |
| 19 | |
| 20 | /** |
| 21 | * 获取点赞的数量 |
| 22 | * @param entityType 实体类型 |
| 23 | * @param entityId 实体id |
| 24 | * @return 返回点赞的数量 |
| 25 | */ |
| 26 | Long findEntityLikeCount(Integer entityType, String entityId); |
| 27 | |
| 28 | /** |
| 29 | * 获取当前用户点赞的状态 |
| 30 | * @param userId 用户id |
| 31 | * @param entityType 实体类型:1:点赞;2:收藏 |
| 32 | * @param entityId 实体的id |
| 33 | * @return 返回该用户点赞的状态 |
| 34 | */ |
| 35 | int findEntityLikeStatus(String userId, Integer entityType, String entityId); |
| 36 | |
| 37 | /** |
| 38 | * @Author luojiarui |
| 39 | * @Description 从Redis中同步数据到数据库中 |
| 40 | * @Date 22:12 2023/4/3 |
| 41 | * @Param [] |
| 42 | **/ |
| 43 | void transLikedFromRedis2DB(); |
| 44 | |
| 45 | } |
no outgoing calls
no test coverage detected