@@ -79,7 +79,20 @@
#{group}
</if>
</foreach>
- );
+ )
+ UNION
+ ( SELECT o.id_ organ_id_,o.name_ organ_name_,g.id_, g.name_ group_name_, 'PRACTICE' group_type_
+ FROM practice_group g LEFT JOIN organization o ON g.organ_id_ = o.id_
+ WHERE g.id_ IN
+ <foreach collection="groups" item="group" open="(" close=")" separator=",">
+ <if test="group != null and group.groupType == @com.ym.mec.biz.dal.enums.GroupType@PRACTICE">
+ #{group.id}
+ </if>
+ <if test="group == null">
+ #{group}
+ </foreach>
</select>
</mapper>