192 lines
7.2 KiB
XML
192 lines
7.2 KiB
XML
<?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.zhwl.passflow.mapper.ZdyDevicePassflowHeartLogMapper">
|
|
|
|
<resultMap type="ZdyDevicePassflowHeartLog" id="ZdyDevicePassflowHeartLogResult">
|
|
<result property="logId" column="log_id"/>
|
|
<result property="sn" column="sn"/>
|
|
<result property="type" column="type"/>
|
|
<result property="time" column="time"/>
|
|
<result property="dataTime" column="data_time"/>
|
|
<result property="createdTime" column="created_time"/>
|
|
<result property="state" column="state"/>
|
|
<result property="name" column="name"/>
|
|
<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="remark" column="remark"/>
|
|
<result property="sendInfo" column="send_info"/>
|
|
<result property="reqInfo" column="req_info"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
<result property="passflowName" column="passflow_name"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyDevicePassflowHeartLogVo">
|
|
select p.passflow_name,hl.log_id, hl.sn, hl.type, hl.time, hl.data_time,hl.created_time,hl.name, hl.state,hl.send_info,hl.req_info, hl.create_by, hl.create_time, hl.update_by, hl.update_time, hl.remark,hl.dept_id
|
|
from zdy_device_passflow_heart_log hl
|
|
left join zdy_device_passflow p on hl.sn = p.sn
|
|
</sql>
|
|
|
|
<select id="selectZdyDevicePassflowHeartLogList" parameterType="ZdyDevicePassflowHeartLog"
|
|
resultMap="ZdyDevicePassflowHeartLogResult">
|
|
<include refid="selectZdyDevicePassflowHeartLogVo"/>
|
|
left join sys_dept d on hl.dept_id = d.dept_id
|
|
<where>
|
|
<if test="sn != null and sn != ''">
|
|
and hl.sn = #{sn}
|
|
</if>
|
|
<if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
|
|
and hl.data_time between #{params.beginDataTime} and #{params.endDataTime}
|
|
</if>
|
|
<if test="passflowName != null and passflowName != ''">
|
|
and p.passflow_name like concat('%', #{passflowName}, '%')
|
|
</if>
|
|
${params.dataScope}
|
|
</where>
|
|
order by hl.create_time desc
|
|
</select>
|
|
|
|
<select id="selectZdyDevicePassflowHeartLogByLogId" parameterType="Long"
|
|
resultMap="ZdyDevicePassflowHeartLogResult">
|
|
<include refid="selectZdyDevicePassflowHeartLogVo"/>
|
|
where hl.log_id = #{logId}
|
|
</select>
|
|
|
|
<insert id="insertZdyDevicePassflowHeartLog" parameterType="ZdyDevicePassflowHeartLog" useGeneratedKeys="true"
|
|
keyProperty="logId">
|
|
insert into zdy_device_passflow_heart_log
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="sn != null">sn,
|
|
</if>
|
|
<if test="type != null">type,
|
|
</if>
|
|
<if test="time != null">time,
|
|
</if>
|
|
<if test="dataTime != null">data_time,
|
|
</if>
|
|
<if test="createdTime != null">created_time,
|
|
</if>
|
|
<if test="name != null">name,
|
|
</if>
|
|
<if test="state != null">state,
|
|
</if>
|
|
<if test="createBy != null">create_by,
|
|
</if>
|
|
<if test="createTime != null">create_time,
|
|
</if>
|
|
<if test="updateBy != null">update_by,
|
|
</if>
|
|
<if test="updateTime != null">update_time,
|
|
</if>
|
|
<if test="remark != null">remark,
|
|
</if>
|
|
<if test="sendInfo != null">send_info,
|
|
</if>
|
|
<if test="reqInfo != null">req_info,
|
|
</if>
|
|
<if test="deptId != null">dept_id,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="sn != null">#{sn},
|
|
</if>
|
|
<if test="type != null">#{type},
|
|
</if>
|
|
<if test="time != null">#{time},
|
|
</if>
|
|
<if test="dataTime != null">#{dataTime},
|
|
</if>
|
|
<if test="createdTime != null">#{createdTime},
|
|
</if>
|
|
<if test="name != null">#{name},
|
|
</if>
|
|
<if test="state != null">#{state},
|
|
</if>
|
|
<if test="createBy != null">#{createBy},
|
|
</if>
|
|
<if test="createTime != null">#{createTime},
|
|
</if>
|
|
<if test="updateBy != null">#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">#{updateTime},
|
|
</if>
|
|
<if test="remark != null">#{remark},
|
|
</if>
|
|
<if test="sendInfo != null">#{sendInfo},
|
|
</if>
|
|
<if test="reqInfo != null">#{reqInfo},
|
|
</if>
|
|
<if test="deptId != null">#{deptId},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyDevicePassflowHeartLog" parameterType="ZdyDevicePassflowHeartLog">
|
|
update zdy_device_passflow_heart_log
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="sn != null">sn =
|
|
#{sn},
|
|
</if>
|
|
<if test="type != null">type =
|
|
#{type},
|
|
</if>
|
|
<if test="time != null">time =
|
|
#{time},
|
|
</if>
|
|
<if test="dataTime != null">data_time =
|
|
#{dataTime},
|
|
</if>
|
|
<if test="createdTime != null">created_time =
|
|
#{createdTime},
|
|
</if>
|
|
<if test="name != null">name =
|
|
#{name},
|
|
</if>
|
|
<if test="state != null">state =
|
|
#{state},
|
|
</if>
|
|
<if test="createBy != null">create_by =
|
|
#{createBy},
|
|
</if>
|
|
<if test="createTime != null">create_time =
|
|
#{createTime},
|
|
</if>
|
|
<if test="updateBy != null">update_by =
|
|
#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">update_time =
|
|
#{updateTime},
|
|
</if>
|
|
<if test="remark != null">remark =
|
|
#{remark},
|
|
</if>
|
|
<if test="sendInfo != null">send_info =
|
|
#{sendInfo},
|
|
</if>
|
|
<if test="reqInfo != null">req_info =
|
|
#{reqInfo},
|
|
</if>
|
|
<if test="deptId != null">dept_id =
|
|
#{deptId},
|
|
</if>
|
|
</trim>
|
|
where log_id = #{logId}
|
|
</update>
|
|
|
|
<delete id="deleteZdyDevicePassflowHeartLogByLogId" parameterType="Long">
|
|
delete
|
|
from zdy_device_passflow_heart_log
|
|
where log_id = #{logId}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyDevicePassflowHeartLogByLogIds" parameterType="String">
|
|
delete from zdy_device_passflow_heart_log where log_id in
|
|
<foreach item="logId" collection="array" open="(" separator="," close=")">
|
|
#{logId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|