You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
385 lines
14 KiB
385 lines
14 KiB
<?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.ccsens.tall.persist.mapper.SysUserMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysUser">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="grade_id" jdbcType="BIGINT" property="gradeId" />
|
|
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" />
|
|
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
<result column="gender" jdbcType="TINYINT" property="gender" />
|
|
<result column="country" jdbcType="VARCHAR" property="country" />
|
|
<result column="province" jdbcType="VARCHAR" property="province" />
|
|
<result column="city" jdbcType="VARCHAR" property="city" />
|
|
<result column="language" jdbcType="VARCHAR" property="language" />
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
<result column="wechat" jdbcType="VARCHAR" property="wechat" />
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
<result column="balance" jdbcType="BIGINT" property="balance" />
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
|
|
</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, grade_id, avatar_url, nickname, gender, country, province, city, language, phone,
|
|
wechat, email, balance, created_at, updated_at, rec_status
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysUserExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_sys_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.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from t_sys_user
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_sys_user
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysUserExample">
|
|
delete from t_sys_user
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysUser">
|
|
insert into t_sys_user (id, grade_id, avatar_url,
|
|
nickname, gender, country,
|
|
province, city, language,
|
|
phone, wechat, email,
|
|
balance, created_at, updated_at,
|
|
rec_status)
|
|
values (#{id,jdbcType=BIGINT}, #{gradeId,jdbcType=BIGINT}, #{avatarUrl,jdbcType=VARCHAR},
|
|
#{nickname,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{country,jdbcType=VARCHAR},
|
|
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{language,jdbcType=VARCHAR},
|
|
#{phone,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
|
|
#{balance,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
#{recStatus,jdbcType=TINYINT})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysUser">
|
|
insert into t_sys_user
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="gradeId != null">
|
|
grade_id,
|
|
</if>
|
|
<if test="avatarUrl != null">
|
|
avatar_url,
|
|
</if>
|
|
<if test="nickname != null">
|
|
nickname,
|
|
</if>
|
|
<if test="gender != null">
|
|
gender,
|
|
</if>
|
|
<if test="country != null">
|
|
country,
|
|
</if>
|
|
<if test="province != null">
|
|
province,
|
|
</if>
|
|
<if test="city != null">
|
|
city,
|
|
</if>
|
|
<if test="language != null">
|
|
language,
|
|
</if>
|
|
<if test="phone != null">
|
|
phone,
|
|
</if>
|
|
<if test="wechat != null">
|
|
wechat,
|
|
</if>
|
|
<if test="email != null">
|
|
email,
|
|
</if>
|
|
<if test="balance != null">
|
|
balance,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="gradeId != null">
|
|
#{gradeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="avatarUrl != null">
|
|
#{avatarUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="nickname != null">
|
|
#{nickname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gender != null">
|
|
#{gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="country != null">
|
|
#{country,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="province != null">
|
|
#{province,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="city != null">
|
|
#{city,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="language != null">
|
|
#{language,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null">
|
|
#{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="wechat != null">
|
|
#{wechat,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="email != null">
|
|
#{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="balance != null">
|
|
#{balance,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
#{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
#{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
#{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysUserExample" resultType="java.lang.Long">
|
|
select count(*) from t_sys_user
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_sys_user
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.gradeId != null">
|
|
grade_id = #{record.gradeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.avatarUrl != null">
|
|
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.nickname != null">
|
|
nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.gender != null">
|
|
gender = #{record.gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.country != null">
|
|
country = #{record.country,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.province != null">
|
|
province = #{record.province,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.city != null">
|
|
city = #{record.city,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.language != null">
|
|
language = #{record.language,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.phone != null">
|
|
phone = #{record.phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.wechat != null">
|
|
wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.email != null">
|
|
email = #{record.email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.balance != null">
|
|
balance = #{record.balance,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.createdAt != null">
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updatedAt != null">
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.recStatus != null">
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_sys_user
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
grade_id = #{record.gradeId,jdbcType=BIGINT},
|
|
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
|
|
nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
gender = #{record.gender,jdbcType=TINYINT},
|
|
country = #{record.country,jdbcType=VARCHAR},
|
|
province = #{record.province,jdbcType=VARCHAR},
|
|
city = #{record.city,jdbcType=VARCHAR},
|
|
language = #{record.language,jdbcType=VARCHAR},
|
|
phone = #{record.phone,jdbcType=VARCHAR},
|
|
wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
email = #{record.email,jdbcType=VARCHAR},
|
|
balance = #{record.balance,jdbcType=BIGINT},
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysUser">
|
|
update t_sys_user
|
|
<set>
|
|
<if test="gradeId != null">
|
|
grade_id = #{gradeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="avatarUrl != null">
|
|
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="nickname != null">
|
|
nickname = #{nickname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gender != null">
|
|
gender = #{gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="country != null">
|
|
country = #{country,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="province != null">
|
|
province = #{province,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="city != null">
|
|
city = #{city,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="language != null">
|
|
language = #{language,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null">
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="wechat != null">
|
|
wechat = #{wechat,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="email != null">
|
|
email = #{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="balance != null">
|
|
balance = #{balance,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysUser">
|
|
update t_sys_user
|
|
set grade_id = #{gradeId,jdbcType=BIGINT},
|
|
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
|
|
nickname = #{nickname,jdbcType=VARCHAR},
|
|
gender = #{gender,jdbcType=TINYINT},
|
|
country = #{country,jdbcType=VARCHAR},
|
|
province = #{province,jdbcType=VARCHAR},
|
|
city = #{city,jdbcType=VARCHAR},
|
|
language = #{language,jdbcType=VARCHAR},
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
wechat = #{wechat,jdbcType=VARCHAR},
|
|
email = #{email,jdbcType=VARCHAR},
|
|
balance = #{balance,jdbcType=BIGINT},
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{recStatus,jdbcType=TINYINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|