Files
zhwl/zhwl-device/zhwl-device-gate/target/classes/mapper/gate/ZdyDeviceGateLogMapper.xml
2025-07-01 17:54:58 +08:00

462 lines
21 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.gate.mapper.ZdyDeviceGateLogMapper">
<resultMap type="ZdyDeviceGateLog" id="ZdyDeviceGateLogResult">
<result property="id" column="id"/>
<result property="type" column="type"/>
<result property="model" column="model"/>
<result property="serialNo" column="serial_no"/>
<result property="mac" column="mac"/>
<result property="dateTime" column="date_time"/>
<result property="ipAddress" column="ip_address"/>
<result property="ipv6Address" column="ipv6_address"/>
<result property="portNo" column="port_no"/>
<result property="protocolType" column="protocol_type"/>
<result property="eventType" column="event_type"/>
<result property="eventDescription" column="event_description"/>
<result property="direction" column="direction"/>
<result property="verifyType" column="verify_type"/>
<result property="collectResult" column="collect_result"/>
<result property="blastResult" column="blast_result"/>
<result property="cardNo" column="card_no"/>
<result property="name" column="name"/>
<result property="sex" column="sex"/>
<result property="folk" column="folk"/>
<result property="birthday" column="birthday"/>
<result property="address" column="address"/>
<result property="validStart" column="valid_start"/>
<result property="validEnd" column="valid_end"/>
<result property="sign" column="sign"/>
<result property="cardPic" column="card_pic"/>
<result property="openDoor" column="open_door"/>
<result property="voiceCode" column="voice_code"/>
<result property="voiceContent" column="voice_content"/>
<result property="line1" column="line1"/>
<result property="line2" column="line2"/>
<result property="line3" column="line3"/>
<result property="line4" column="line4"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="remark" column="remark"/>
<result property="configStatus" column="config_status"/>
</resultMap>
<sql id="selectZdyDeviceGateLogVo">
select id, type, model, serial_no, mac, date_time, ip_address, ipv6_address, port_no, protocol_type, event_type, event_description, direction, verify_type, collect_result, blast_result, card_no, name, sex, folk, birthday, address, valid_start, valid_end, sign, card_pic, open_door, voice_code, voice_content, line1, line2, line3, line4, create_time, create_by, update_time, update_by, remark, config_status
from zdy_device_gate_log
</sql>
<select id="selectZdyDeviceGateLogList" parameterType="ZdyDeviceGateLog" resultMap="ZdyDeviceGateLogResult">
<include refid="selectZdyDeviceGateLogVo"/>
<where>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="model != null and model != ''">
and model = #{model}
</if>
<if test="serialNo != null and serialNo != ''">
and serial_no = #{serialNo}
</if>
<if test="mac != null and mac != ''">
and mac = #{mac}
</if>
<if test="dateTime != null and dateTime != ''">
and date_time = #{dateTime}
</if>
<if test="ipAddress != null and ipAddress != ''">
and ip_address = #{ipAddress}
</if>
<if test="ipv6Address != null and ipv6Address != ''">
and ipv6_address = #{ipv6Address}
</if>
<if test="portNo != null ">
and port_no = #{portNo}
</if>
<if test="protocolType != null and protocolType != ''">
and protocol_type = #{protocolType}
</if>
<if test="eventType != null and eventType != ''">
and event_type = #{eventType}
</if>
<if test="eventDescription != null and eventDescription != ''">
and event_description = #{eventDescription}
</if>
<if test="direction != null ">
and direction = #{direction}
</if>
<if test="verifyType != null ">
and verify_type = #{verifyType}
</if>
<if test="collectResult != null ">
and collect_result = #{collectResult}
</if>
<if test="blastResult != null ">
and blast_result = #{blastResult}
</if>
<if test="cardNo != null and cardNo != ''">
and card_no = #{cardNo}
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="sex != null and sex != ''">
and sex = #{sex}
</if>
<if test="folk != null and folk != ''">
and folk = #{folk}
</if>
<if test="birthday != null and birthday != ''">
and birthday = #{birthday}
</if>
<if test="address != null and address != ''">
and address = #{address}
</if>
<if test="validStart != null and validStart != ''">
and valid_start = #{validStart}
</if>
<if test="validEnd != null and validEnd != ''">
and valid_end = #{validEnd}
</if>
<if test="sign != null and sign != ''">
and sign = #{sign}
</if>
<if test="cardPic != null and cardPic != ''">
and card_pic = #{cardPic}
</if>
<if test="openDoor != null ">
and open_door = #{openDoor}
</if>
<if test="voiceCode != null and voiceCode != ''">
and voice_code = #{voiceCode}
</if>
<if test="voiceContent != null and voiceContent != ''">
and voice_content = #{voiceContent}
</if>
<if test="line1 != null and line1 != ''">
and line1 = #{line1}
</if>
<if test="line2 != null and line2 != ''">
and line2 = #{line2}
</if>
<if test="line3 != null and line3 != ''">
and line3 = #{line3}
</if>
<if test="line4 != null and line4 != ''">
and line4 = #{line4}
</if>
<if test="configStatus != null and configStatus != ''">
and config_status = #{configStatus}
</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
and create_time between #{params.beginTime} and #{params.endTime}
</if>
</where>
order by id desc
</select>
<select id="selectZdyDeviceGateLogById" parameterType="Long"
resultMap="ZdyDeviceGateLogResult">
<include refid="selectZdyDeviceGateLogVo"/>
where id = #{id}
</select>
<insert id="insertZdyDeviceGateLog" parameterType="ZdyDeviceGateLog" useGeneratedKeys="true"
keyProperty="id">
insert into zdy_device_gate_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null">type,
</if>
<if test="model != null">model,
</if>
<if test="serialNo != null">serial_no,
</if>
<if test="mac != null">mac,
</if>
<if test="dateTime != null">date_time,
</if>
<if test="ipAddress != null">ip_address,
</if>
<if test="ipv6Address != null">ipv6_address,
</if>
<if test="portNo != null">port_no,
</if>
<if test="protocolType != null">protocol_type,
</if>
<if test="eventType != null">event_type,
</if>
<if test="eventDescription != null">event_description,
</if>
<if test="direction != null">direction,
</if>
<if test="verifyType != null">verify_type,
</if>
<if test="collectResult != null">collect_result,
</if>
<if test="blastResult != null">blast_result,
</if>
<if test="cardNo != null">card_no,
</if>
<if test="name != null">name,
</if>
<if test="sex != null">sex,
</if>
<if test="folk != null">folk,
</if>
<if test="birthday != null">birthday,
</if>
<if test="address != null">address,
</if>
<if test="validStart != null">valid_start,
</if>
<if test="validEnd != null">valid_end,
</if>
<if test="sign != null">sign,
</if>
<if test="cardPic != null">card_pic,
</if>
<if test="openDoor != null">open_door,
</if>
<if test="voiceCode != null">voice_code,
</if>
<if test="voiceContent != null">voice_content,
</if>
<if test="line1 != null">line1,
</if>
<if test="line2 != null">line2,
</if>
<if test="line3 != null">line3,
</if>
<if test="line4 != null">line4,
</if>
<if test="createTime != null">create_time,
</if>
<if test="createBy != null">create_by,
</if>
<if test="updateTime != null">update_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="remark != null">remark,
</if>
<if test="configStatus != null">config_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null">#{type},
</if>
<if test="model != null">#{model},
</if>
<if test="serialNo != null">#{serialNo},
</if>
<if test="mac != null">#{mac},
</if>
<if test="dateTime != null">#{dateTime},
</if>
<if test="ipAddress != null">#{ipAddress},
</if>
<if test="ipv6Address != null">#{ipv6Address},
</if>
<if test="portNo != null">#{portNo},
</if>
<if test="protocolType != null">#{protocolType},
</if>
<if test="eventType != null">#{eventType},
</if>
<if test="eventDescription != null">#{eventDescription},
</if>
<if test="direction != null">#{direction},
</if>
<if test="verifyType != null">#{verifyType},
</if>
<if test="collectResult != null">#{collectResult},
</if>
<if test="blastResult != null">#{blastResult},
</if>
<if test="cardNo != null">#{cardNo},
</if>
<if test="name != null">#{name},
</if>
<if test="sex != null">#{sex},
</if>
<if test="folk != null">#{folk},
</if>
<if test="birthday != null">#{birthday},
</if>
<if test="address != null">#{address},
</if>
<if test="validStart != null">#{validStart},
</if>
<if test="validEnd != null">#{validEnd},
</if>
<if test="sign != null">#{sign},
</if>
<if test="cardPic != null">#{cardPic},
</if>
<if test="openDoor != null">#{openDoor},
</if>
<if test="voiceCode != null">#{voiceCode},
</if>
<if test="voiceContent != null">#{voiceContent},
</if>
<if test="line1 != null">#{line1},
</if>
<if test="line2 != null">#{line2},
</if>
<if test="line3 != null">#{line3},
</if>
<if test="line4 != null">#{line4},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="remark != null">#{remark},
</if>
<if test="configStatus != null">#{configStatus},
</if>
</trim>
</insert>
<update id="updateZdyDeviceGateLog" parameterType="ZdyDeviceGateLog">
update zdy_device_gate_log
<trim prefix="SET" suffixOverrides=",">
<if test="type != null">type =
#{type},
</if>
<if test="model != null">model =
#{model},
</if>
<if test="serialNo != null">serial_no =
#{serialNo},
</if>
<if test="mac != null">mac =
#{mac},
</if>
<if test="dateTime != null">date_time =
#{dateTime},
</if>
<if test="ipAddress != null">ip_address =
#{ipAddress},
</if>
<if test="ipv6Address != null">ipv6_address =
#{ipv6Address},
</if>
<if test="portNo != null">port_no =
#{portNo},
</if>
<if test="protocolType != null">protocol_type =
#{protocolType},
</if>
<if test="eventType != null">event_type =
#{eventType},
</if>
<if test="eventDescription != null">event_description =
#{eventDescription},
</if>
<if test="direction != null">direction =
#{direction},
</if>
<if test="verifyType != null">verify_type =
#{verifyType},
</if>
<if test="collectResult != null">collect_result =
#{collectResult},
</if>
<if test="blastResult != null">blast_result =
#{blastResult},
</if>
<if test="cardNo != null">card_no =
#{cardNo},
</if>
<if test="name != null">name =
#{name},
</if>
<if test="sex != null">sex =
#{sex},
</if>
<if test="folk != null">folk =
#{folk},
</if>
<if test="birthday != null">birthday =
#{birthday},
</if>
<if test="address != null">address =
#{address},
</if>
<if test="validStart != null">valid_start =
#{validStart},
</if>
<if test="validEnd != null">valid_end =
#{validEnd},
</if>
<if test="sign != null">sign =
#{sign},
</if>
<if test="cardPic != null">card_pic =
#{cardPic},
</if>
<if test="openDoor != null">open_door =
#{openDoor},
</if>
<if test="voiceCode != null">voice_code =
#{voiceCode},
</if>
<if test="voiceContent != null">voice_content =
#{voiceContent},
</if>
<if test="line1 != null">line1 =
#{line1},
</if>
<if test="line2 != null">line2 =
#{line2},
</if>
<if test="line3 != null">line3 =
#{line3},
</if>
<if test="line4 != null">line4 =
#{line4},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="remark != null">remark =
#{remark},
</if>
<if test="configStatus != null">config_status =
#{configStatus},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZdyDeviceGateLogById" parameterType="Long">
delete from zdy_device_gate_log where id = #{id}
</delete>
<delete id="deleteZdyDeviceGateLogByIds" parameterType="String">
delete from zdy_device_gate_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>