puzhibing
2023-02-15 2811bab657aab4145b65a45a824fb63e93b58e30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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<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;
        }
        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;
        }
        return ResultUtil.success(orderServerWarpper);
    }
}