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.DriveMaintain;
import com.jeeplus.business.drive.service.dto.DriveMaintainDTO;
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 DriveMaintainMapper extends BaseMapper<DriveMaintain> {

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

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

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

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

    @InterceptorIgnore(tenantLine = "true")
    DriveMaintain findById(@Param("id") String id);

    void updateStatusById(@Param("status") String status,@Param("id") String id);
    @InterceptorIgnore(tenantLine = "true")
    void updateInfo(@Param("maintain") DriveMaintain maintain);
}
