Kaynağa Gözat

fix 做题历史

he2802 3 yıl önce
ebeveyn
işleme
e1b1cbf245

+ 4 - 4
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsAttachedMapper.xml

@@ -257,21 +257,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 									   user_exam_record
 								   WHERE
 									   user_id = #{userId}
-									 AND goods_id = #{goodsId}
+									 AND order_goods_id = #{orderGoodsId}
 								   GROUP BY
 									   exam_id)) uer on uer.exam_id = e.exam_id
 		WHERE
 			ga.goods_id = #{goodsId}
 		  AND ((
 					   ga.type = 3
-					   AND ga.major_id IN ( SELECT exam_id FROM user_exam_record WHERE user_id = #{userId} AND goods_id = #{goodsId} AND module_exam_id = 0 AND chapter_exam_id = 0 GROUP BY exam_id )
+					   AND ga.major_id IN ( SELECT exam_id FROM user_exam_record WHERE user_id = #{userId} AND order_goods_id = #{orderGoodsId} AND module_exam_id = 0 AND chapter_exam_id = 0 GROUP BY exam_id )
 					   AND e.STATUS = 1
 				   )
 			OR (
 					   ga.type = 2
-					   AND ga.major_id IN ( SELECT chapter_exam_id FROM user_exam_record WHERE user_id = #{userId} AND goods_id = #{goodsId} AND module_exam_id = 0 AND chapter_exam_id > 0 GROUP BY chapter_exam_id ))
+					   AND ga.major_id IN ( SELECT chapter_exam_id FROM user_exam_record WHERE user_id = #{userId} AND order_goods_id = #{orderGoodsId} AND module_exam_id = 0 AND chapter_exam_id > 0 GROUP BY chapter_exam_id ))
 			OR (
 					   ga.type = 1
-					   AND ga.major_id IN ( SELECT module_exam_id FROM user_exam_record WHERE user_id = #{userId} AND goods_id = #{goodsId} AND module_exam_id > 0 GROUP BY module_exam_id )))
+					   AND ga.major_id IN ( SELECT module_exam_id FROM user_exam_record WHERE user_id = #{userId} AND order_goods_id = #{orderGoodsId} AND module_exam_id > 0 GROUP BY module_exam_id )))
 	</select>
 </mapper>