| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/car/addCar") |
| | | @ApiOperation(value = "添加车辆", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiOperation(value = "添加车辆【1.0】", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "车辆型号id", name = "modelId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "车辆id", name = "id", required = true, dataType = "int"), |
| | |
| | | @ApiImplicitParam(value = "车牌号", name = "licensePlate", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "年审日期(需要格式化)", name = "time", required = false, dataType = "string"), |
| | | @ApiImplicitParam(value = "行驶证照片", name = "drivingLicensePhoto", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "行驶证到期时间(yyyy-MM-dd)", name = "drivingLicenseEndTime", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "车辆照片", name = "carPhoto", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "保险照片", name = "insurancePhoto", required = false, dataType = "string"), |
| | | @ApiImplicitParam(value = "保险到期时间(yyyy-MM-dd)", name = "commercialInsuranceTime", required = false, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = false, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil addCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicensePhoto, |
| | | String carPhoto, String insurancePhoto, HttpServletRequest request,Integer id){ |
| | | String drivingLicenseEndTime, String carPhoto, String insurancePhoto, String commercialInsuranceTime, HttpServletRequest request,Integer id){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return carService.addCar(modelId, color, licensePlate, time, drivingLicensePhoto, carPhoto, insurancePhoto, uid,id); |
| | | return carService.addCar(modelId, color, licensePlate, time, drivingLicensePhoto, drivingLicenseEndTime, carPhoto, insurancePhoto, commercialInsuranceTime, uid,id); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |