|
@@ -122,4 +122,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND c.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectList_COUNT" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ count( DISTINCT c.chapter_id )
|
|
|
+ FROM
|
|
|
+ course_chapter c
|
|
|
+ LEFT JOIN course_chapter_business ccb ON c.chapter_id = ccb.chapter_id
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND c.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null and publishStatus != ''">
|
|
|
+ AND c.publish_status = #{publishStatus}
|
|
|
+ </if>
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
+ AND ccb.education_type_id = #{educationTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null and subjectId != ''">
|
|
|
+ AND ccb.subject_id = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ AND ccb.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND c.name like concat('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="prefixName != null and prefixName != ''">
|
|
|
+ AND c.prefix_name like concat('%', #{prefixName}, '%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|