he2802 2 年之前
父節點
當前提交
eb7a2f17ef
共有 1 個文件被更改,包括 18 次插入1 次删除
  1. 18 1
      zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

+ 18 - 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
@@ -561,6 +569,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,usr.module_id,
@@ -955,6 +966,9 @@
                 AND up.goods_id = 0
             </otherwise>
         </choose>
+        <if test="orderGoodsId != null and orderGoodsId != '' ">
+            AND up.order_goods_id =  #{orderGoodsId}
+        </if>
         AND up.user_id = #{userId}
         AND ups.period_status = 1
         AND ups.`status` =2
@@ -1105,6 +1119,9 @@
                 AND usr.goods_id = 0
             </otherwise>
         </choose>
+        <if test="orderGoodsId != null and orderGoodsId != '' ">
+            AND usr.order_goods_id =  #{orderGoodsId}
+        </if>
         AND usr.plan_id =#{planId}
     </select>