ZhuDongming
2020-04-13 14753bc669a106315717f0f4a70bf2bf5c3e8995
src/main/resources/mapper/DeviceMapper.xml
@@ -45,6 +45,8 @@
         <result column="device_tech" property="deviceTech" jdbcType="TINYINT" />
         <result column="device_cat" property="deviceCat" jdbcType="TINYINT" />
         <result column="device_source" property="deviceSource" jdbcType="VARCHAR" />
         <result column="ext_c" property="extC" jdbcType="VARCHAR" />
         <result column="ext_d" property="extD" jdbcType="VARCHAR" />
      </association>
   </resultMap>
@@ -214,7 +216,7 @@
      </where>
   </select>
   <select id="selectByOrgIdAndMpId" resultMap="BaseResultMap">
      SELECT dev.*,dve.version as device_version_value from device dev
      SELECT dev.*,dve.version as device_version_value,mpt.* from device dev
      left join monitor_point mpt on dev.monitor_point_id = mpt.id
      left join device_version dve on dev.device_version_id = dve.id
      <where>
@@ -394,7 +396,9 @@
         mpt.province_code,
         dp.device_tech,
         dp.device_cat,
         dp.device_source
         dp.device_source,
         dp.ext_c,
         dp.ext_d
      from device dev
      left join operate_user ouser on dev.operate_user_id = ouser.id
      left join device_version dvn on dev.device_version_id = dvn.id
@@ -410,4 +414,20 @@
         </if>
      )
   </select>
   <select id="getLimitDataByDevice" resultType="String">
      SELECT limit_val FROM view_device_density WHERE mac = #{mac}
   </select>
    <select id="getMacsByOrganizationId" resultType="string">
        SELECT d.mac
        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>
        AND d.is_delete = '0'
    </select>
</mapper>