|
@@ -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>
|
|
|
|
|