|
|
@@ -0,0 +1,570 @@
|
|
|
+<?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.zheng.cms.mapper.UserMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.zheng.cms.model.User">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="username" jdbcType="VARCHAR" property="username" />
|
|
|
+ <result column="password" jdbcType="VARCHAR" property="password" />
|
|
|
+ <result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
|
+ <result column="sex" jdbcType="INTEGER" property="sex" />
|
|
|
+ <result column="ctime" jdbcType="BIGINT" property="ctime" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.model.User">
|
|
|
+ <result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, username, password, nickname, sex, ctime
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ content
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.model.UserExample" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByExample" parameterType="com.zheng.cms.model.UserExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.zheng.cms.model.UserExample">
|
|
|
+ delete from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.zheng.cms.model.User">
|
|
|
+ insert into user (id, username, password,
|
|
|
+ nickname, sex, ctime,
|
|
|
+ content)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
+ #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, #{ctime,jdbcType=BIGINT},
|
|
|
+ #{content,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.zheng.cms.model.User">
|
|
|
+ insert into user
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ username,
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ password,
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ nickname,
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex,
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ ctime,
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ #{nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ #{ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.zheng.cms.model.UserExample" resultType="java.lang.Integer">
|
|
|
+ select count(*) from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update user
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.username != null">
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.password != null">
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.nickname != null">
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.sex != null">
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.ctime != null">
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="record.content != null">
|
|
|
+ content = #{record.content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
+ update user
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT},
|
|
|
+ content = #{record.content,jdbcType=LONGVARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update user
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ <set>
|
|
|
+ <if test="username != null">
|
|
|
+ username = #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ set username = #{username,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT},
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ set username = #{username,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <resultMap id="BaseResultMap" type="com.zheng.cms.model.User">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="username" jdbcType="VARCHAR" property="username" />
|
|
|
+ <result column="password" jdbcType="VARCHAR" property="password" />
|
|
|
+ <result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
|
+ <result column="sex" jdbcType="INTEGER" property="sex" />
|
|
|
+ <result column="ctime" jdbcType="BIGINT" property="ctime" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.cms.model.User">
|
|
|
+ <result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, username, password, nickname, sex, ctime
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ content
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExampleWithBLOBs" parameterType="com.zheng.cms.model.UserExample" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByExample" parameterType="com.zheng.cms.model.UserExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.zheng.cms.model.UserExample">
|
|
|
+ delete from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.zheng.cms.model.User">
|
|
|
+ insert into user (id, username, password,
|
|
|
+ nickname, sex, ctime,
|
|
|
+ content)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
+ #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, #{ctime,jdbcType=BIGINT},
|
|
|
+ #{content,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.zheng.cms.model.User">
|
|
|
+ insert into user
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ username,
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ password,
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ nickname,
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex,
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ ctime,
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ #{nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ #{ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.zheng.cms.model.UserExample" resultType="java.lang.Integer">
|
|
|
+ select count(*) from user
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update user
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.username != null">
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.password != null">
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.nickname != null">
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.sex != null">
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.ctime != null">
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="record.content != null">
|
|
|
+ content = #{record.content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
+ update user
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT},
|
|
|
+ content = #{record.content,jdbcType=LONGVARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update user
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ username = #{record.username,jdbcType=VARCHAR},
|
|
|
+ password = #{record.password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{record.sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{record.ctime,jdbcType=BIGINT}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ <set>
|
|
|
+ <if test="username != null">
|
|
|
+ username = #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null">
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ctime != null">
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ set username = #{username,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT},
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.zheng.cms.model.User">
|
|
|
+ update user
|
|
|
+ set username = #{username,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ ctime = #{ctime,jdbcType=BIGINT}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|