From 7987c4f005f5bd8739411d08e4e3bfb67e4df9ef Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 01 十二月 2019 13:48:07 +0800
Subject: [PATCH] 优化设备脚本查询

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

diff --git a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
index ee7bf14..d039460 100644
--- a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
@@ -133,9 +133,8 @@
         where 1 =1
         <if test="staffId != null and staffId != ''">
             and t.repair_id = rru.repair_id
-            and user_id = #{staffId}
-            and community_id = #{communityId}
-            and status_cd = '0'
+            and rru.user_id = #{staffId}
+            and rru.status_cd = '0'
             and td.`table_name` = 'r_repair_user'
             AND td.`table_columns` = 'state'
             AND td.`status_cd` = rru.state
@@ -223,7 +222,7 @@
     <!-- 鏌ヨ鎶ヤ慨淇℃伅鏁伴噺 add by wuxw 2018-07-03 -->
     <select id="queryRepairsCount" parameterType="Map" resultType="Map">
         select count(1) count
-        from r_repair_pool t,
+        from r_repair_pool t
         <if test="staffId != null and staffId != ''">
             ,r_repair_user rru
             ,t_dict td
@@ -231,9 +230,8 @@
         where 1 =1
         <if test="staffId != null and staffId != ''">
             and t.repair_id = rru.repair_id
-            and user_id = #{staffId}
-            and community_id = #{communityId}
-            and status_cd = '0'
+            and rru.user_id = #{staffId}
+            and rru.status_cd = '0'
             and td.`table_name` = 'r_repair_user'
             AND td.`table_columns` = 'state'
             AND td.`status_cd` = rru.state

--
Gitblit v1.8.0