package com.youlai.boot.mini.mapper; import com.youlai.boot.mini.model.entity.MiniAdoptionDiaryCommentLike; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * 领养日记评论点赞表 Mapper 接口 * * @author jwy * @since */ public interface MiniAdoptionDiaryCommentLikeMapper extends BaseMapper { /** * 查询用户是否点赞该评论 */ Integer selectUserLikeCount(@Param("commentId") Long commentId, @Param("userId") Long userId); /** * 新增或更新点赞记录(原子操作) */ int insertOrUpdateLike(MiniAdoptionDiaryCommentLike like); /** * 逻辑删除点赞记录(取消点赞) */ int deleteLike(@Param("commentId") Long commentId, @Param("userId") Long userId, @Param("currentTime") Long currentTime); }