<?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.by4cloud.platformx.device.mapper.InventoryFlowWaterMapper">
|
|
<resultMap id="inventoryFlowWaterMap" type="com.by4cloud.platformx.device.entity.InventoryFlowWater">
|
<id property="id" column="id"/>
|
<result property="inventoryId" column="inventory_id"/>
|
<result property="classId" column="class_id"/>
|
<result property="deviceId" column="device_id"/>
|
<result property="num" column="num"/>
|
<result property="planId" column="plan_id"/>
|
<result property="remark" column="remark"/>
|
<result property="compId" column="comp_id"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="delFlag" column="del_flag"/>
|
</resultMap>
|
<select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.InventoryFlowWaterPageVo">
|
select
|
ifw.id,
|
d.name devicName,
|
dc.name className,
|
d.create_time ,
|
ifw.operate_type,
|
di.serial_no
|
from
|
inventory_flow_water ifw
|
join device d on d.id = ifw.device_id
|
join device_class dc on dc.id = ifw.class_id
|
join device_inventory di on di.id = ifw.inventory_id
|
where
|
ifw.del_flag = '0'
|
<if test="queryDTO.deviceName != null and queryDTO.deviceName !=''">
|
and d.name like CONCAT('%', #{queryDTO.deviceName}, '%')
|
</if>
|
order by ifw.create_time desc
|
</select>
|
</mapper>
|