Sfoglia il codice sorgente

fix 计费单商品

he2802 3 anni fa
parent
commit
f8c7f73029

+ 2 - 3
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -125,7 +125,7 @@
 
     <select id="selectList_COUNT" resultType="Long">
         SELECT
-        count(q.question_id)
+        count(distinct q.question_id)
         FROM
         question q
         LEFT JOIN question_business qb ON q.question_id = qb.major_id and qb.type = 1
@@ -150,7 +150,6 @@
         <if test="prefixName != null and prefixName != ''">
             AND q.prefix_name like concat('%', #{prefixName}, '%')
         </if>
-        GROUP BY
-        q.question_id
+       
     </select>
 </mapper>

+ 2 - 3
zhongzheng-system/src/main/resources/mapper/modules/course/CourseChapterMapper.xml

@@ -151,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectList_COUNT" resultType="Long">
         SELECT
-        count(c.chapter_id )
+        count(distinct c.chapter_id )
         FROM
         course_chapter  c
         LEFT JOIN course_chapter_business ccb ON c.chapter_id = ccb.chapter_id
@@ -181,7 +181,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="prefixName != null and prefixName != ''">
             AND c.prefix_name like concat('%', #{prefixName}, '%')
         </if>
-        GROUP BY
-        c.chapter_id
+       
     </select>
 </mapper>

+ 32 - 2
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -126,11 +126,41 @@
 
     <select id="selectCourseList_COUNT" resultType="Long">
         SELECT
-            c.course_id
+            count(distinct c.section_id )
         FROM
             course c
         WHERE
-        c.status = 1
+        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="educationTypeId != null and educationTypeId != ''">
+            AND c.education_type_id = #{educationTypeId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            AND c.subject_id = #{subjectId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND c.business_id = #{businessId}
+        </if>
+        <if test="prefixName != null and prefixName != ''">
+            AND c.prefix_name like concat('%', #{prefixName}, '%')
+        </if>
+        <if test="courseName != null and courseName != ''">
+            AND c.course_name like concat('%', #{courseName}, '%')
+        </if>
+        <if test="publishStatus != null and publishStatus != ''">
+            AND c.publish_status = #{publishStatus}
+        </if>
+        <if test="schoolId != null and schoolId != ''">
+            AND c.school_id = #{schoolId}
+        </if>
+        <if test="majorId != null and majorId != ''">
+            AND c.major_id = #{majorId}
+        </if>
 
 
     </select>

+ 2 - 3
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionMapper.xml

@@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectSectionList_COUNT" resultType="Long">
         SELECT
-        count(c.section_id )
+        count(distinct c.section_id )
         FROM
         course_section c
         LEFT JOIN course_section_business csb ON c.section_id = csb.section_id
@@ -182,7 +182,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
-        GROUP BY
-        c.section_id
+
     </select>
 </mapper>