From b7372246914313cc7dabe3fcb6bb07e5c667ce2d Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 24 七月 2023 14:24:47 +0800
Subject: [PATCH] #选择部门后搜索失效bug
---
src/main/resources/mapper/CstmrMapper.xml | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/CstmrMapper.xml b/src/main/resources/mapper/CstmrMapper.xml
index 5fb0c0c..1f30c32 100644
--- a/src/main/resources/mapper/CstmrMapper.xml
+++ b/src/main/resources/mapper/CstmrMapper.xml
@@ -76,7 +76,7 @@
WHERE 1=1
<choose>
<when test="deptId != null and deptId != ''">
- AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
+ AND ((CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
or
(
user_id = #{userId}
@@ -89,7 +89,7 @@
where 1=1
and user_id = #{userId}
)
- )
+ ))
</when>
<otherwise>
and
@@ -134,7 +134,8 @@
WHERE 1=1
<choose>
<when test="deptId != null and deptId != ''">
- AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
+ AND (
+ (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
or
(
user_id = #{userId}
@@ -148,6 +149,7 @@
and user_id = #{userId}
)
)
+ )
</when>
<otherwise>
and
--
Gitblit v1.9.1