From 0e4bfb752c0a37b6fe6037125737d8509f51d080 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 27 三月 2026 14:52:32 +0800
Subject: [PATCH] 修改bug

---
 ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml               |   12 ++++++------
 ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java |    4 +++-
 ManagementOKTravel/guns-admin/src/main/resources/application.yml                                                          |    3 +++
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java
index 4e8a24a..a16c39f 100644
--- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java
+++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java
@@ -66,7 +66,9 @@
             Dept dept = deptService.selectById(user.getDeptid());
 
             model.addAttribute("deptName",dept==null?"顶级":dept.getFullname());
-            model.addAttribute("roleName", role.getName());
+            if (role != null){
+                model.addAttribute("roleName", role.getName());
+            }
             model.addAttribute("userName", user.getName());
             model.addAttribute("date", DateUtil.getTime(new Date()));
             model.addAttribute("user", user);
diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
index 87b3628..d37e689 100644
--- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
+++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
@@ -518,7 +518,7 @@
             left join t_driver t2 on t1.userId = t2.id
             where t1.userType = 2 and t1.orderType=6 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
@@ -583,7 +583,7 @@
             left join t_driver t2 on t1.userId = t2.id
             where t1.userType=2 and t1.type = 2 and t1.state!=3 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
@@ -608,7 +608,7 @@
             left join t_driver t2 on t1.driverId = t2.id
             where  t1.status=2 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
@@ -678,7 +678,7 @@
             left join t_driver t2 on t1.userId = t2.id
             where t1.userType = 2 and t1.orderType=6 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
@@ -743,7 +743,7 @@
             left join t_driver t2 on t1.userId = t2.id
             where t1.userType=2 and t1.type = 2 and t1.state!=3 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
@@ -768,7 +768,7 @@
             left join t_driver t2 on t1.driverId = t2.id
             where  t1.status=2 and t2.authState in (2, 3) and t2.flag != 3
             <if test="roleType != null and roleType != '' and roleType == 2">
-                and (t2.companyId = #{objectId} or FIND_IN_SET(t1.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
+                and (t2.companyId = #{objectId} or FIND_IN_SET(t2.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{objectId} GROUP BY superiorId)))
             </if>
             <if test="roleType != null and roleType != '' and roleType == 3">
                 and t2.franchiseeId = #{objectId}
diff --git a/ManagementOKTravel/guns-admin/src/main/resources/application.yml b/ManagementOKTravel/guns-admin/src/main/resources/application.yml
index 4cd17f8..847ecb1 100644
--- a/ManagementOKTravel/guns-admin/src/main/resources/application.yml
+++ b/ManagementOKTravel/guns-admin/src/main/resources/application.yml
@@ -52,6 +52,9 @@
 spring:
   profiles: local
   datasource:
+#    url: jdbc:mysql://8.131.157.137:10633/jixi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
+#    username: jixi
+#    password: JiXiChuXing2026!Mysql@
     url: jdbc:mysql://127.0.0.1:10633/jixi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
     username: root
     password: JiXiChuXing2026!Mysql@

--
Gitblit v1.7.1