| | |
| | | <select id="selectWithOrgIdsByMac" parameterType="java.lang.String" resultMap="BaseResultWithOrgIdsMap"> |
| | | select |
| | | <include refid="simple_Column_List" /> , |
| | | dvn.version as device_version_value, |
| | | den.limit_val, |
| | | dvn.version as device_version_value, |
| | | den.limit_val, |
| | | mp.province_code, |
| | | mp.city_code, |
| | | mp.area_code, |
| | |
| | | where mac = #{mac,jdbcType=VARCHAR} |
| | | </select> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from device |
| | | where id = #{id,jdbcType=INTEGER} |
| | |
| | | FROM monitor_point mp, device d |
| | | WHERE mp.id = d.monitor_point_id |
| | | AND mp.organization_id IN |
| | | <foreach collection="organizationIdList" index="index" item="organizationId" open="(" separator="," close=")"> |
| | | #{organizationId} |
| | | <foreach collection="organizationIdList" index="index" item="organizationId" open="(" separator="," close=")"> |
| | | #{organizationId} |
| | | </foreach> |
| | | AND d.is_delete = '0'; |
| | | </select> |
| | |
| | | </foreach> |
| | | AND d.is_delete = '0' |
| | | </select> |
| | | |
| | | |
| | | <select id="macAndOrganizationIdMap" resultType="java.util.LinkedHashMap"> |
| | | select mac,organization_id as organizationId |
| | | FROM monitor_point m,device d |
| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="getMacsByMonitorPointIds" resultType="java.lang.String"> |
| | | select mac from device where monitor_point_id in |
| | | <foreach item="item" collection="list" index="index" open="(" separator="," close=")">#{item}</foreach> |
| | | and is_delete=0; |
| | | </select> |
| | | |
| | | <select id="getAllByMacList" resultType="java.util.Map"> |
| | | select * from device |
| | | where mac in |
| | | <foreach item="item" collection="list" index="index" open="(" separator="," close=")">#{item}</foreach> |
| | | </select> |
| | | |
| | | <select id="getOfflineDevice" resultType="java.util.Map"> |
| | | SELECT name,mac |
| | | from device |
| | | WHERE state=4 and is_delete=0 and monitor_point_id in |
| | | (SELECT id FROM monitor_point WHERE city_code!=130900 or (city_code=130900 and organization_id in (60, 65, 159, 165, 166) and id!=56 and id!=83 and id!=84)) |
| | | and mac not in (SELECT mac FROM special_device_config); |
| | | </select> |
| | | </mapper> |