he2802 2 年之前
父节点
当前提交
80e21c6335

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderMapper.xml

@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             og.goods_received,
             og.refund_status,
             og.pay_status as goods_pay_status,
-        (select cgu.period_plush from  class_grade_user cgu where cgu.grade_id = og.grade_id and cgu.user_id = o.user_id limit 1 ) period_plush,
+        (select cgu.period_plush from  class_grade_user cgu where cgu.grade_id = og.grade_id and cgu.order_goods = og.order_goods and cgu.user_id = o.user_id limit 1 ) period_plush,
         (SELECT oi.invoice_status FROM order_invoice oi LEFT JOIN order_invoice_order oio ON oio.invoice_id = oi.invoice_id WHERE
         oio.order_goods_id = og.order_goods_id AND oi.period_status != 2 limit 1) invoice_status
         FROM

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -341,7 +341,7 @@
             and c.tenant_id=#{tenantId}
         </if>
         and c.user_id=#{userId} and c.status = 1 and c.goods_id = #{goodsId}) as record_num,
-        (SELECT count(*) from user_study_record usr where usr.user_id = #{userId} and usr.grade_id = #{gradeId} and usr.current_status = 1 and usr.course_id = r.course_id) as study_status,
+        (SELECT count(*) from user_study_record usr where usr.user_id = #{userId} and usr.grade_id = #{gradeId} and usr.order_goods_id = #{orderGoodsId} and usr.current_status = 1 and usr.course_id = r.course_id) as study_status,
         (SELECT IFNULL(SUM(cs.duration_time),0) from (select DISTINCT c.section_id,c.course_id FROM user_study_record c where 1=1
         and c.current_status=1
         <if test="gradeId != null and gradeId !=''">