From df7a30aca95c93e072886f863a63e19cb06d6029 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 05 五月 2022 14:58:24 +0800
Subject: [PATCH] 优化模糊查询
---
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
index a0faa65..b0ec5f4 100755
--- a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
@@ -383,6 +383,12 @@
<if test="ownerTypeCd !=null and ownerTypeCd != ''">
and t.owner_type_cd= #{ownerTypeCd}
</if>
+ <if test="ownerTypeCds != null ">
+ and t.owner_type_cd in
+ <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
</select>
@@ -431,6 +437,12 @@
</if>
<if test="ownerTypeCd !=null and ownerTypeCd != ''">
and t.owner_type_cd= #{ownerTypeCd}
+ </if>
+ <if test="ownerTypeCds != null ">
+ and t.owner_type_cd in
+ <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
</if>
@@ -492,6 +504,12 @@
<if test="ownerTypeCd !=null and ownerTypeCd != ''">
and t.owner_type_cd= #{ownerTypeCd}
</if>
+ <if test="ownerTypeCds != null ">
+ and t.owner_type_cd in
+ <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
--
Gitblit v1.8.0