package com.jeeplus.finance.invoice.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.finance.invoice.domain.CwFinanceInvoice;
import com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
//@InterceptorIgnore(tenantLine = "true")
public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {

    public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);
    @InterceptorIgnore(tenantLine = "true")
    public CwFinanceInvoiceDTO queryById(@Param("id") String id);

    public List<String> getIdByProjectId(@Param("id") String id);

    public List<CwFinanceInvoiceDTO> getByIds(@Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);

    public List<String> getIdByContractId(@Param("id") String id);

    public List<String> getIdByClientId(@Param("id") String id);

    /**
     * 根据发票id清空发票的收款日期
     * @param id
     */
    void setReceivablesDateNull(@Param("id") String id);

    /**
     * 根据发票id清空发票的收款日期
     * @param cwFinanceInvoice
     */
    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(CwFinanceInvoice cwFinanceInvoice);
    @InterceptorIgnore(tenantLine = "true")
    CwFinanceInvoiceDTO queryByProcId(@Param("id")String id);
}




