package com.yiqi.order.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import com.yiqi.order.domain.OrderDelivery;
import com.yiqi.order.domain.dto.OrderDeliveryRequestDTO;
import com.yiqi.order.domain.vo.OrderDeliveryVO;
import com.yiqi.order.mapper.OrderDeliveryMapper;
import com.yiqi.order.service.IOrderDeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 订单配送Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-07
 */
@Service
public class OrderDeliveryServiceImpl extends ServiceImpl<OrderDeliveryMapper, OrderDelivery> implements IOrderDeliveryService {

    @Override
    public OrderDelivery selectOrderDeliveryByOrderId(String orderSn, String clothOrderType) {
        QueryWrapper<OrderDelivery> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_sn", orderSn);
        queryWrapper.eq("cloth_order_type", clothOrderType);
        return baseMapper.selectOne(queryWrapper);
    }

    @Override
    public List<OrderDeliveryVO> selectOrderDeliveryList(OrderDeliveryRequestDTO requestDTO) {
        List<OrderDeliveryVO> list = baseMapper.selectOrderDeliveryList(requestDTO);
        return list;
    }


}
