| | |
| | | AND mp.is_delete = 0 |
| | | AND mp.organization_id = #{organizationId} |
| | | </select> |
| | | |
| | | |
| | | <select id="getDevicesStateByRegion" resultType="map"> |
| | | SELECT |
| | | d.id deviceId,d.mac,d.state,d.name deviceName, |
| | | mp.id,mp.name |
| | | FROM |
| | | device d , |
| | | monitor_point mp |
| | | <where> |
| | | d.monitor_point_id = mp.id |
| | | AND d.is_delete = 0 |
| | | AND mp.is_delete = 0 |
| | | AND mp.${regionType}_code = #{regionCode} |
| | | <if test="orgIds != null and orgIds.size > 0"> |
| | | AND mp.organization_id IN |
| | | <foreach collection="orgIds" open="(" separator="," close=")" item="listItem"> |
| | | #{listItem} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |