package org.ta.pddserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.ta.pdd.entity.LogsMailScanEntity;
import org.ta.pddserver.model.api.request.LogsMailScanListVORequest;

import java.util.List;

@Mapper
public interface LogsMailScanMapper extends BaseMapper<LogsMailScanEntity> {

    @Select("SELECT `author`, `created`, `action` FROM `logs_mail_scan` WHERE `mailNo` = #{mailNo}   ORDER BY `uid` DESC;")
    List<LogsMailScanEntity> selectByMailNo(@Param("mailNo") String mailNo);

    @Select("SELECT uid,mailNo,created,author,action FROM `logs_mail_scan` WHERE `mailNo` = #{mailNo} ORDER BY `uid` DESC;")
    List<LogsMailScanEntity> logsMailScanList(LogsMailScanListVORequest param);

}
