2025-08-28 11:22:04 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
2025-08-29 13:59:23 +08:00
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2025-08-28 11:22:04 +08:00
|
|
|
<mapper namespace="com.fuyuanshen.equipment.mapper.DeviceAlarmMapper">
|
|
|
|
|
2025-08-29 13:59:23 +08:00
|
|
|
<!-- 查询设备告警列表 -->
|
|
|
|
<select id="selectVoPage" resultType="com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo">
|
2025-08-29 18:58:16 +08:00
|
|
|
select *, d.device_mac as deviceMac, d.device_imei as deviceImei,
|
2025-08-29 13:59:23 +08:00
|
|
|
d.type_name as deviceTypeName
|
|
|
|
from device_alarm da
|
|
|
|
left join device d on da.device_id = d.id
|
|
|
|
left join device_type dt on dt.id = da.device_type
|
|
|
|
<where>
|
|
|
|
<if test="bo.deviceName != null">
|
2025-08-29 18:58:16 +08:00
|
|
|
and da.device_name = #{bo.deviceName}
|
2025-08-29 13:59:23 +08:00
|
|
|
</if>
|
|
|
|
<if test="bo.deviceType != null">
|
2025-08-29 18:58:16 +08:00
|
|
|
and da.device_type = #{bo.deviceType}
|
2025-08-29 13:59:23 +08:00
|
|
|
</if>
|
|
|
|
<if test="bo.deviceAction != null">
|
2025-08-29 18:58:16 +08:00
|
|
|
and da.device_action = #{bo.deviceAction}
|
2025-08-29 13:59:23 +08:00
|
|
|
</if>
|
|
|
|
<if test="bo.treatmentState != null">
|
2025-08-29 18:58:16 +08:00
|
|
|
and da.treatment_state = #{bo.treatmentState}
|
2025-08-29 13:59:23 +08:00
|
|
|
</if>
|
|
|
|
<if test="bo.queryTime1 != null and bo.queryTime2 != null ">
|
2025-08-29 18:58:16 +08:00
|
|
|
and da.start_time between #{bo.queryTime1} and #{bo.queryTime2}
|
2025-08-29 13:59:23 +08:00
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
2025-08-29 18:58:16 +08:00
|
|
|
|
2025-08-28 11:22:04 +08:00
|
|
|
</mapper>
|