| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.xunmei.host.iot.mapper.IotDeviceDiagnoseMissionChMapper">
- <select id="selectMissions" resultType="com.xunmei.host.iot.dto.IotDeviceDiagnoseMissionReq">
- select * from iot_device_diagnose_mission
- </select>
- <select id="selectMissionChns" resultType="com.xunmei.common.core.domain.iot.domain.IotDeviceDiagnoseMissionCh">
- select * from iot_device_diagnose_mission_ch where mission_id = #{missionId}
- and iot_token in
- <foreach collection="iotCodes" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </select>
- <select id="selectThresholds" resultType="com.xunmei.host.iot.dto.IotDeviceDiagnoseThresholdReq">
- select * from iot_device_diagnose_threshold
- </select>
- <select id="selectThresholdChns" resultType="com.xunmei.common.core.domain.iot.domain.IotDeviceDiagnoseThresholdCh">
- select * from iot_device_diagnose_threshold_ch where threshold_code = #{thresholdCode}
- and iot_token in
- <foreach collection="iotCodes" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </select>
- <select id="updateDiagnoseNumber" resultType="java.lang.Integer">
- update iot_device_diagnose_threshold set diagnose_number =
- (
- select count(1) from iot_device_diagnose_threshold_ch where threshold_code = #{thresholdCode}
- )
- where threshold_code = #{thresholdCode}
- </select>
- <select id="selectIotTokensByCamera" resultType="java.lang.String">
- select distinct iot_token from iot_device_info where device_type in (2,3) and deleted = 0
- </select>
- </mapper>
|