package org.ta.pddserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.ta.pddserver.entity.LogOrderMailDetailEntity;

import java.util.List;

@Mapper
public interface LogOrderMailDetailMapper extends BaseMapper<LogOrderMailDetailEntity> {

    @Select("SELECT * FROM `log_order_mail_detail` WHERE `logisticsOrderCode` = #{logisticsOrderCode} AND `state` > 0;")
    List<LogOrderMailDetailEntity> getListByCode(String logisticsOrderCode);

    @Select("SELECT * FROM `log_order_mail_detail` WHERE `mailNo` = #{mailNo} AND `state` > 0;")
    LogOrderMailDetailEntity findByMailNo(String mailNo);
}
