|
@@ -0,0 +1,196 @@
|
|
|
+<?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="cn.com.ty.lift.system.mapper.UserAccountMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="cn.com.ty.lift.system.entity.UserAccount" >
|
|
|
+ <id column="user_id" property="userId" jdbcType="BIGINT" />
|
|
|
+ <result column="type" property="type" jdbcType="TINYINT" />
|
|
|
+ <result column="account" property="account" jdbcType="VARCHAR" />
|
|
|
+ <result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
+ <result column="salt" property="salt" jdbcType="VARCHAR" />
|
|
|
+ <result column="mobile" property="mobile" jdbcType="CHAR" />
|
|
|
+ <result column="wechat_open_id" property="wechatOpenId" jdbcType="VARCHAR" />
|
|
|
+ <result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
+ <result column="other_account" property="otherAccount" jdbcType="VARCHAR" />
|
|
|
+ <result column="other_account2" property="otherAccount2" jdbcType="VARCHAR" />
|
|
|
+ <result column="status" property="status" jdbcType="TINYINT" />
|
|
|
+ <result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
|
|
+ <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ user_id, type, account, password, salt, mobile, wechat_open_id, email, other_account,
|
|
|
+ other_account2, status, remarks, create_date
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from user_account
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ delete from user_account
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="cn.com.ty.lift.system.entity.UserAccount" >
|
|
|
+ insert into user_account (user_id, type, account,
|
|
|
+ password, salt, mobile,
|
|
|
+ wechat_open_id, email, other_account,
|
|
|
+ other_account2, status, remarks,
|
|
|
+ create_date)
|
|
|
+ values (#{userId,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{account,jdbcType=VARCHAR},
|
|
|
+ #{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR}, #{mobile,jdbcType=CHAR},
|
|
|
+ #{wechatOpenId,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{otherAccount,jdbcType=VARCHAR},
|
|
|
+ #{otherAccount2,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
|
|
|
+ #{createDate,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertSelective" parameterType="cn.com.ty.lift.system.entity.UserAccount" >
|
|
|
+ insert into user_account
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="userId != null" >
|
|
|
+ user_id,
|
|
|
+ </if>
|
|
|
+ <if test="type != null" >
|
|
|
+ type,
|
|
|
+ </if>
|
|
|
+ <if test="account != null" >
|
|
|
+ account,
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ password,
|
|
|
+ </if>
|
|
|
+ <if test="salt != null" >
|
|
|
+ salt,
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null" >
|
|
|
+ mobile,
|
|
|
+ </if>
|
|
|
+ <if test="wechatOpenId != null" >
|
|
|
+ wechat_open_id,
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ email,
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount != null" >
|
|
|
+ other_account,
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount2 != null" >
|
|
|
+ other_account2,
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null" >
|
|
|
+ remarks,
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null" >
|
|
|
+ create_date,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="userId != null" >
|
|
|
+ #{userId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="type != null" >
|
|
|
+ #{type,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="account != null" >
|
|
|
+ #{account,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="salt != null" >
|
|
|
+ #{salt,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null" >
|
|
|
+ #{mobile,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wechatOpenId != null" >
|
|
|
+ #{wechatOpenId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount != null" >
|
|
|
+ #{otherAccount,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount2 != null" >
|
|
|
+ #{otherAccount2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ #{status,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null" >
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null" >
|
|
|
+ #{createDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.system.entity.UserAccount" >
|
|
|
+ update user_account
|
|
|
+ <set >
|
|
|
+ <if test="type != null" >
|
|
|
+ type = #{type,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="account != null" >
|
|
|
+ account = #{account,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="salt != null" >
|
|
|
+ salt = #{salt,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mobile != null" >
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="wechatOpenId != null" >
|
|
|
+ wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount != null" >
|
|
|
+ other_account = #{otherAccount,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="otherAccount2 != null" >
|
|
|
+ other_account2 = #{otherAccount2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status = #{status,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null" >
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createDate != null" >
|
|
|
+ create_date = #{createDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.system.entity.UserAccount" >
|
|
|
+ update user_account
|
|
|
+ set type = #{type,jdbcType=TINYINT},
|
|
|
+ account = #{account,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ salt = #{salt,jdbcType=VARCHAR},
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
+ wechat_open_id = #{wechatOpenId,jdbcType=VARCHAR},
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ other_account = #{otherAccount,jdbcType=VARCHAR},
|
|
|
+ other_account2 = #{otherAccount2,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=TINYINT},
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ create_date = #{createDate,jdbcType=TIMESTAMP}
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|