package com.fuzamei.service.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fuzamei.entity.DeliverOrder;
import com.fuzamei.entity.Orders;
import com.fuzamei.entity.Params;
import com.fuzamei.entity.SendOrder;
import com.fuzamei.mapperInterface.CargoDeliverMapper;
import com.fuzamei.service.CargoDeliverService;
import com.fuzamei.util.PageDTO;

@Service
public class CargoDeliverServiceImpl implements CargoDeliverService {

	@Autowired
	private CargoDeliverMapper cargoDeliverMapper;

	@Override
	public PageDTO queryOrdersByCarrier(Params params) {
		PageDTO pageDto=new PageDTO();
		List<DeliverOrder> orderList = cargoDeliverMapper.queryOrdersByCarrier(params);
		int count = cargoDeliverMapper.findQueryCountByCarrier(params);
		pageDto.setRows(orderList);
		pageDto.setTotal(count);
		return pageDto;
	}

	@Override
	public List<Object> orderTracking(Params params) {
		Orders order = params.getOrder();
		return OrdersIssueServiceImpl.dispatchOrderInfo(order);
	}
}
