2025-06-26 17:15:43 +08:00
|
|
|
<?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="org.dromara.sis.mapper.SisDeviceManageMapper">
|
|
|
|
|
2025-07-21 03:36:07 +08:00
|
|
|
|
|
|
|
<select id="selectByPage" resultType="org.dromara.sis.domain.vo.SisDeviceManageVo">
|
|
|
|
SELECT
|
|
|
|
a.*,
|
|
|
|
b.factory_name factoryName,
|
|
|
|
c.name groupName
|
|
|
|
FROM
|
|
|
|
sis_device_manage a
|
|
|
|
LEFT JOIN tb_factory b ON a.factory_no = b.factory_no
|
|
|
|
LEFT JOIN sis_device_group c ON a.group_id = c.id
|
|
|
|
<where>
|
|
|
|
<!-- 设备名称模糊查询 -->
|
|
|
|
<if test="bo.deviceName != null and bo.deviceName != ''">
|
|
|
|
AND device_name LIKE CONCAT('%', #{bo.deviceName}, '%')
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- 设备IP精确匹配 -->
|
|
|
|
<if test="bo.deviceIp != null and bo.deviceIp != ''">
|
|
|
|
AND device_ip = #{bo.deviceIp}
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- 设备端口精确匹配 -->
|
|
|
|
<if test="bo.devicePort != null">
|
|
|
|
AND device_port = #{bo.devicePort}
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- 设备MAC地址精确匹配 -->
|
|
|
|
<if test="bo.deviceMac != null and bo.deviceMac != ''">
|
|
|
|
AND device_mac = #{bo.deviceMac}
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- 设备类型精确匹配 -->
|
|
|
|
<if test="bo.deviceType != null">
|
|
|
|
AND device_type = #{bo.deviceType}
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- 出厂编号精确匹配 -->
|
|
|
|
<if test="bo.factoryNo != null and bo.factoryNo != ''">
|
|
|
|
AND factory_no = #{bo.factoryNo}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
ORDER BY a.create_time desc
|
|
|
|
|
|
|
|
</select>
|
2025-06-26 17:15:43 +08:00
|
|
|
</mapper>
|