You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
890 B
30 lines
890 B
package com.youlai.boot.mini.mapper;
|
|
|
|
import com.youlai.boot.mini.model.entity.MiniStrayAnimalNoteCommentLike;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
/**
|
|
* 流浪动物笔记评论点赞表 Mapper 接口
|
|
*
|
|
* @author jwy
|
|
* @since
|
|
*/
|
|
public interface MiniStrayAnimalNoteCommentLikeMapper extends BaseMapper<MiniStrayAnimalNoteCommentLike> {
|
|
|
|
/**
|
|
* 查询用户是否点赞该评论
|
|
*/
|
|
Integer selectUserLikeCount(@Param("commentId") Long commentId, @Param("userId") Long userId);
|
|
|
|
/**
|
|
* 新增或更新点赞记录(原子操作)
|
|
*/
|
|
int insertOrUpdateLike(MiniStrayAnimalNoteCommentLike like);
|
|
|
|
/**
|
|
* 逻辑删除点赞记录(取消点赞)
|
|
*/
|
|
int deleteLike(@Param("commentId") Long commentId, @Param("userId") Long userId, @Param("currentTime") Long currentTime);
|
|
|
|
}
|
|
|