LingangEquimentSelfCheckMapper.xml 8.13 KB
<?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.ruoyi.mapper.equipment.self.check.LingangEquimentSelfCheckMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.domain.equipment.self.check.LingangEquimentSelfCheck">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="device" jdbcType="VARCHAR" property="device"/>
        <result column="app_version" jdbcType="VARCHAR" property="appVersion"/>
        <result column="wine" jdbcType="INTEGER" property="wine"/>
        <result column="cameras" jdbcType="VARCHAR" property="cameras"/>
        <result column="therm" jdbcType="INTEGER" property="therm"/>
        <result column="horn" jdbcType="INTEGER" property="horn"/>
        <result column="mike" jdbcType="INTEGER" property="mike"/>
        <result column="equiment_self_lock" jdbcType="INTEGER" property="lock"/>
        <result column="equiment_self_time" jdbcType="TIMESTAMP" property="time"/>
        <result column="deviceType" jdbcType="VARCHAR" property="devicetype"/>
        <result column="isKeybox" jdbcType="BIT" property="iskeybox"/>
        <result column="quipment_exception_id" jdbcType="INTEGER" property="quipmentExceptionId"/>
        <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
    </resultMap>

    <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ruoyi.domain.equipment.self.check.LingangEquimentSelfCheck">
        INSERT INTO equiment_self_check
        <include refid="insertSelectiveColumn"></include>
        <include refid="insertSelectiveValue"></include>
    </insert>

    <sql id="columns">
        id
        ,  device   ,  app_version   ,  wine   ,  cameras   ,  therm   ,  horn   ,  mike   ,  equiment_self_lock   ,  equiment_self_time  ,  deviceType   ,  isKeybox   ,  quipment_exception_id   ,  create_by   ,  create_time   ,  update_by   ,  update_time
    </sql>

    <sql id="insert_columns">
        id
        ,  device  ,  app_version  ,  wine  ,  cameras  ,  therm  ,  horn  ,  mike  ,  equiment_self_lock  ,  equiment_self_time ,  deviceType  ,  isKeybox  ,  quipment_exception_id  ,  create_by  ,  create_time  ,  update_by  ,  update_time
    </sql>

    <sql id="insert_values">
        #{id}
        ,
        #{device},
        #{appVersion},
        #{wine},
        #{cameras},
        #{therm},
        #{horn},
        #{mike},
        #{lock},
        #{time},
        #{devicetype},
        #{iskeybox},
        #{quipmentExceptionId},
        #{createBy},
        #{createTime},
        #{updateBy},
        #{updateTime}
    </sql>

    <sql id="insertSelectiveColumn">
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="null!=id">id,</if>
            <if test="null!=device">device,</if>
            <if test="null!=appVersion">app_version,</if>
            <if test="null!=wine">wine,</if>
            <if test="null!=cameras">cameras,</if>
            <if test="null!=therm">therm,</if>
            <if test="null!=horn">horn,</if>
            <if test="null!=mike">mike,</if>
            <if test="null!=lock">equiment_self_lock,</if>
            <if test="null!=time">equiment_self_time,</if>
            <if test="null!=devicetype">deviceType,</if>
            <if test="null!=iskeybox">isKeybox,</if>
            <if test="null!=quipmentExceptionId">quipment_exception_id,</if>
            <if test="null!=createBy">create_by,</if>
            <if test="null!=createTime">create_time,</if>
            <if test="null!=updateBy">update_by,</if>
            <if test="null!=updateTime">update_time,</if>
        </trim>
    </sql>

    <sql id="insertSelectiveValue">
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="null!=id">#{id,jdbcType=BIGINT},</if>
            <if test="null!=device">#{device,jdbcType=VARCHAR},</if>
            <if test="null!=appVersion">#{appVersion,jdbcType=VARCHAR},</if>
            <if test="null!=wine">#{wine,jdbcType=INTEGER},</if>
            <if test="null!=cameras">#{cameras,jdbcType=JSON},</if>
            <if test="null!=therm">#{therm,jdbcType=INTEGER},</if>
            <if test="null!=horn">#{horn,jdbcType=INTEGER},</if>
            <if test="null!=mike">#{mike,jdbcType=INTEGER},</if>
            <if test="null!=lock">#{lock,jdbcType=INTEGER},</if>
            <if test="null!=time">#{time,jdbcType=TIMESTAMP},</if>
            <if test="null!=devicetype">#{devicetype,jdbcType=VARCHAR},</if>
            <if test="null!=iskeybox">#{iskeybox,jdbcType=BIT},</if>
            <if test="null!=quipmentExceptionId">#{quipmentExceptionId,jdbcType=INTEGER},</if>
            <if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
            <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">#{updateBy,jdbcType=VARCHAR},</if>
            <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </sql>

    <sql id="updateByPrimaryKeySelectiveSql">
        <set>
            <if test="null!=id">id = #{id,jdbcType=BIGINT},</if>
            <if test="null!=device">device = #{device,jdbcType=VARCHAR},</if>
            <if test="null!=appVersion">app_version = #{appVersion,jdbcType=VARCHAR},</if>
            <if test="null!=wine">wine = #{wine,jdbcType=INTEGER},</if>
            <if test="null!=cameras">cameras = #{cameras,jdbcType=JSON},</if>
            <if test="null!=therm">therm = #{therm,jdbcType=INTEGER},</if>
            <if test="null!=horn">horn = #{horn,jdbcType=INTEGER},</if>
            <if test="null!=mike">mike = #{mike,jdbcType=INTEGER},</if>
            <if test="null!=lock">equiment_self_lock = #{lock,jdbcType=INTEGER},</if>
            <if test="null!=time">equiment_self_time = #{time,jdbcType=TIMESTAMP},</if>
            <if test="null!=devicetype">deviceType = #{devicetype,jdbcType=VARCHAR},</if>
            <if test="null!=iskeybox">isKeybox = #{iskeybox,jdbcType=BIT},</if>
            <if test="null!=quipmentExceptionId">quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if>
            <if test="null!=createBy">create_by = #{createBy,jdbcType=VARCHAR},</if>
            <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">update_by = #{updateBy,jdbcType=VARCHAR},</if>
            <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
    </sql>

    <sql id="where">
        <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if>
        <if test="null!=device">AND device = #{device,jdbcType=VARCHAR},</if>
        <if test="null!=appVersion">AND app_version = #{appVersion,jdbcType=VARCHAR},</if>
        <if test="null!=wine">AND wine = #{wine,jdbcType=INTEGER},</if>
        <if test="null!=cameras">AND cameras = #{cameras,jdbcType=JSON},</if>
        <if test="null!=therm">AND therm = #{therm,jdbcType=INTEGER},</if>
        <if test="null!=horn">AND horn = #{horn,jdbcType=INTEGER},</if>
        <if test="null!=mike">AND mike = #{mike,jdbcType=INTEGER},</if>
        <if test="null!=lock">AND equiment_self_lock = #{lock,jdbcType=INTEGER},</if>
        <if test="null!=time">AND equiment_self_time = #{time,jdbcType=TIMESTAMP},</if>
        <if test="null!=devicetype">AND deviceType = #{devicetype,jdbcType=VARCHAR},</if>
        <if test="null!=iskeybox">AND isKeybox = #{iskeybox,jdbcType=BIT},</if>
        <if test="null!=quipmentExceptionId">AND quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if>
        <if test="null!=createBy">AND create_by = #{createBy,jdbcType=VARCHAR},</if>
        <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=VARCHAR},</if>
        <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
    </sql>
</mapper>