From e28d33c09405e246a2d75fcb1f69a9e8e9d911b8 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 29 九月 2022 09:07:31 +0800
Subject: [PATCH] 更新最新代码

---
 DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
index 0c51361..f9bc08e 100644
--- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
+++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
@@ -296,6 +296,32 @@
             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
@@ -314,13 +340,14 @@
             @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();

--
Gitblit v1.7.1