|
@ -3,7 +3,7 @@ |
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
<mapper namespace="com.zc.business.mapper.DcDeviceOfflineRecordMapper"> |
|
|
<mapper namespace="com.zc.business.mapper.DcDeviceOfflineRecordMapper"> |
|
|
|
|
|
|
|
|
<resultMap type="DcDeviceOfflineRecord" id="DcDeviceOfflineRecordResult"> |
|
|
<resultMap type="DcDeviceOfflineRecord" id="DcDeviceOfflineRecordResult"> |
|
|
<result property="id" column="id" /> |
|
|
<result property="id" column="id" /> |
|
|
<result property="deviceId" column="device_id" /> |
|
|
<result property="deviceId" column="device_id" /> |
|
@ -22,15 +22,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="createTime" column="create_time" /> |
|
|
<result property="updateTime" column="update_time" /> |
|
|
<result property="updateTime" column="update_time" /> |
|
|
<result property="updateBy" column="update_by" /> |
|
|
<result property="updateBy" column="update_by" /> |
|
|
|
|
|
<result property="diagnostics" column="diagnostics" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectDcDeviceOfflineRecordVo"> |
|
|
<sql id="selectDcDeviceOfflineRecordVo"> |
|
|
select id, device_id,iot_device_id, device_name, device_type, stake_mark, direction, installation_site, device_ip, facilities_type, child_type, longitude, latitude, status, create_time, update_time, update_by from dc_device_offline_record |
|
|
select id, device_id,iot_device_id, device_name, device_type, stake_mark, direction, installation_site, device_ip, facilities_type, child_type, longitude, latitude, status, create_time, update_time, update_by,diagnostics from dc_device_offline_record |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<select id="selectDcDeviceOfflineRecordList" parameterType="DcDeviceOfflineRecord" resultMap="DcDeviceOfflineRecordResult"> |
|
|
<select id="selectDcDeviceOfflineRecordList" parameterType="DcDeviceOfflineRecord" resultMap="DcDeviceOfflineRecordResult"> |
|
|
<include refid="selectDcDeviceOfflineRecordVo"/> |
|
|
<include refid="selectDcDeviceOfflineRecordVo"/> |
|
|
<where> |
|
|
<where> |
|
|
<if test="deviceId != null "> and device_id = #{deviceId}</if> |
|
|
<if test="deviceId != null "> and device_id = #{deviceId}</if> |
|
|
<if test="iotDeviceId != null "> and iot_device_id = #{iotDeviceId}</if> |
|
|
<if test="iotDeviceId != null "> and iot_device_id = #{iotDeviceId}</if> |
|
|
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> |
|
|
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> |
|
@ -51,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</where> |
|
|
</where> |
|
|
order by id desc |
|
|
order by id desc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectDcDeviceOfflineRecordById" parameterType="Long" resultMap="DcDeviceOfflineRecordResult"> |
|
|
<select id="selectDcDeviceOfflineRecordById" parameterType="Long" resultMap="DcDeviceOfflineRecordResult"> |
|
|
<include refid="selectDcDeviceOfflineRecordVo"/> |
|
|
<include refid="selectDcDeviceOfflineRecordVo"/> |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createTime != null">create_time,</if> |
|
|
<if test="createTime != null">create_time,</if> |
|
|
<if test="updateTime != null">update_time,</if> |
|
|
<if test="updateTime != null">update_time,</if> |
|
|
<if test="updateBy != null">update_by,</if> |
|
|
<if test="updateBy != null">update_by,</if> |
|
|
|
|
|
<if test="diagnostics != null">`diagnostics`,</if> |
|
|
</trim> |
|
|
</trim> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<if test="deviceId != null">#{deviceId},</if> |
|
|
<if test="deviceId != null">#{deviceId},</if> |
|
@ -101,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
<if test="updateTime != null">#{updateTime},</if> |
|
|
<if test="updateTime != null">#{updateTime},</if> |
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
|
|
|
<if test="diagnostics != null">#{diagnostics},</if> |
|
|
</trim> |
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
@ -132,9 +135,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
<delete id="deleteDcDeviceOfflineRecordByIds" parameterType="String"> |
|
|
<delete id="deleteDcDeviceOfflineRecordByIds" parameterType="String"> |
|
|
delete from dc_device_offline_record where id in |
|
|
delete from dc_device_offline_record where id in |
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
#{id} |
|
|
#{id} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</delete> |
|
|
</delete> |
|
|
</mapper> |
|
|
</mapper> |
|
|