|
@@ -13,14 +13,18 @@
|
|
<result column="salt_" property="salt"/>
|
|
<result column="salt_" property="salt"/>
|
|
<result column="phone_" property="phone"/>
|
|
<result column="phone_" property="phone"/>
|
|
<result column="avatar_" property="avatar"/>
|
|
<result column="avatar_" property="avatar"/>
|
|
- <result column="dept_id_" property="deptId"/>
|
|
|
|
|
|
+ <result column="organ_id_" property="organId"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="lock_flag_" property="lockFlag"/>
|
|
<result column="lock_flag_" property="lockFlag"/>
|
|
<result column="del_flag_" property="delFlag"/>
|
|
<result column="del_flag_" property="delFlag"/>
|
|
<result column="wx_openid_" property="wxOpenid"/>
|
|
<result column="wx_openid_" property="wxOpenid"/>
|
|
<result column="qq_openid_" property="qqOpenid"/>
|
|
<result column="qq_openid_" property="qqOpenid"/>
|
|
- <result column="user_type_" property="userType"/>
|
|
|
|
|
|
+ <result column="user_type_" property="userType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
|
+ <result column="gender_" property="gender" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
|
+ <result column="nation_" property="nation"/>
|
|
|
|
+ <result column="birthdate_" property="birthdate"/>
|
|
|
|
+ <result column="email_" property="email"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 查询条件 -->
|
|
<!-- 查询条件 -->
|
|
@@ -34,6 +38,9 @@
|
|
<if test="userType != null">
|
|
<if test="userType != null">
|
|
and user_type_ = #{userType}
|
|
and user_type_ = #{userType}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="organId != null">
|
|
|
|
+ and organ_id_ = #{organId}
|
|
|
|
+ </if>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -55,8 +62,8 @@
|
|
</selectKey>
|
|
</selectKey>
|
|
-->
|
|
-->
|
|
INSERT INTO sys_user
|
|
INSERT INTO sys_user
|
|
- (id_,username_,password_,salt_,phone_,avatar_,dept_id_,create_time_,update_time_,lock_flag_,del_flag_,wx_openid_,qq_openid_,user_type_)
|
|
|
|
- VALUES(#{id},#{username},#{password},#{salt},#{phone},#{avatar},#{deptId},#{createTime},#{updateTime},#{lockFlag},#{delFlag},#{wxOpenid},#{qqOpenid},#{userType})
|
|
|
|
|
|
+ (id_,username_,password_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,lock_flag_,del_flag_,wx_openid_,qq_openid_,user_type_,gender_,nation_,birthdate_,email_)
|
|
|
|
+ VALUES(#{id},#{username},#{password},#{salt},#{phone},#{avatar},#{organId},#{createTime},#{updateTime},#{lockFlag},#{delFlag},#{wxOpenid},#{qqOpenid},#{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{gender, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{nation},#{birthdate},#{email})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -76,7 +83,7 @@
|
|
email_ = #{email},
|
|
email_ = #{email},
|
|
</if>
|
|
</if>
|
|
<if test="gender != null">
|
|
<if test="gender != null">
|
|
- gender_ = #{gender},
|
|
|
|
|
|
+ gender_ = #{gender, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
</if>
|
|
</if>
|
|
<if test="password != null">
|
|
<if test="password != null">
|
|
password_ = #{password},
|
|
password_ = #{password},
|
|
@@ -88,7 +95,7 @@
|
|
username_ = #{username},
|
|
username_ = #{username},
|
|
</if>
|
|
</if>
|
|
<if test="userType != null">
|
|
<if test="userType != null">
|
|
- user_type_ = #{userType},
|
|
|
|
|
|
+ user_type_ = #{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
</if>
|
|
</if>
|
|
<if test="updateTime != null">
|
|
<if test="updateTime != null">
|
|
update_time_ = #{updateTime},
|
|
update_time_ = #{updateTime},
|
|
@@ -108,6 +115,9 @@
|
|
<if test="nation != null">
|
|
<if test="nation != null">
|
|
nation_ = #{nation},
|
|
nation_ = #{nation},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="organId != null">
|
|
|
|
+ organ_id_ = #{organId},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
WHERE id_ = #{id}
|
|
WHERE id_ = #{id}
|
|
</update>
|
|
</update>
|