yangdamao 1 年之前
父節點
當前提交
1921597a7f

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseModuleChapterVo.java

@@ -66,4 +66,6 @@ public class CourseModuleChapterVo {
 			"" +
 			"")
 	private Integer sectionNum;
+	@ApiModelProperty("视频标签:1保利威 2腾讯")
+	private Long viewSign;
 }

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseModuleChapterMapper.xml

@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="status" column="status"/>
         <result property="publishStatus" column="publish_status"/>
         <result property="sectionNum" column="section_num"/>
+        <result property="viewSign" column="view_sign"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.course.vo.CourseUserModuleChapterVo" id="CourseUserModuleChapterVo">

+ 28 - 10
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -119,7 +119,7 @@
             AND vto.invoice_status = #{invoiceStatus}
         </if>
         <if test="orderOrg != null and orderOrg != ''">
-            AND vto.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
+            AND vto.order_org  = #{orderOrg}
         </if>
         <if test="purchaseOrg != null and purchaseOrg != ''">
             AND vto.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
@@ -167,9 +167,16 @@
         </if>
         <if test="studentCheckStatus != null">
             AND (vto.order_from != 1
-                AND (SELECT COUNT(too.order_sn)
-                FROM top_old_order_goods too
-                WHERE vto.order_sn = too.order_sn AND too.rel_sign_id IS NOT NULL AND too.check_status = #{studentCheckStatus}) > 0)
+            AND (
+            SELECT
+            too.check_status
+            FROM
+            top_old_order_goods too
+            WHERE
+            vto.order_sn = too.order_sn
+            AND too.rel_sign_id IS NOT NULL
+            ORDER BY too.order_goods_id DESC
+            LIMIT 1 ) = #{studentCheckStatus}
         </if>
         <if test="orderSnList != null and orderSnList.size()!=0 ">
             AND vto.order_sn in
@@ -224,7 +231,7 @@
             </foreach>
         </if>
         <if test="orderOrg != null and orderOrg != ''">
-            AND ot.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
+            AND ot.order_org = #{orderOrg}
         </if>
         <if test="purchaseOrg != null and purchaseOrg != ''">
             AND ot.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
@@ -266,9 +273,17 @@
             AND ot.finish_status = #{finishStatus}
         </if>
         <if test="studentCheckStatus != null">
-            AND (SELECT COUNT(too.order_sn)
-            FROM top_old_order_goods too
-            WHERE ot.order_sn = too.order_sn AND too.rel_sign_id IS NOT NULL AND too.check_status = #{studentCheckStatus}) > 0
+            AND (vto.order_from != 1
+            AND (
+            SELECT
+            too.check_status
+            FROM
+            top_old_order_goods too
+            WHERE
+            vto.order_sn = too.order_sn
+            AND too.rel_sign_id IS NOT NULL
+            ORDER BY too.order_goods_id DESC
+            LIMIT 1 ) = #{studentCheckStatus}
         </if>
         <if test="refundStartTime != null or refundEndTime != null">
             AND (SELECT COUNT(*)
@@ -357,8 +372,11 @@
                 #{item}
             </foreach>
         </if>
-        <if test="orderOrg != null and orderOrg != ''">
-            AND 'C端云学堂' LIKE CONCAT( '%', #{orderOrg}, '%' )
+        <if test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线上'">
+            AND o.input_order_sn IS NULL
+        </if>
+        <if test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线下'">
+            AND o.input_order_sn IS NOT NULL
         </if>
         <if test="checkStartTime != null and checkStartTime != ''">
             AND o.pay_time <![CDATA[ >= ]]> #{checkStartTime}