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.

31 lines
875 B

package com.youlai.boot.mini.mapper;
import com.youlai.boot.mini.model.entity.MiniAdoptionDiaryCommentLike;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* 领养日记评论点赞表 Mapper 接口
*
* @author jwy
* @since
*/
public interface MiniAdoptionDiaryCommentLikeMapper extends BaseMapper<MiniAdoptionDiaryCommentLike> {
/**
* 查询用户是否点赞该评论
*/
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);
}