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 com.stylefeng.guns.modular.transfer.model.OrderTransferCar;
|
import com.stylefeng.guns.modular.transfer.server.IOrderTransferService;
|
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;
|
|
@Autowired
|
private IOrderTransferService orderTransferService;
|
|
/**
|
* 获取下单推送完后没有司机接单的提醒
|
* @param uid
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public ResultUtil<EndPushWarpper> 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;
|
case 7:
|
endPushWarpper = orderTransferService.queryEndPush(uid);
|
break;
|
}
|
return ResultUtil.success(endPushWarpper);
|
}
|
|
|
|
|
/**
|
* 获取服务中的订单数据
|
* @param uid
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public ResultUtil<OrderServerWarpper> 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;
|
case 7:
|
orderServerWarpper = orderTransferService.queryOrderServer(orderId, uid);//专车
|
break;
|
}
|
return ResultUtil.success(orderServerWarpper);
|
}
|
}
|