package com.jeeplus.business.useSeal.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.business.useSeal.domain.Signet;
import com.jeeplus.business.useSeal.service.dto.SignetDTO;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SignetMapper extends BaseMapper<Signet> {

    IPage<SignetDTO> findPageList(Page<SignetDTO> signetDTOPage,@Param(Constants.WRAPPER) QueryWrapper<SignetDTO> queryWrapper);

    @InterceptorIgnore(tenantLine = "true")
    List<WorkAttachmentInfo> findFileList(@Param("id") String id);

    @InterceptorIgnore(tenantLine = "true")
    Integer findIsExit(@Param("id") String id, @Param("name")String name);

    SignetDTO findById(String id);

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

    @InterceptorIgnore(tenantLine = "true")
    List<Signet> findSeal(@Param("newDate") Date newDate);
    @InterceptorIgnore(tenantLine = "true")
    List<Signet> findSealInTime(@Param("newDate") Date newDate);

    @InterceptorIgnore(tenantLine = "true")
    void updateStatusBySealId(String id);
}
