Browse Source

管乐迷优化需求

zouxuan 1 year ago
parent
commit
b6a0cd33b8

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -1308,6 +1308,7 @@
         <result property="id" column="class_group_id_"/>
         <result property="id" column="class_group_id_"/>
         <collection property="members" ofType="com.ym.mec.common.entity.ImGroupMember">
         <collection property="members" ofType="com.ym.mec.common.entity.ImGroupMember">
             <result property="id" column="user_id_"/>
             <result property="id" column="user_id_"/>
+            <result property="groupId" column="class_group_id_"/>
         </collection>
         </collection>
     </resultMap>
     </resultMap>
 
 

+ 14 - 4
mec-biz/src/main/resources/config/mybatis/ImGroupMapper.xml

@@ -325,13 +325,23 @@
 		limit #{result},#{size}
 		limit #{result},#{size}
 
 
 	</select>
 	</select>
-    <select id="queryUserGroupList" resultMap="com.ym.mec.biz.dal.dao.ClassGroupDao.ImGroupModelMap">
-		select ig.id_,ig.name_,#{transferUserId} user_id_,igm.role_type_ user_role_ from im_group ig
+
+	<resultMap id="imGroupModel" type="com.ym.mec.common.entity.ImGroupModel">
+		<result column="group_id_" property="id"/>
+		<result column="group_name_" property="name"/>
+		<result column="group_name_" property="groupName"/>
+		<result column="user_role_" property="userRole"/>
+		<collection property="memberList" ofType="com.ym.mec.common.entity.ImGroupMember">
+			<result property="id" column="user_id_"/>
+		</collection>
+	</resultMap>
+    <select id="queryUserGroupList" resultMap="imGroupModel">
+		select ig.id_ group_id_,ig.name_ group_name_,#{transferUserId} user_id_,igm.role_type_ user_role_ from im_group ig
 		left join im_group_member igm ON igm.im_group_id_ = ig.id_
 		left join im_group_member igm ON igm.im_group_id_ = ig.id_
-		left join school sl ON sl.id_ = ig.school_id_
+		left join cooperation_organ co ON co.id_ = ig.school_id_
 		where ig.group_type_ = 'SCHOOL' and igm.role_type_ = #{roleType} and igm.user_id_ = #{userId}
 		where ig.group_type_ = 'SCHOOL' and igm.role_type_ = #{roleType} and igm.user_id_ = #{userId}
 		<if test="organId != null">
 		<if test="organId != null">
-			and sl.organ_id_ = #{organId}
+			and co.organ_id_ = #{organId}
 		</if>
 		</if>
 	</select>
 	</select>