|
@@ -14,7 +14,6 @@
|
|
<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="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"/>
|
|
@@ -30,9 +29,6 @@
|
|
<result column="id_card_no_" property="idCardNo"/>
|
|
<result column="id_card_no_" property="idCardNo"/>
|
|
<result column="wechat_id_" property="wechatId"/>
|
|
<result column="wechat_id_" property="wechatId"/>
|
|
<result column="is_super_admin_" property="isSuperAdmin"/>
|
|
<result column="is_super_admin_" property="isSuperAdmin"/>
|
|
- <result column="current_grade_" property="currentGrade"/>
|
|
|
|
- <result column="current_grade_num_" property="currentGradeNum"/>
|
|
|
|
- <result column="current_class_" property="currentClass"/>
|
|
|
|
<result column="certificate_type_" property="certificateType"/>
|
|
<result column="certificate_type_" property="certificateType"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
@@ -47,15 +43,11 @@
|
|
<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>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<select id="get" resultMap="SysUser">
|
|
<select id="get" resultMap="SysUser">
|
|
- SELECT su.*,s.current_class_,s.current_grade_num_
|
|
|
|
- FROM sys_user su LEFT JOIN student s ON su.id_ = s.user_id_
|
|
|
|
|
|
+ SELECT su.* FROM sys_user su
|
|
WHERE su.id_ = #{id}
|
|
WHERE su.id_ = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -68,22 +60,17 @@
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.auth.api.entity.SysUser" useGeneratedKeys="true" keyColumn="id"
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.auth.api.entity.SysUser" useGeneratedKeys="true" keyColumn="id"
|
|
keyProperty="id">
|
|
keyProperty="id">
|
|
INSERT INTO sys_user
|
|
INSERT INTO sys_user
|
|
- (is_super_admin_,im_token_,id_,username_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,
|
|
|
|
|
|
+ (is_super_admin_,im_token_,id_,username_,salt_,phone_,avatar_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,
|
|
gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_,certificate_type_)
|
|
gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_,certificate_type_)
|
|
- VALUES(#{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},#{organId},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
|
|
|
|
|
|
+ VALUES(#{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
|
|
#{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{certificateType})
|
|
#{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{certificateType})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertTeacher">
|
|
<insert id="insertTeacher">
|
|
INSERT INTO teacher
|
|
INSERT INTO teacher
|
|
- (id_,organ_id_,create_time_,update_time_)VALUES(#{userId},#{lesseeOrganId},NOW(),NOW())
|
|
|
|
- </insert>
|
|
|
|
- <insert id="insertSysTenantAccount">
|
|
|
|
- INSERT INTO sys_tenant_account
|
|
|
|
- (user_id_,available_minutes_,frozen_minutes_,status_,create_time_,update_time_)
|
|
|
|
- VALUES(#{userId},0,0,1,NOW(),NOW())
|
|
|
|
|
|
+ (id_,create_time_,update_time_)VALUES(#{userId},NOW(),NOW())
|
|
</insert>
|
|
</insert>
|
|
<insert id="saveStudent">
|
|
<insert id="saveStudent">
|
|
- INSERT INTO student (user_id_,create_time_,update_time_,service_tag_,operating_tag_) VALUES(#{userId},NOW(),NOW(),0,0)
|
|
|
|
|
|
+ INSERT INTO student (user_id_,create_time_,update_time_) VALUES(#{userId},NOW(),NOW())
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -132,9 +119,6 @@
|
|
<if test="nation != null and nation != ''">
|
|
<if test="nation != null and nation != ''">
|
|
nation_ = #{nation},
|
|
nation_ = #{nation},
|
|
</if>
|
|
</if>
|
|
- <if test="organId != null">
|
|
|
|
- organ_id_ = #{organId},
|
|
|
|
- </if>
|
|
|
|
<if test="imToken != null and imToken != ''">
|
|
<if test="imToken != null and imToken != ''">
|
|
im_token_ = #{imToken},
|
|
im_token_ = #{imToken},
|
|
</if>
|
|
</if>
|