package org.ta.pddserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.ta.pdd.entity.TempStorageEntity;

import java.util.List;

@Mapper
public interface TempStorageMapper extends BaseMapper<TempStorageEntity> {


    @Select("SELECT * FROM `temp_storage` WHERE `mailNo` LIKE '%${mailNo}%';")
    List<TempStorageEntity> findListByMailNo(@Param("mailNo") String mailNo);

    @Select("SELECT * FROM `temp_storage` WHERE `mailNo` = #{mailNo};")
    TempStorageEntity findByMailNo(@Param("mailNo") String mailNo);

    @Delete("DELETE FROM `temp_storage` WHERE `mailNo` IN ${ids}")
    void storageDel(@Param("ids") String ids);
}
