فهرست منبع

Merge remote-tracking branch 'origin/master'

Joburgess 5 سال پیش
والد
کامیت
a29b4f8a44
1فایلهای تغییر یافته به همراه14 افزوده شده و 1 حذف شده
  1. 14 1
      mec-biz/src/main/resources/config/mybatis/GroupMapper.xml

+ 14 - 1
mec-biz/src/main/resources/config/mybatis/GroupMapper.xml

@@ -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}
+            </if>
+        </foreach>
+        )
     </select>
 
 </mapper>