package com.community.huiju.dao;

import com.community.huiju.model.TpBillStatement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

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

    int insert(TpBillStatement record);

    int insertSelective(TpBillStatement record);

    TpBillStatement selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpBillStatement record);

    int updateByPrimaryKey(TpBillStatement record);

    /**
     * 根据小区id，缴费单id 查询
     * @param communityId
     * @param tpBillInvoiceId
     * @return
     */
    @ResultMap("BaseResultMap")
    @Select("select *  from tp_bill_statement where community_id = #{communityId} and bill_invoice_id = #{tpBillInvoiceId}")
    TpBillStatement selectByCommunityIdAndBillInvoiceId(Integer communityId, Integer tpBillInvoiceId);
}