puzhibing
2023-08-22 00caef45a8833dc58919e23eb88a3484cfacdaa4
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
@@ -47,7 +47,7 @@
     */
    @ResponseBody
    @PostMapping("/base/driver/queryIdleDriver")
    @ApiOperation(value = "获取5公里范围内空闲司机数量", tags = {"用户端-首页"}, notes = "")
    @ApiOperation(value = "获取5公里范围内空闲司机数量【1.0】", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "业务类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车)", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(value = "乘客当前定位经度", name = "lon", required = true, dataType = "double"),
@@ -78,12 +78,12 @@
            @ApiImplicitParam(value = "司机id", name = "id", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<DriverInfoWarpper> queryDriverInfo(Integer id){
    public ResultUtil<DriverInfoWarpper> queryDriverInfo(Integer id, Integer language){
        try {
            Map<String, Object> map = driverService.queryDriverInfo(id);
            String name = String.valueOf(map.get("name"));
            map.put("name", name.substring(0, 1) + "师傅");
            List<BaseWarpper> list = driverService.queryBusiness(id);
            map.put("name", name.substring(0, 1) + (language == 1 ? "师傅" : language == 2 ? "driver" : "Le conducteur"));
            List<BaseWarpper> list = driverService.queryBusiness(id, language);
            map.put("list", list);
            return ResultUtil.success(DriverInfoWarpper.getDriverInfoWarpper(map));
        }catch (Exception e){