package com.jeeplus.finance.contractRegistration.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.finance.contractRegistration.domain.ContractFile;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2022-11-10 16:10
 **/
public interface ContractFileMapper extends BaseMapper<ContractFile> {

    List<WorkAttachmentInfo> findDtos(@Param("id") String id);

    ContractFile findById (@Param("id") String id);

    ContractFile findByInfoId (@Param("id") String id);

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

    ContractFile selectFileByContractInfoId (@Param("id") String id);

    List<WorkAttachmentInfo> findList(@Param("id") String id);

    Integer findIsExit(@Param("id") String id, @Param("name")String name);

    /**
     * 根据attachmentId删除上传文件信息
     */
    void deleteFileInfo(String attachmentId);

    /**
     * 根据合同登记主键值找到对应归档信息
     * @param id
     */
    ContractFile getInfoByConId(String id);
    @InterceptorIgnore(tenantLine = "true")
    ContractFile getById(String id);
}
