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
844 B

package com.youlai.boot.mini.mapper;
import com.youlai.boot.mini.model.entity.MiniStrayAnimalNoteLike;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* 流浪动物笔记点赞表 Mapper 接口
*
* @author jwy
* @since
*/
public interface MiniStrayAnimalNoteLikeMapper extends BaseMapper<MiniStrayAnimalNoteLike> {
/**
* 查询用户是否点赞该笔记
*/
Integer selectUserLikeCount(@Param("noteId") Long noteId, @Param("userId") Long userId);
/**
* 新增或更新点赞记录原子操作
*/
int insertOrUpdateLike(MiniStrayAnimalNoteLike like);
/**
* 逻辑删除点赞记录取消点赞
*/
int deleteLike(@Param("noteId") Long noteId, @Param("userId") Long userId, @Param("currentTime") Long currentTime);
}