package org.ta.pddserver.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.ta.pddserver.entity.LogOrderMailDetailEntity;
import org.ta.pddserver.mapper.LogOrderMailDetailMapper;
import org.ta.pddserver.model.api.request.LogOrderMailDetailListRequest;
import org.ta.pddserver.model.api.response.LogOrderMailDetailListResponse;
import org.ta.pddserver.model.api.response.MailNoResponse;
import org.ta.pddserver.service.LogOrderMailDetailService;

import java.util.List;

@Service
public class LogOrderMailDetailImpl extends ServiceImpl<LogOrderMailDetailMapper, LogOrderMailDetailEntity> implements LogOrderMailDetailService {

    public Boolean updateByMailNo(String mailNo, String action) {
       return baseMapper.updateByMailNo(mailNo, action);
    }

    public List<LogOrderMailDetailEntity> getListByCode(String logisticsOrderCode) {
        return baseMapper.getListByCode(logisticsOrderCode);
    }

    public LogOrderMailDetailEntity getByMailNo(String mailNo) {
        return baseMapper.findByMailNo(mailNo);
    }

    public List<LogOrderMailDetailListResponse> getListByCodeNo(String logisticsOrderCode, String mailNo) {
        return baseMapper.getListByCodeNo(logisticsOrderCode, mailNo);
    }

    public MailNoResponse getInfoByMailNo(String mailNo, String status) {
        return baseMapper.getInfoByMailNo(mailNo, status);
    }



    public Long getSumByCodeStatus(String logisticsOrderCode, Long status) {
        return baseMapper.getSumByCodeStatus(logisticsOrderCode, status);
    }
}