|
@@ -14,7 +14,21 @@
|
|
|
<result column="group_type_" property="groupType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="searchGroupsCondition">
|
|
|
+ <sql id="searchMusicGroupsCondition">
|
|
|
+ <where>
|
|
|
+ <if test="search!=null">
|
|
|
+ AND g.id_ = #{search} OR g.name_ LIKE CONCAT( '%', #{search}, '%' )
|
|
|
+ </if>
|
|
|
+ <if test="organIdList!=null">
|
|
|
+ AND FIND_IN_SET(g.organ_id_,#{organIdList})
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupStatus!=null">
|
|
|
+ AND g.status_=#{musicGroupStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="searchVipGroupsCondition">
|
|
|
<where>
|
|
|
<if test="search!=null">
|
|
|
AND g.id_ = #{search} OR g.name_ LIKE CONCAT( '%', #{search}, '%' )
|
|
@@ -29,12 +43,12 @@
|
|
|
( SELECT o.id_ organ_id_,o.name_ organ_name_,g.id_, g.name_ group_name_, 'MUSIC' group_type_
|
|
|
FROM music_group g
|
|
|
LEFT JOIN organization o ON g.organ_id_ = o.id_
|
|
|
- <include refid="searchGroupsCondition"/> )
|
|
|
+ <include refid="searchMusicGroupsCondition"/> )
|
|
|
UNION
|
|
|
( SELECT o.id_ organ_id_,o.name_ organ_name_,g.id_, g.name_ group_name_, 'VIP' group_type_
|
|
|
FROM vip_group g
|
|
|
LEFT JOIN organization o ON g.organ_id_ = o.id_
|
|
|
- <include refid="searchGroupsCondition"/> );
|
|
|
+ <include refid="searchVipGroupsCondition"/> );
|
|
|
</select>
|
|
|
<select id="findByGroupIds" resultMap="Group">
|
|
|
( SELECT o.id_ organ_id_,o.name_ organ_name_,g.id_, g.name_ group_name_, 'MUSIC' group_type_
|