package com.jeeplus.test.cw.invoice.mapper;

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.test.cw.invoice.domain.CwFinanceInvoice;
import com.jeeplus.test.cw.invoice.service.dto.CwFinanceInvoiceDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {

    public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper, @Param("officeIds") String officeIds);

    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);
}




