package com.community.huiju.dao;

import com.community.huiju.model.TpTransactionLike;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TpTransactionLikeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TpTransactionLike record);

    int insertSelective(TpTransactionLike record);

    TpTransactionLike selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpTransactionLike record);

    int updateByPrimaryKey(TpTransactionLike record);

    /**
     * 点赞
     * @param invitationId
     * @param communityId
     * @return
     */
    Integer likeCount(@Param("invitationId") Integer invitationId, @Param("communityId") Integer communityId);

    /**
     * 踩
     * @param invitationId
     * @param communityId
     * @return
     */
    Integer nolikeCount(@Param("invitationId") Integer invitationId, @Param("communityId") Integer communityId);

    /**
     * 查询当前人是否存在数据
     * @param invitationId
     * @param communityId
     * @param userId
     * @return
     */
    TpTransactionLike getinvitationId(@Param("invitationId") Integer invitationId, @Param("communityId") Integer communityId, @Param("userId") Integer userId);

}