Parcourir la source

1.学生小组只展示当前机构的小组信息

yuanliang il y a 1 an
Parent
commit
b0d4c90c1b

+ 6 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserTenantBindRecordMapper.xml

@@ -36,10 +36,16 @@
         <if test="param.userType == 'TEACHER'">
             LEFT JOIN teacher tc on t.user_id_ = tc.user_id_
             LEFT JOIN tenant_group tg on t.user_id_ = tg.admin_id_
+            <if test="param.tenantId != null">
+                and tg.tenant_id_ = #{param.tenantId}
+            </if>
         </if>
         <if test="param.userType == 'STUDENT'">
             LEFT JOIN student st on t.user_id_ = st.user_id_
             LEFT JOIN tenant_group tg on st.tenant_group_id_ = tg.id_
+            <if test="param.tenantId != null">
+                and tg.tenant_id_ = #{param.tenantId}
+            </if>
         </if>
         <where>
             <if test="param.keyword != null and param.keyword.trim() != ''">