jl-jjsp-service/securityControl-modules/securityControl-proteam/target/classes/mapper/MonitorMapper.xml

26 lines
1.3 KiB
XML
Raw Permalink Normal View History

2025-09-24 11:10:04 +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="com.sercurityControl.proteam.monitor.mapper.MonitorMapper">
<!--设备管理分页查询-->
<select id="getMonitorList" resultType="com.sercurityControl.proteam.monitor.domain.MonitorVo" parameterType="com.sercurityControl.proteam.monitor.domain.MonitorVo">
select td.id,td.device_name deviceName,td.mac_id macId,td.puid puId,td.device_type typeName,td.type_code typeCode,
if(td.state = 1,'在线','不在线') state
from t_device td
where td.is_flag='0'
<if test="deviceName!=null and deviceName!=''">
and td.device_name like concat('%',concat(#{deviceName},'%'))
</if>
<if test="macId!=null and macId!=''">
and td.mac_id like concat('%',concat(#{macId},'%'))
</if>
<if test="puId!=null and puId!=''">
and td.puid like concat('%',concat(#{puId},'%'))
</if>
<if test="typeCode!=null and typeCode!=''">
and td.type_code like concat('%',concat(#{typeCode},'%'))
</if>
<if test="state != null and state != ''">
AND td.state LIKE CONCAT('%',#{state},'%')
</if>
</select>
</mapper>