From d5b3e5a413bcfccba294793ee093722f31b2448a Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 16 八月 2023 17:02:13 +0800
Subject: [PATCH] 添加推单日志

---
 user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java |   48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java
index f039b71..f22e50a 100644
--- a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java
+++ b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java
@@ -16,6 +16,7 @@
 import com.supersavedriving.user.modular.system.util.UUIDUtil;
 import com.supersavedriving.user.modular.system.util.huawei.OBSUtil;
 import com.supersavedriving.user.modular.system.util.huawei.SMSUtil;
+import com.supersavedriving.user.modular.system.util.weChat.WeChatUtil;
 import com.supersavedriving.user.modular.system.warpper.*;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -63,6 +64,28 @@
     @Autowired
     private RedisUtil redisUtil;
 
+    @Autowired
+    private WeChatUtil weChatUtil;
+
+
+
+    @ResponseBody
+    @PostMapping("/base/appUser/getUrlLink")
+//    @ServiceLog(name = "获取跳转微信url_link", url = "/base/appUser/appUserLogin")
+    @ApiOperation(value = "获取跳转微信url_link", tags = {"用户端-首页"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "跳转小程序路径", name = "path", required = true, dataType = "string"),
+            @ApiImplicitParam(value = "跳转的附带参数", name = "query", required = false, dataType = "string"),
+    })
+    public ResponseWarpper<String> getUrlLink(String path, String query){
+        try {
+            String urlLink = weChatUtil.getUrlLink(path, query, "release");
+            return ResponseWarpper.success(urlLink);
+        }catch (Exception e){
+            e.printStackTrace();
+            return new ResponseWarpper(500, e.getMessage());
+        }
+    }
 
 
 
@@ -271,7 +294,7 @@
             SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 6));
             if(null != systemConfig){
                 JSONObject jsonObject = JSON.parseObject(systemConfig.getContent());
-                return ResponseWarpper.success("充值满" + jsonObject.getDouble("num2") + "元,下单享9折优惠!");
+                return ResponseWarpper.success("充值满" + jsonObject.getDouble("num2") + "元,下单享9.5折优惠!");
             }
             return ResponseWarpper.success();
         }catch (Exception e){
@@ -538,4 +561,27 @@
         }
     }
 
+
+
+    @ResponseBody
+    @PostMapping("/api/user/driverRegister")
+//    @ServiceLog(name = "注册司机", url = "/api/user/driverRegister")
+    @ApiOperation(value = "注册司机", tags = {"用户端-登录注册"}, notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResponseWarpper driverRegister(DriverRegisterWarpper driverRegisterWarpper){
+        try {
+            Integer uid = appUserService.getUserByRequest();
+            if(null == uid){
+                return ResponseWarpper.success(ResultUtil.tokenErr());
+            }
+            ResultUtil resultUtil = driverService.driverRegister(uid, driverRegisterWarpper);
+            return ResponseWarpper.success(resultUtil);
+        }catch (Exception e){
+            e.printStackTrace();
+            return new ResponseWarpper(500, e.getMessage());
+        }
+    }
+
 }

--
Gitblit v1.7.1