| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?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.tuoren.forward.mapper.RegistLogMapper">
- <resultMap id="BaseResultMap" type="com.tuoren.forward.entity.RegistLog">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="mac" jdbcType="VARCHAR" property="mac" />
- <result column="param" jdbcType="VARCHAR" property="param" />
- <result column="result" jdbcType="VARCHAR" property="result" />
- <result column="status" jdbcType="CHAR" property="status" />
- <result column="waste" jdbcType="VARCHAR" property="waste" />
- <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
- </resultMap>
- <sql id="Base_Column_List">
- id, mac, param, result, status, waste, createtime
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from regist_log
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from regist_log
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.tuoren.forward.entity.RegistLog">
- insert into regist_log (id, mac, param,
- result, status, waste,
- createtime)
- values (#{id,jdbcType=VARCHAR}, #{mac,jdbcType=VARCHAR}, #{param,jdbcType=VARCHAR},
- #{result,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{waste,jdbcType=VARCHAR},
- #{createtime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.tuoren.forward.entity.RegistLog">
- insert into regist_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="mac != null">
- mac,
- </if>
- <if test="param != null">
- param,
- </if>
- <if test="result != null">
- result,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="waste != null">
- waste,
- </if>
- <if test="createtime != null">
- createtime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="mac != null">
- #{mac,jdbcType=VARCHAR},
- </if>
- <if test="param != null">
- #{param,jdbcType=VARCHAR},
- </if>
- <if test="result != null">
- #{result,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=CHAR},
- </if>
- <if test="waste != null">
- #{waste,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- #{createtime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.tuoren.forward.entity.RegistLog">
- update regist_log
- <set>
- <if test="mac != null">
- mac = #{mac,jdbcType=VARCHAR},
- </if>
- <if test="param != null">
- param = #{param,jdbcType=VARCHAR},
- </if>
- <if test="result != null">
- result = #{result,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=CHAR},
- </if>
- <if test="waste != null">
- waste = #{waste,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- createtime = #{createtime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.tuoren.forward.entity.RegistLog">
- update regist_log
- set mac = #{mac,jdbcType=VARCHAR},
- param = #{param,jdbcType=VARCHAR},
- result = #{result,jdbcType=VARCHAR},
- status = #{status,jdbcType=CHAR},
- waste = #{waste,jdbcType=VARCHAR},
- createtime = #{createtime,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="QueryCondition" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from regist_log
- <where>
- <if test="mac != null">
- and mac = #{mac,jdbcType=VARCHAR}
- </if>
- <if test="status != null">
- and status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="createtime != null">
- and createtime = #{createtime,jdbcType=VARCHAR}
- </if>
- </where>
- <if test="sort != null and sort != ''">
- ORDER BY ${sort}
- <if test="order !=null "> ${order} </if>
- </if>
- </select>
- </mapper>
|