From 3d3c90b6fa35b98f00cfddeb2923abe4f40d4a85 Mon Sep 17 00:00:00 2001
From: wans <747101512@qq.com>
Date: Tue, 1 Dec 2020 14:40:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E8=AF=AD?=
=?UTF-8?q?=E5=8F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mybatis/mapper/addicts/addicts-mapper.xml | 6 ++++--
src/main/resources/mybatis/mapper/aids/aids-mapper.xml | 6 ++++--
.../mapper/basepopulationinfo/basepopulationinfo-mapper.xml | 4 ++--
.../communitycorrection/communitycorrection-mapper.xml | 6 ++++--
.../mapper/mentaldisorders/mentaldisorders-mapper.xml | 6 ++++--
.../releaseaftersentence/releaseaftersentence-mapper.xml | 6 ++++--
6 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/mybatis/mapper/addicts/addicts-mapper.xml b/src/main/resources/mybatis/mapper/addicts/addicts-mapper.xml
index fd076df..84dc6f2 100644
--- a/src/main/resources/mybatis/mapper/addicts/addicts-mapper.xml
+++ b/src/main/resources/mybatis/mapper/addicts/addicts-mapper.xml
@@ -163,9 +163,10 @@
t2.telephone
FROM
gen_addicts t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND t1.addicts_id = #{addictsId}
@@ -197,9 +198,10 @@
CONCAT(t2.current_residence,t2.current_residence_addr) current_residence
FROM
gen_addicts t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND (
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
diff --git a/src/main/resources/mybatis/mapper/aids/aids-mapper.xml b/src/main/resources/mybatis/mapper/aids/aids-mapper.xml
index 1997eb9..e4abf86 100644
--- a/src/main/resources/mybatis/mapper/aids/aids-mapper.xml
+++ b/src/main/resources/mybatis/mapper/aids/aids-mapper.xml
@@ -157,9 +157,10 @@
t2.telephone
FROM
gen_aids t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND t1.aids_id = #{aidsId}
@@ -190,9 +191,10 @@
CONCAT(t2.current_residence,t2.current_residence_addr) current_residence
FROM
gen_aids t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND (
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
diff --git a/src/main/resources/mybatis/mapper/basepopulationinfo/basepopulationinfo-mapper.xml b/src/main/resources/mybatis/mapper/basepopulationinfo/basepopulationinfo-mapper.xml
index 1c4b178..d00596e 100644
--- a/src/main/resources/mybatis/mapper/basepopulationinfo/basepopulationinfo-mapper.xml
+++ b/src/main/resources/mybatis/mapper/basepopulationinfo/basepopulationinfo-mapper.xml
@@ -320,9 +320,9 @@
t1.is_delete = 0
AND (
- t1.id LIKE CONCAT('%', #{keywords}, '%')
+ t1.full_name LIKE CONCAT('%', #{keywords}, '%')
OR
- t1.base_population_info_id LIKE CONCAT('%', #{keywords}, '%')
+ t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
)
diff --git a/src/main/resources/mybatis/mapper/communitycorrection/communitycorrection-mapper.xml b/src/main/resources/mybatis/mapper/communitycorrection/communitycorrection-mapper.xml
index 6c9e4d2..34a41a1 100644
--- a/src/main/resources/mybatis/mapper/communitycorrection/communitycorrection-mapper.xml
+++ b/src/main/resources/mybatis/mapper/communitycorrection/communitycorrection-mapper.xml
@@ -295,9 +295,10 @@
t2.telephone
FROM
gen_community_correction t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND
t1.community_correction_id = #{communityCorrectionId}
@@ -348,9 +349,10 @@
CONCAT(t2.current_residence,t2.current_residence_addr) current_residence
FROM
gen_community_correction t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND (
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
diff --git a/src/main/resources/mybatis/mapper/mentaldisorders/mentaldisorders-mapper.xml b/src/main/resources/mybatis/mapper/mentaldisorders/mentaldisorders-mapper.xml
index ac91a74..20b3878 100644
--- a/src/main/resources/mybatis/mapper/mentaldisorders/mentaldisorders-mapper.xml
+++ b/src/main/resources/mybatis/mapper/mentaldisorders/mentaldisorders-mapper.xml
@@ -207,9 +207,10 @@
t2.telephone
FROM
gen_mental_disorders t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND
t1.mental_disorders_id = #{mentalDisordersId}
@@ -248,9 +249,10 @@
CONCAT(t2.current_residence,t2.current_residence_addr) current_residence
FROM
gen_mental_disorders t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND (
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
diff --git a/src/main/resources/mybatis/mapper/releaseaftersentence/releaseaftersentence-mapper.xml b/src/main/resources/mybatis/mapper/releaseaftersentence/releaseaftersentence-mapper.xml
index 841317a..38f4715 100644
--- a/src/main/resources/mybatis/mapper/releaseaftersentence/releaseaftersentence-mapper.xml
+++ b/src/main/resources/mybatis/mapper/releaseaftersentence/releaseaftersentence-mapper.xml
@@ -186,9 +186,10 @@
t2.telephone
FROM
gen_release_after_sentence t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND t1.release_after_sentence_id = #{releaseAfterSentenceId}
@@ -223,9 +224,10 @@
CONCAT(t2.current_residence,t2.current_residence_addr) current_residence
FROM
gen_release_after_sentence t1
- LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number AND t2.is_delete = '0'
+ LEFT JOIN gen_base_population_info t2 ON t1.id_card_number = t2.id_card_number
WHERE
t1.is_delete = 0
+ AND t2.is_delete = 0
AND (
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')