This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev-2.1.2
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev-2.1.2 by this push:
     new d90f2cdab [FIX] fix teamId is null occur an sql error (#3365)
d90f2cdab is described below

commit d90f2cdabd8457f6fac558a129ddaeeb9969a80a
Author: mincho wang <[email protected]>
AuthorDate: Tue Nov 28 11:10:29 2023 +0800

    [FIX] fix teamId is null occur an sql error (#3365)
    
    Co-authored-by: yunli <[email protected]>
---
 .../src/main/resources/mapper/system/MenuMapper.xml                   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/MenuMapper.xml
 
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/MenuMapper.xml
index 9ed8abe91..2a8956cd7 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/MenuMapper.xml
+++ 
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/MenuMapper.xml
@@ -40,7 +40,9 @@
         left join t_role_menu rm on (rm.role_id = r.role_id)
         left join t_menu m on (m.menu_id = rm.menu_id)
         where ur.user_id = #{userId}
-        and (#{teamId} is null or ur.team_id = #{teamId})
+        <if test="teamId != null">
+            and ur.team_id = #{teamId}
+        </if>
         and m.perms is not null
         and m.perms &lt;&gt; ''
     </select>

Reply via email to