liujie
8 天以前 ef478eb422909d28bce068b000e0d7a86872797e
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -452,6 +452,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"));
            }
@@ -582,6 +592,41 @@
    }
    @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();
        }
    }
    /**
     * 获取服务中的详情数据