From db7fa6a91b9534ac90e219b6f554c54c43c83a5a Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 16 八月 2023 09:28:15 +0800
Subject: [PATCH] update

---
 driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 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 6ab5c2d..29bd909 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
@@ -1,5 +1,6 @@
 package com.supersavedriving.driver.modular.system.api;
 
+import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -13,6 +14,7 @@
 import com.supersavedriving.driver.modular.system.util.PayMoneyUtil;
 import com.supersavedriving.driver.modular.system.util.huawei.OBSUtil;
 import com.supersavedriving.driver.modular.system.util.huawei.SMSUtil;
+import com.supersavedriving.driver.modular.system.util.juhe.OCRUtil;
 import com.supersavedriving.driver.modular.system.warpper.*;
 import com.supersavedriving.driver.core.util.ToolUtil;
 import com.supersavedriving.driver.modular.system.util.RedisUtil;
@@ -34,6 +36,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.io.InputStream;
 import java.io.PrintWriter;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -145,6 +148,21 @@
         try {
             ResultUtil resultUtil = driverService.driverRegister(driverRegisterWarpper);
             return ResponseWarpper.success(resultUtil);
+        }catch (Exception e){
+            e.printStackTrace();
+            return new ResponseWarpper(500, e.getMessage());
+        }
+    }
+    @ResponseBody
+    @PostMapping("/base/driver/orcPhoto")
+//    @ServiceLog(name = "司机注册申请", url = "/base/driver/driverRegister")
+    @ApiOperation(value = "图片识别--获取驾龄", tags = {"司机端-图片识别"}, notes = "")
+    @ApiImplicitParams({
+    })
+    public ResponseWarpper orcPhoto(MultipartFile file){
+        try {
+            JSONObject certificate = OCRUtil.certificate(5, file);
+            return ResponseWarpper.success(certificate);
         }catch (Exception e){
             e.printStackTrace();
             return new ResponseWarpper(500, e.getMessage());
@@ -311,14 +329,43 @@
     @ApiOperation(value = "获取5公里范围内的司机", tags = {"司机端-首页"}, notes = "")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+
     })
-    public ResponseWarpper<List<String>> queryDriverPosition(){
+    public ResponseWarpper< HashMap<String, Object> > queryDriverPosition(){
         try {
             Integer uid = driverService.getUserByRequest();
             if(null == uid){
                 return ResponseWarpper.tokenErr();
             }
-            ResultUtil<List<String>> listResultUtil = driverService.queryDriverPosition(uid);
+            ResultUtil<HashMap<String, Object>> listResultUtil = driverService.queryDriverPosition(uid);
+
+
+            return ResponseWarpper.success(listResultUtil);
+        }catch (Exception e){
+            e.printStackTrace();
+            return new ResponseWarpper(500, e.getMessage());
+        }
+    }
+
+
+
+    @ResponseBody
+    @PostMapping("/api/driver/queryDriverOrderNum")
+//    @ServiceLog(name = "获取5公里范围内的司机", url = "/api/driver/queryDriverPosition")
+    @ApiOperation(value = "司机个人信息 接单量", tags = {"司机端-首页"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
+            @ApiImplicitParam(value = "时间 2022-11-11 - 2222-00-00", name = "time", required = false, dataType = "string"),
+    })
+    public ResponseWarpper< HashMap<String, Object> > queryDriverOrderNum(String time){
+        try {
+            Integer uid = driverService.getUserByRequest();
+            if(null == uid){
+                return ResponseWarpper.tokenErr();
+            }
+            ResultUtil<HashMap<String, Object>> listResultUtil = driverService.queryDriverOrderNum(time,uid);
+
+
             return ResponseWarpper.success(listResultUtil);
         }catch (Exception e){
             e.printStackTrace();
@@ -496,9 +543,10 @@
             @ApiImplicitParam(value = "日期", name = "time", required = true, dataType = "string"),
             @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"),
             @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "类型 1订单收入  4提现  5=佣金收入,7=优惠券收入", name = "type", required = false, dataType = "int"),
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResponseWarpper<List<CommissionListWarpper>> queryCommissionList(String time, Integer pageNum, Integer pageSize){
+    public ResponseWarpper<List<CommissionListWarpper>> queryCommissionList(String time, Integer pageNum, Integer pageSize,Integer type){
         if(null == pageNum){
             return ResponseWarpper.success(ResultUtil.paranErr("pageNum"));
         }
@@ -510,7 +558,7 @@
             if(null == uid){
                 return ResponseWarpper.tokenErr();
             }
-            List<CommissionListWarpper> list = revenueService.queryCommissionList(uid, time, pageNum, pageSize);
+            List<CommissionListWarpper> list = revenueService.queryCommissionList(uid, time, pageNum, pageSize,type);
             return ResponseWarpper.success(list);
         }catch (Exception e){
             e.printStackTrace();
@@ -880,6 +928,7 @@
             }
             ResultUtil resultUtil = ResultUtil.success();
             phone = phone.indexOf("+86") < 0 ? "+86" + phone : phone;
+            phone = phone.indexOf("+") < 0 ? "+" + phone : phone;
             String value = redisUtil.getValue(phone);
             if(ToolUtil.isEmpty(value) || !value.equals(code)){
                 resultUtil = ResultUtil.error("验证码无效");

--
Gitblit v1.7.1