package com.stylefeng.guns.modular.system.service.impl; import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; import com.stylefeng.guns.modular.system.service.INettyService; import com.stylefeng.guns.modular.system.util.ResultUtil; import com.stylefeng.guns.modular.system.warpper.EndPushWarpper; import com.stylefeng.guns.modular.system.warpper.OrderServerWarpper; import com.stylefeng.guns.modular.system.warpper.OrderStatusWarpper; import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class NettyServiceImpl implements INettyService { @Autowired private IOrderTaxiService orderTaxiService; @Autowired private IOrderPrivateCarService orderPrivateCarService; @Autowired private IOrderCrossCityService orderCrossCityService; /** * 获取下单推送完后没有司机接单的提醒 * @param uid * @return * @throws Exception */ @Override public ResultUtil queryEndPush(Integer orderId, Integer orderType, Integer uid) throws Exception { EndPushWarpper endPushWarpper = null; switch (orderType){ case 1: endPushWarpper = orderPrivateCarService.queryEndPush(uid); break; case 2: endPushWarpper = orderTaxiService.queryEndPush(uid); break; } return ResultUtil.success(endPushWarpper); } /** * 获取服务中的订单数据 * @param uid * @return * @throws Exception */ @Override public ResultUtil queryOrderServer(Integer orderId, Integer orderType, Integer uid) throws Exception { OrderServerWarpper orderServerWarpper = null; switch (orderType){ case 1: orderServerWarpper = orderPrivateCarService.queryOrderServer(orderId, uid);//专车 break; case 2: orderServerWarpper = orderTaxiService.queryOrderServer(orderId, uid);//快车 break; case 3: orderServerWarpper = orderCrossCityService.queryOrderServer(orderId, uid);//快车 break; } return ResultUtil.success(orderServerWarpper); } }