| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/editEmail") |
| | | @ApiOperation(value = "个人中心修改邮箱【1.0】", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "邮箱", name = "email", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil editEmail(String email, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Driver driver = driverService.selectById(uid); |
| | | driver.setEmail(email); |
| | | driverService.updateById(driver); |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 司机注册后完善车辆信息 |
| | | * @param |
| | |
| | | @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(value = "人车合一照片", name = "peopleAndCarsPhone", required = false, dataType = "string"), |
| | | @ApiImplicitParam(value = "司机id", name = "uid", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "车辆id", name = "carId", required = false, dataType = "int") |
| | | }) |
| | | public ResultUtil addDriverCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicensePhoto, String drivingLicenseEndTime, |
| | | String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid, Integer carId){ |
| | | String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid, Integer carId, String peopleAndCarsPhone){ |
| | | try { |
| | | return carService.addCar(modelId, color, licensePlate, time, drivingLicensePhoto, drivingLicenseEndTime, carPhoto, insurancePhoto, commercialInsuranceTime, uid,carId); |
| | | return carService.addCar(modelId, color, licensePlate, time, drivingLicensePhoto, drivingLicenseEndTime, carPhoto, insurancePhoto, commercialInsuranceTime, uid,carId, peopleAndCarsPhone); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |