package com.jeeplus.business.drive.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.drive.domain.DriveApply;
import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DriveApplyMapper extends BaseMapper<DriveApply> {

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

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

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

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

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

    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(@Param("driveApply") DriveApply driveApply);
}
