he2802 2 سال پیش
والد
کامیت
e1571d1201
1فایلهای تغییر یافته به همراه12 افزوده شده و 1 حذف شده
  1. 12 1
      zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

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

@@ -430,7 +430,9 @@
         <if test="gradeId != null and gradeId !='' ">
             and cgu.grade_id = #{gradeId}
         </if>
-
+        <if test="orderGoodsId != null and orderGoodsId != ''">
+            AND cgu.order_goods_id = #{orderGoodsId}
+        </if>
         LIMIT 1
     </select>
 
@@ -471,6 +473,9 @@
         <if test="gradeId != null and gradeId !=''">
             AND grade_id = #{gradeId}
         </if>
+        <if test="orderGoodsId != null and orderGoodsId != ''">
+            AND order_goods_id = #{orderGoodsId}
+        </if>
         AND course_id = #{courseId} ORDER BY record_id DESC LIMIT 9999 ) usr
         GROUP BY
         usr.section_id) usr1 on m.menu_id = usr1.section_id
@@ -514,6 +519,9 @@
         <if test="gradeId != null and gradeId !=''">
             AND grade_id = #{gradeId}
         </if>
+        <if test="orderGoodsId != null and orderGoodsId != ''">
+            AND order_goods_id = #{orderGoodsId}
+        </if>
         AND module_id = 0
         AND course_id = #{courseId} ORDER BY record_id DESC LIMIT 9999 ) usr
         GROUP BY
@@ -955,6 +963,9 @@
                 AND up.goods_id = 0
             </otherwise>
         </choose>
+        <if test="orderGoodsId != null and orderGoodsId != ''">
+            AND (up.order_goods_id = #{orderGoodsId} or up.order_goods_id is null)
+        </if>
         AND up.user_id = #{userId}
         AND ups.period_status = 1
         AND ups.`status` =2