|
@@ -29,13 +29,12 @@
|
|
|
<result column="id_card_no_" property="idCardNo"/>
|
|
|
<result column="wechat_id_" property="wechatId"/>
|
|
|
<result column="is_super_admin_" property="isSuperAdmin"/>
|
|
|
- <result column="tenant_id_" property="tenantId"/>
|
|
|
+ <!--<result column="tenant_id_" property="tenantId"/>-->
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 查询条件 -->
|
|
|
<sql id="queryCondition">
|
|
|
<where>
|
|
|
- tenant_id_ = #{tenantId}
|
|
|
<if test="userStartDate != null">
|
|
|
AND create_time_ >= #{createStartDate}
|
|
|
</if>
|
|
@@ -55,7 +54,7 @@
|
|
|
|
|
|
<!-- 全查询 -->
|
|
|
<select id="findAll" resultMap="SysUser">
|
|
|
- SELECT * FROM sys_user WHERE tenant_id_ = #{tenantId} ORDER BY id_
|
|
|
+ SELECT * FROM sys_user ORDER BY id_
|
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -63,9 +62,9 @@
|
|
|
keyProperty="id">
|
|
|
INSERT INTO sys_user
|
|
|
(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_,tenant_id_)
|
|
|
+ gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_)
|
|
|
VALUES(#{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
|
|
|
- #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{tenantId})
|
|
|
+ #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -132,9 +131,6 @@
|
|
|
<if test="isSuperAdmin != null">
|
|
|
is_super_admin_ = #{isSuperAdmin},
|
|
|
</if>
|
|
|
- <if test="tenantId != null">
|
|
|
- tenant_id_ = #{tenantId},
|
|
|
- </if>
|
|
|
</set>
|
|
|
WHERE id_ = #{id}
|
|
|
</update>
|
|
@@ -194,5 +190,11 @@
|
|
|
<select id="getTeacherTenantId" resultType="java.lang.Integer">
|
|
|
SELECT t.tenant_id_ FROM teacher t WHERE t.user_id_ = #{userId} LIMIT 1
|
|
|
</select>
|
|
|
+ <select id="getEmployeeOrganId" resultType="java.lang.Integer">
|
|
|
+ SELECT e.organ_id_ FROM employee e WHERE e.user_id_ = #{userId} LIMIT 1
|
|
|
+ </select>
|
|
|
+ <select id="getTeacherOrganId" resultType="java.lang.Integer">
|
|
|
+ SELECT t.organ_id_ FROM teacher t WHERE t.user_id_ = #{userId} LIMIT 1
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|