package com.jkcredit.invoice.mapper.binvoce;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jkcredit.invoice.model.entity.invoice.HcInvoice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 红充发票接口
 * @author mumuxigua
 */
@Repository
public interface HcInvoiceMapper extends BaseMapper<HcInvoice> {
    /**
     *  插入红冲发票
     * @param hcInvoice
     * @return
     */
    int insertHcInvoice(HcInvoice hcInvoice);

    /**
     * 根据月份删除
     * @param yearMonth
     * @return
     */
    int deleteByMounth(String yearMonth);

    /**
     * 查询红充发票列表
     * @param hcInvoice
     * @return
     */
    List<HcInvoice> selectInvoiceByCondition(HcInvoice hcInvoice);

    /**
     * 分页查询红充发票列表
     * @param page
     * @param hcInvoice
     * @return
     */
    IPage<HcInvoice> selectAllByPage(Page page, @Param("hcInvoice") HcInvoice hcInvoice);
}
