|
@@ -920,14 +920,48 @@
|
|
|
where id_=1
|
|
|
</update>
|
|
|
|
|
|
- <resultMap id="SuperClassGroupInfo" type="com.ym.mec.biz.dal.dto.SuperClassGroupDto">
|
|
|
+ <resultMap id="SuperClassGroupInfo" type="com.ym.mec.biz.dal.dto.SuperClassGroupDto" extends="ClassGroup">
|
|
|
|
|
|
</resultMap>
|
|
|
- <select id="superFindClassGroups" resultMap="SuperClassGroupInfo">
|
|
|
|
|
|
+ <sql id="superFindClassGroupsCondition">
|
|
|
+ <where>
|
|
|
+ <if test="search != null">
|
|
|
+ AND (cg.name_ LIKE CONCAT('%',#{search},'%') OR cg.id_ = #{search}
|
|
|
+ <if test="groups != null">
|
|
|
+ OR cg.music_group_id_ IN
|
|
|
+ <foreach collection="groups" item="group" open="(" close=")" separator=",">
|
|
|
+ #{group.id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="groupType != null">
|
|
|
+ AND cg.group_type_=#{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ </if>
|
|
|
+ <if test="groupId != null">
|
|
|
+ AND cg.music_group_id_=#{groupId}
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ AND cg.id_=#{classGroupId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <select id="superFindClassGroups" resultMap="SuperClassGroupInfo">
|
|
|
+ SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ class_group cg
|
|
|
+ <include refid="superFindClassGroupsCondition"/>
|
|
|
+ ORDER BY cg.create_time_ DESC
|
|
|
+ <include refid="global.limit"/>
|
|
|
</select>
|
|
|
<select id="superCountClassGroups" resultType="int">
|
|
|
-
|
|
|
+ SELECT
|
|
|
+ COUNT(id_)
|
|
|
+ FROM
|
|
|
+ class_group cg
|
|
|
+ <include refid="superFindClassGroupsCondition"/>
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|