From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能

---
 java110-db/src/main/resources/mapper/community/CommunitySettingKeyV1ServiceDaoImplMapper.xml |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/CommunitySettingKeyV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunitySettingKeyV1ServiceDaoImplMapper.xml
index c018d14..0ea9704 100644
--- a/java110-db/src/main/resources/mapper/community/CommunitySettingKeyV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunitySettingKeyV1ServiceDaoImplMapper.xml
@@ -20,7 +20,14 @@
         select t.key_id,t.key_id keyId,t.remark,t.status_cd,t.status_cd statusCd,t.setting_key,t.setting_key
         settingKey,t.setting_type,t.setting_type settingType,t.setting_name,t.setting_name settingName
         from community_setting_key t
+        <if test="communityId !=null and communityId != ''">
+            left join community_setting cs on t.setting_type = cs.setting_type and t.setting_key = cs.setting_key and
+            cs.status_cd = '0' and cs.community_id = #{communityId}
+        </if>
         where 1 =1
+        <if test="communityId !=null and communityId != ''">
+            and cs.setting_key is null
+        </if>
         <if test="keyId !=null and keyId != ''">
             and t.key_id= #{keyId}
         </if>

--
Gitblit v1.8.0