<?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.iailab.module.device.dao.DeviceInfoDao">
|
<select id="getchildrenList" resultType="com.iailab.module.device.dto.DeviceInfoDTO">
|
select id, name, workshop
|
from t_device_info
|
where pid = #{id}
|
</select>
|
<select id="getPageList" resultType="com.iailab.module.device.dto.DeviceInfoDTO">
|
select a.*,b.health_score healthScore,b.health_evaluate healthEvaluate,b.is_health isHealth,b.evaluate_date
|
evaluateDate,
|
IFNULL((select device_id from t_device_account where device_name = a.name),0) deviceId
|
from t_device_info a,
|
t_device_health_evaluate b
|
where a.id = b.device_id
|
<if test="params.no != null and params.no != ''">
|
and a.no like concat('%',#{params.no},'%')
|
</if>
|
<if test="params.name != null and params.name != ''">
|
and a.name like concat('%',#{params.name},'%')
|
</if>
|
<if test="params.isMain != null and params.isMain != ''">
|
and a.is_main = #{params.isMain}
|
</if>
|
<if test="params.isMain != null and params.isMain != ''">
|
and a.is_main = #{params.isMain}
|
</if>
|
|
|
</select>
|
|
|
</mapper>
|