package com.yunzhi.marketing.eContract.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yunzhi.marketing.bo.request.ContractRecordRequestBO;
import com.yunzhi.marketing.eContract.entity.TaContract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunzhi.marketing.eContract.entity.TaContractBusiness;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * <p>
 * 合同列表  Mapper 接口
 * </p>
 *
 * @author fxf
 * @since 2020-03-26
 */
@Mapper
@Component
public interface TaContractMapper extends BaseMapper<TaContract> {

    IPage<TaContract> listContractForAdmin(IPage<TaContract> pg,
                                           @Param("contractName") String contractName,
                                           @Param("archives") Boolean archives,
                                           @Param("signatoryName") String signatoryName,
                                           @Param("signatoryStatus") Integer signatoryStatus,
                                           @Param("customerName") String customerName,
                                           @Param("customerStatus") Integer customerStatus,
                                           @Param("archivesStartDate") LocalDate archivesStartDate,
                                           @Param("archivesEndDate") LocalDate archivesEndDate,
                                           @Param("orgId") Integer orgId);

    IPage<TaContract> listContractForChannel(IPage<TaContract> pg,
                                             @Param("bo") ContractRecordRequestBO bo);

    /**
     * 获取合同信息
     * @param raiseId
     * @return
     */
    TaContractBusiness selectContractInfoByRaiseId(@Param("raiseId") String raiseId);
}
