From 41e84c3bf3baa9f9f91bbb5343945f0032ae960d Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期六, 11 三月 2023 17:36:43 +0800
Subject: [PATCH] 新增加司机端接口

---
 driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverWorkController.java |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverWorkController.java b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverWorkController.java
index 008b429..f824420 100644
--- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverWorkController.java
+++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverWorkController.java
@@ -37,16 +37,16 @@
 
     @ResponseBody
     @PostMapping("/api/home/driverWork")
-    @ServiceLog(name = "司机上班操作", url = "/api/home/driverWork")
+//    @ServiceLog(name = "司机上班操作", url = "/api/home/driverWork")
     @ApiOperation(value = "司机上班操作", tags = {"司机端-首页"}, notes = "")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResponseWarpper driverWork(HttpServletRequest request){
+    public ResponseWarpper driverWork(){
         try {
-            Integer uid = driverService.getUserByRequset(request);
+            Integer uid = driverService.getUserByRequest();
             if(null == uid){
-                return ResponseWarpper.success(ResultUtil.tokenErr());
+                return ResponseWarpper.tokenErr();
             }
             ResultUtil resultUtil = driverWorkService.driverWork(uid);
             return ResponseWarpper.success(resultUtil);
@@ -59,22 +59,18 @@
 
     @ResponseBody
     @PostMapping("/api/home/driverOffWork")
-    @ServiceLog(name = "司机下班操作", url = "/api/home/driverOffWork")
+//    @ServiceLog(name = "司机下班操作", url = "/api/home/driverOffWork")
     @ApiOperation(value = "司机下班操作", tags = {"司机端-首页"}, notes = "")
     @ApiImplicitParams({
-            @ApiImplicitParam(value = "在线时长(秒)", name = "onlineTime", required = true, dataType = "long"),
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResponseWarpper driverOffWork(Long onlineTime, HttpServletRequest request){
-        if(null == onlineTime){
-            return ResponseWarpper.success(ResultUtil.paranErr("onlineTime"));
-        }
+    public ResponseWarpper driverOffWork(){
         try {
-            Integer uid = driverService.getUserByRequset(request);
+            Integer uid = driverService.getUserByRequest();
             if(null == uid){
-                return ResponseWarpper.success(ResultUtil.tokenErr());
+                return ResponseWarpper.tokenErr();
             }
-            ResultUtil resultUtil = driverWorkService.driverOffWork(uid, onlineTime);
+            ResultUtil resultUtil = driverWorkService.driverOffWork(uid, 0L);
             return ResponseWarpper.success(resultUtil);
         }catch (Exception e){
             e.printStackTrace();

--
Gitblit v1.7.1