package com.community.huiju.dao;

import com.community.huiju.model.TpTicketRecord;
import com.community.huiju.model.TpTicketRecordComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TpTicketRecordCommentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TpTicketRecordComment record);

    int insertSelective(TpTicketRecordComment record);

    TpTicketRecordComment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpTicketRecordComment record);

    int updateByPrimaryKey(TpTicketRecordComment record);

    /**
     * 根据工单ID,最新的几条 查询出最新的追答记录
     *
     *  size 表示最新几条
     *  tickerId 工单ID
     *
     * @param map
     * @return
     */
    List<TpTicketRecordComment> selectByTicketId(Map map);
    
    /**
     * 查询出这个处理撞他下所有的回复数据
     * @param tpTicketRecord
     * @return
     */
	List<TpTicketRecordComment> selectByTicketRecordId(TpTicketRecord tpTicketRecord);

    /**
     * 查询当前最后回复物业人员1.5需求指定要求
     * @param communityId
     * @param ticketId
     * @return
     */
    TpTicketRecordComment getUuID(@Param("communityId") Integer communityId, @Param("ticketId") Integer ticketId);
}