puzhibing
2023-02-09 e145bb81724645e5289e3140f87018c19e1eea14
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")