|
@@ -22,176 +22,6 @@
|
|
|
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.user.dao.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.user.dao.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.user.dao.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.user.dao.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>
|
|
|
|
|
|
<!--通过账户对象,多维度查询用户账户信息 -->
|
|
|
<select id="getByUserAccount" parameterType="cn.com.ty.lift.system.user.dao.entity.UserAccount" resultType="cn.com.ty.lift.system.user.dao.entity.UserAccount">
|
|
@@ -199,6 +29,9 @@
|
|
|
<include refid="Base_Column_List" />
|
|
|
from user_account
|
|
|
where 1 = 1
|
|
|
+ <if test="userId != null">
|
|
|
+ and <![CDATA[ user_id <> #{userId, jdbcType=BIGINT} ]]>
|
|
|
+ </if>
|
|
|
<if test="mobile != null">
|
|
|
and mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
</if>
|