From f72ae151cc12b219cb5f39eea3ec0ea089a6ef2a Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 八月 2025 23:53:05 +0800
Subject: [PATCH] 修改bug

---
 UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
index e012fb9..dcd18cc 100644
--- a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
+++ b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
@@ -355,13 +355,15 @@
                 return ResultUtil.tokenErr();
             }
             UserInfo userInfo = userInfoService.selectById(uid);
-
-
-
+            Driver driver = driverService.selectById(driverId);
             // 是否需要绑定司机
-            TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", userInfo.getRegistAreaCode()).le("startTime", new Date()).ge("endTime", new Date()).last(" limit 1"));
+            TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>()
+                    .eq("districtCode", driver.getPlaceOfEmployment()).le("startTime", new Date()).ge("endTime", new Date()).last(" limit 1"));
+            System.out.println("111232"+tDriverPromotionActivity);
             if(tDriverPromotionActivity!=null){
+                System.out.println("11111");
                 if(userInfo.getBindDriverId()==null || userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){
+                    System.out.println("222222");
                     Integer bindingDays = tDriverPromotionActivity.getBindingDays();
                     // 当前时间+绑定天数
                     Date endTime = DateUtils.addDays(new Date(), bindingDays);
@@ -371,7 +373,7 @@
                     userInfoService.updateById(userInfo);
                 }
             }else {
-                Region code = regionService.selectOne(new EntityWrapper<Region>().eq("code", userInfo.getRegistAreaCode()));
+                Region code = regionService.selectOne(new EntityWrapper<Region>().eq("code", driver.getPlaceOfEmployment()));
                 Region region = regionService.selectById(code.getParentId());
                 TDriverPromotionActivity tDriverPromotionActivity1 = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("cityCode", region.getCode()).le("startTime", new Date()).ge("endTime", new Date()).last(" limit 1"));
                 if(tDriverPromotionActivity1!=null) {
@@ -416,7 +418,7 @@
             }
             UserInfo userInfo = userInfoService.selectById(uid);
             if(ToolUtil.isEmpty(userInfo.getOnconUUID())){
-                String onconUUIDByMobile = UserUtil.getOnconUUIDByMobile("15828353127");
+                String onconUUIDByMobile = UserUtil.getOnconUUIDByMobile(userInfo.getPhone());
                 userInfo.setOnconUUID(onconUUIDByMobile);
                 userInfoService.updateById(userInfo);
             }

--
Gitblit v1.7.1