package com.jeeplus.finance.projectReportArchive.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportBorrow;
import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportBorrowMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2022-11-27 13:52
 **/
public interface CwProjectReportBorrowMapper extends BaseMapper<CwProjectReportBorrow> {

    void updateStatusById(@Param("id") String id, @Param("borrowType")String borrowType);

    void updateStatusByContractInfoId(@Param("id") String id, @Param("borrowType")String borrowType);

    @InterceptorIgnore(tenantLine = "true")
    CwProjectReportBorrow selectFileByContractInfoId (@Param("id") String id);

    void updateMessageByBorrowId(@Param("id") String id, @Param("borrowType")String borrowType, @Param("type")String type);

    void deleteMessageById(@Param("id") String id);

    List<CwProjectReportBorrowMessage> findMessageList(@Param("id") String id);

    CwProjectReportBorrow selectByInfoId(String id);

    /**
     * 查询临期合同借用信息
     * @param adventDay
     * @return
     */
    List<CwProjectReportBorrowMessage> getAdventMessageList(@Param("adventDay") String adventDay);
}
