web端控制中心3

This commit is contained in:
2025-08-27 08:59:29 +08:00
parent 74cefe9cc3
commit 364574eeae
13 changed files with 196 additions and 44 deletions

View File

@ -4,4 +4,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuyuanshen.equipment.mapper.DeviceLogMapper">
<select id="getInstructionRecord" resultType="com.fuyuanshen.equipment.domain.vo.InstructionRecordVo">
SELECT
a.id,
a.device_name AS deviceName,
c.type_name deviceType,
a.device_action AS deviceAction,
a.content,
a.create_time AS createTime
FROM
device_log a left join device b on a.device_id = b.id
left join device_type c on b.device_type = c.id
WHERE 1 = 1
<if test="bo.deviceType != null">
AND c.id = #{bo.deviceType}
</if>
<if test="bo.deviceName != null and bo.deviceName != ''">
AND a.device_name like concat('%',#{bo.deviceName},'%')
</if>
<if test="bo.deviceMac != null and bo.deviceMac != ''">
AND b.device_mac = #{bo.deviceMac}
</if>
<if test="bo.deviceImei != null and bo.deviceImei != ''">
AND b.device_imei = #{bo.deviceImei}
</if>
<if test="bo.startTime != null and bo.startTime != ''">
AND create_time <![CDATA[>=]]> #{bo.startTime}
</if>
<if test="bo.endTime != null and bo.endTime != ''">
AND create_time <![CDATA[<=]]> #{bo.startTime}
</if>
ORDER BY
a.create_time DESC
</select>
</mapper>