<?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.interfaces.mapper.PtModelLogMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtModelLog">
        <id column="ID" property="id" jdbcType="VARCHAR"/>
        <result column="MID" property="mid" jdbcType="VARCHAR"/>
        <result column="APPID" property="appid" jdbcType="VARCHAR"/>
        <result column="TOKEN" property="token" jdbcType="VARCHAR"/>
        <result column="VISIT_IP" property="visitIp" jdbcType="VARCHAR"/>
        <result column="VISIT_TM" property="visitTm" jdbcType="DATE"/>
        <result column="MESSAGE" property="message" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        ID
        , MID, APPID, TOKEN, VISIT_IP, VISIT_TM,  MESSAGE
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
        select
        <include refid="Base_Column_List"/>
        from PT_MODEL_LOG
        where ID = #{id,jdbcType=VARCHAR}
    </select>

    <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.String">
        select
        <include refid="Base_Column_List"/>
        from PT_MODEL_LOG
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete
        from PT_MODEL_LOG
        where ID = #{id,jdbcType=VARCHAR}
    </delete>
    <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtModelLog">
        insert into PT_MODEL_LOG (ID, MID, APPID,
                                  TOKEN, VISIT_IP, VISIT_TM, MESSAGE)
        values (#{id,jdbcType=VARCHAR}, #{mid,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR},
                #{token,jdbcType=VARCHAR}, #{visitIp,jdbcType=VARCHAR}, #{visitTm,jdbcType=DATE},
                #{message,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.ruoyi.interfaces.domain.PtModelLog">
        insert into PT_MODEL_LOG
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                ID,
            </if>
            <if test="mid != null">
                MID,
            </if>
            <if test="appid != null">
                APPID,
            </if>
            <if test="token != null">
                TOKEN,
            </if>
            <if test="visitIp != null">
                VISIT_IP,
            </if>
            <if test="visitTm != null">
                VISIT_TM,
            </if>
            <if test="message != null">
                MESSAGE,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=VARCHAR},
            </if>
            <if test="mid != null">
                #{mid,jdbcType=VARCHAR},
            </if>
            <if test="appid != null">
                #{appid,jdbcType=VARCHAR},
            </if>
            <if test="token != null">
                #{token,jdbcType=VARCHAR},
            </if>
            <if test="visitIp != null">
                #{visitIp,jdbcType=VARCHAR},
            </if>
            <if test="visitTm != null">
                #{visitTm,jdbcType=DATE},
            </if>
            <if test="message != null">
                #{message,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtModelLog">
        update PT_MODEL_LOG
        <set>
            <if test="mid != null">
                MID = #{mid,jdbcType=VARCHAR},
            </if>
            <if test="appid != null">
                APPID = #{appid,jdbcType=VARCHAR},
            </if>
            <if test="token != null">
                TOKEN = #{token,jdbcType=VARCHAR},
            </if>
            <if test="visitIp != null">
                #{visitIp,jdbcType=VARCHAR},
            </if>
            <if test="visitTm != null">
                #{visitTm,jdbcType=DATE},
            </if>
            <if test="message != null">
                MESSAGE = #{message,jdbcType=VARCHAR},
            </if>
        </set>
        where ID = #{id,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtModelLog">
        update PT_MODEL_LOG
        set MID      = #{mid,jdbcType=VARCHAR},
            APPID    = #{appid,jdbcType=VARCHAR},
            TOKEN    = #{token,jdbcType=VARCHAR},
            VISIT_IP = #{visitIp,jdbcType=VARCHAR},
            VISIT_TM = #{visitTm,jdbcType=DATE},
            MESSAGE  = #{message,jdbcType=VARCHAR}
        where ID = #{id,jdbcType=VARCHAR}
    </update>
</mapper>
