From e145bb81724645e5289e3140f87018c19e1eea14 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 09 二月 2023 23:17:23 +0800
Subject: [PATCH] 新增加司机端接口

---
 driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java
index f7b0cc5..6547ca5 100644
--- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java
+++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java
@@ -165,6 +165,35 @@
     }
 
 
+    @ResponseBody
+    @PostMapping("/base/driver/driverPassLogin")
+    @ServiceLog(name = "司机密码登录", url = "/base/driver/driverPassLogin")
+    @ApiOperation(value = "司机密码登录", tags = {"司机端-登录注册"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "国家代码+86", name = "receiver", required = true, dataType = "string"),
+            @ApiImplicitParam(value = "电话号码", name = "phone", required = true, dataType = "string"),
+            @ApiImplicitParam(value = "密码", name = "password", required = true, dataType = "string"),
+    })
+    public ResponseWarpper<TokenWarpper> driverPassLogin(String receiver, String phone, String password){
+        if(ToolUtil.isEmpty(receiver)){
+            return ResponseWarpper.success(ResultUtil.paranErr("receiver"));
+        }
+        if(ToolUtil.isEmpty(phone)){
+            return ResponseWarpper.success(ResultUtil.paranErr("phone"));
+        }
+        if(ToolUtil.isEmpty(password)){
+            return ResponseWarpper.success(ResultUtil.paranErr("password"));
+        }
+        try {
+            ResultUtil<TokenWarpper> tokenWarpper = driverService.driverPassLogin(receiver, phone, password);
+            return ResponseWarpper.success(tokenWarpper);
+        }catch (Exception e){
+            e.printStackTrace();
+            return new ResponseWarpper(500, e.getMessage());
+        }
+    }
+
+
 
     @ResponseBody
     @PostMapping("/api/driver/flushedToken")

--
Gitblit v1.7.1