package com.huiju.estateagents.property.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huiju.estateagents.property.model.TpTicket;
import com.huiju.estateagents.property.vo.TpTicketVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 工单表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-02-14
 */
@Mapper
public interface TpTicketMapper extends BaseMapper<TpTicket> {

    IPage<TpTicket> ticketList(Page page, @Param("ticket") TpTicket ticket, @Param("userName") String UserNmae, @Param("updateUserNmae") String updateUserNmae, @Param("orgId") Integer orgId);
    TpTicketVO ticketDetails(@Param("id") Integer id);

    /**
     * 根据 小区ID 用户ID 类型 查询数据
     * @param map
     * @return
     */
    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,@Param("type") String type,@Param("personId") String personId,@Param("orgId") Integer orgId);

    TpTicket selectTpTicketName(@Param("orgId")Integer orgId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);

    void updateTpUserId(@Param("ticketId") Integer ticketId);
}
