package com.jeeplus.business.evection.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.evection.domain.Evection;
import com.jeeplus.business.evection.service.dto.EvectionDTO;
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 EvectionMapper extends BaseMapper<Evection> {

    IPage<EvectionDTO> findPageList(@Param(Constants.WRAPPER) QueryWrapper<EvectionDTO> queryWrapper, Page<EvectionDTO> 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")
    EvectionDTO findById(@Param("id") String id);

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

    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(@Param("evection") Evection evection);
}
