package com.huiju.estateagents.property.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huiju.estateagents.property.model.TpTransaction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 物业web端二手交易表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2018-12-29
 */
@Mapper
public interface TpTransactionMapper extends BaseMapper<TpTransaction> {

	List<TpTransaction> selectListByParams(Page page, @Param("transactionTitle") String transactionTitle, @Param("userName") String userName, @Param("id") Integer id, @Param("status") String status, @Param("communityId") Integer communityId);


    /**
     * 作废话题
     * @param uuid
     * @param uuidType
     */
    @Update("update tp_transaction set status = 0 where uuid = #{uuid} and uuid_type = #{uuidType}")
    void invalidByUuidAndUuidType(@Param("uuid") Integer uuid, @Param("uuidType") String uuidType);
}
