package com.jeeplus.business.goOut.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.goOut.domain.GoOut;
import com.jeeplus.business.goOut.service.dto.GoOutDTO;
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 GoOutMapper extends BaseMapper<GoOut> {

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

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

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

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

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

    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(@Param("goOut") GoOut goOut);
}
