liujie
6 天以前 9828db9febf4ad5cb0b79a72eedca6922b466104
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -138,7 +138,8 @@
    
    @Resource
    private ISystemPriceCityService systemPriceCityService;
    
    /**
     * 获取正在进行中的订单
@@ -458,6 +459,16 @@
                    map = orderCrossCityService.queryOrderInfo(orderId);
                    break;
            }
            if(map.get("companyId") != null){
                Company companyId = companyService.selectById(map.get("companyId").toString());
                map.put("companyName", companyId.getName());
            }else {
                String string = map.get("driverId").toString();
                Driver driver = driverService.selectById(string);
                Company company = companyService.selectById(driver.getCompanyId());
                map.put("companyName", company.getName());
            }
            if(map.get("telX") != null){
                map.put("driverPhone", map.get("telX"));
            }
@@ -590,6 +601,41 @@
                orderInfoWarpper.setTime(arriveTime.substring(11,arriveTime.length()-3));
            }
            return ResultUtil.success(orderInfoWarpper);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    @ResponseBody
    @PostMapping("/api/order/addAppeal")
    @ApiOperation(value = "发起申诉", tags = {"用户端-服务中"}, notes = "",response = OrderInfoWarpper.class)
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "申诉描述", name = "abnormalIntro", required = true, dataType = "String"),
            @ApiImplicitParam(value = "申诉图片", name = "abnormalImg", required = true, dataType = "String"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<OrderInfoWarpper> addAppeal(Integer orderId, Integer orderType,String abnormalIntro, String abnormalImg, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            switch (orderType){
                case 1://专车
                     orderPrivateCarService.addAppeal(uid, orderId,abnormalIntro,abnormalImg);
                    break;
                case 2://出租车
                    orderTaxiService.addAppeal(uid,orderId,abnormalIntro,abnormalImg);
                    break;
                case 3://跨城
                     orderCrossCityService.addAppeal(uid,orderId,abnormalIntro,abnormalImg);
                    break;
            }
            return ResultUtil.success();
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
@@ -2046,6 +2092,30 @@
    }
    /**
     * 推广订单支付成功回调
     *
     * @param orderId
     * @return
     */
    private void promotion(Integer orderType,Integer orderId){
        switch (orderType){
            case 1:
                orderPrivateCarService.promotion(orderId);
                break;
            case 2:
                orderTaxiService.promotion(orderId);
                break;
            case 3:
                orderCrossCityService.promotion(orderId);
                break;
            default:
                    break;
        }
    }
    @ResponseBody
    @PostMapping("/api/get/unPayOrder")
    @ApiOperation(value = "获取未支付订单", tags = {"用户端-首页"}, notes = "")