package com.chinaweal.aiccs.aiccs.abnormal.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSAttachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinaweal.aiccs.aiccs.revoke.entity.dto.AttachmentWritDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 监管附件上传信息表 Mapper 接口
 * </p>
 *
 * @author <a href="https://blog.lroyia.top">lroyia</a>
 * @since 2021-01-19
 */
public interface TSAttachmentMapper extends BaseMapper<TSAttachment> {

    /**
     * 查询附件列表
     * @param tsWritModel 查询参数
     * @return 查询结果
     * @author lroyia
     * @since 2021年1月26日 15:03:47
     */
    List<TSAttachment> selectttachment(@Param("tsWritModel") TSAttachment tsWritModel);

    boolean saveBatchWithList(List<TSAttachment> list);

    IPage<AttachmentWritDto> selectWritsList(IPage<AttachmentWritDto> page,@Param("dto") AttachmentWritDto attachmentWritDto);

    /**
     * 旧系统附件
     * @param SAPPROVECODE
     * @return
     */
    List<TSAttachment> queryFileByHistory(@Param("SAPPROVECODE")String SAPPROVECODE);

    TSAttachment queryHistoryFileById(@Param("sevidencecode")String sevidencecode);

    IPage<AttachmentWritDto> selectWritsListzx(Page<AttachmentWritDto> page, @Param("dto")AttachmentWritDto attachmentWritDto);
}
