LinggangSignInResourceMapper.xml 5.23 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.sign.in.resource.LinggangSignInResourceMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.domain.sign.in.resource.LinggangSignInResource">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="sign_id" jdbcType="BIGINT" property="signId"/>
        <result column="sign_in_resource_index" jdbcType="INTEGER" property="index"/>
        <result column="Resource_type" jdbcType="INTEGER" property="resourceType"/>
        <result column="time" jdbcType="TIMESTAMP" property="time"/>
        <result column="create_by" jdbcType="BIGINT" property="createBy"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="path" jdbcType="VARCHAR" property="path"/>
    </resultMap>

    <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ruoyi.domain.sign.in.resource.LinggangSignInResource">
        INSERT INTO Sign_in_Resource <include refid="insertSelectiveColumn"></include>
        <include refid="insertSelectiveValue"></include>
    </insert>

    <sql id="columns">
        id
        ,  sign_id   ,  sign_in_resource_index   ,  Resource_type   ,  time   ,  create_by   ,  create_time   ,  update_by   ,  update_time   ,  path
    </sql>

    <sql id="insert_columns">
        id
        ,  sign_id  ,  sign_in_resource_index  ,  Resource_type  ,  time  ,  create_by  ,  create_time  ,  update_by  ,  update_time  ,  path
    </sql>

    <sql id="insert_values">
        #{id}
        ,
        #{signId},
        #{index},
        #{resourceType},
        #{time},
        #{createBy},
        #{createTime},
        #{updateBy},
        #{updateTime},
        #{path}
    </sql>

    <sql id="insertSelectiveColumn">
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="null!=id">id,</if>
            <if test="null!=signId">sign_id,</if>
            <if test="null!=index">sign_in_resource_index,</if>
            <if test="null!=resourceType">Resource_type,</if>
            <if test="null!=time">time,</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>
            <if test="null!=path">path,</if>
        </trim>
    </sql>

    <sql id="insertSelectiveValue">
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="null!=id">#{id,jdbcType=BIGINT},</if>
            <if test="null!=signId">#{signId,jdbcType=BIGINT},</if>
            <if test="null!=index">#{index,jdbcType=INTEGER},</if>
            <if test="null!=resourceType">#{resourceType,jdbcType=INTEGER},</if>
            <if test="null!=time">#{time,jdbcType=TIMESTAMP},</if>
            <if test="null!=createBy">#{createBy,jdbcType=BIGINT},</if>
            <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">#{updateBy,jdbcType=BIGINT},</if>
            <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=path">#{path,jdbcType=VARCHAR},</if>
        </trim>
    </sql>

    <sql id="updateByPrimaryKeySelectiveSql">
        <set>
            <if test="null!=id">id = #{id,jdbcType=BIGINT},</if>
            <if test="null!=signId">sign_id = #{signId,jdbcType=BIGINT},</if>
            <if test="null!=index">sign_in_resource_index = #{index,jdbcType=INTEGER},</if>
            <if test="null!=resourceType">Resource_type = #{resourceType,jdbcType=INTEGER},</if>
            <if test="null!=time">time = #{time,jdbcType=TIMESTAMP},</if>
            <if test="null!=createBy">create_by = #{createBy,jdbcType=BIGINT},</if>
            <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">update_by = #{updateBy,jdbcType=BIGINT},</if>
            <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=path">path = #{path,jdbcType=VARCHAR},</if>
        </set>
    </sql>

    <sql id="where">
        <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if>
        <if test="null!=signId">AND sign_id = #{signId,jdbcType=BIGINT},</if>
        <if test="null!=index">AND sign_in_resource_index = #{index,jdbcType=INTEGER},</if>
        <if test="null!=resourceType">AND Resource_type = #{resourceType,jdbcType=INTEGER},</if>
        <if test="null!=time">AND time = #{time,jdbcType=TIMESTAMP},</if>
        <if test="null!=createBy">AND create_by = #{createBy,jdbcType=BIGINT},</if>
        <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=BIGINT},</if>
        <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=path">AND path = #{path,jdbcType=VARCHAR},</if>
    </sql>
</mapper>