ソースを参照

水查查接口工程

hym 4 年 前
コミット
d01994ae13

+ 4 - 3
smart-city-platform/src/main/resources/mapper/GridManagementMapper.xml

@@ -166,17 +166,18 @@
                 and ssu.site_id = #{siteId}
             </if>
        </where>
+        order by ssu.create_date desc
     </select>
     <select id="getCommutityByOrg" resultType="com.bz.smart_city.entity.Community">
         select * from sc_community a
-        where a.org_id=#{orgId}
+        where a.org_id=#{orgId} and status=1
     </select>
     <select id="getBuildingByCommutity" resultType="com.bz.smart_city.entity.Building">
-        select * from sc_building where community=#{commutityId}
+        select * from sc_building where community=#{commutityId} and status=1
     </select>
     <select id="getDevices" resultType="com.bz.smart_city.entity.Device">
         select * from sc_device where building_id=#{buildingId} and
-         id not in (select distinct device_id from sc_grid_management)
+         id not in (select distinct device_id from sc_grid_management) and status=1
     </select>
 
     <select id="getByDeviceId" resultMap="GridManagementMap">