From 8b7aeb94cf6b5619a8b2e6534c0e5af7f49fcead Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 29 Nov 2022 11:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcNatDao.xml | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml index 16d15f05a2..049a806b55 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml @@ -49,14 +49,19 @@ b.nat_address natAddress, b.test_tube_code testTubeCode FROM - ic_nat_relation a + ( + select IC_NAT_ID, AGENCY_ID, USER_TYPE, IS_LOCAL_RESI_USER + from ic_nat_relation + WHERE AGENCY_ID = #{agencyId} + and DEL_FLAG = '0' + and customer_id = #{customerId} + + AND is_local_resi_user = #{isResiUser} + + ) a INNER JOIN ic_nat b ON a.IC_NAT_ID = b.ID WHERE - a.DEL_FLAG = '0' - AND b.DEL_FLAG = '0' - AND a.customer_id = #{customerId} - - AND a.AGENCY_ID = #{agencyId} + b.DEL_FLAG = '0' AND b.name like concat('%', #{name}, '%') @@ -78,9 +83,6 @@ AND b.sample_time #{sampleEndTime} - - AND a.is_local_resi_user = #{isResiUser} - ORDER BY b.nat_time DESC, b.id ASC @@ -176,17 +178,17 @@ - +