|
@@ -130,6 +130,7 @@
|
|
|
<result property="sectionNum" column="section_num"/>
|
|
|
<result property="fileNum" column="file_num"/>
|
|
|
<result property="subjectNames" column="subject_names"/>
|
|
|
+ <result property="goodsStatus" column="goods_status"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.zhongzheng.modules.user.vo.ExamSonStudyRecordVo" id="ExamSonStudyRecordVoResult">
|
|
@@ -737,6 +738,7 @@
|
|
|
g.goods_name,
|
|
|
g.`year`,
|
|
|
g.`code`,
|
|
|
+ g.`status` as goods_status,
|
|
|
g.class_hours,
|
|
|
g.study_start_time,
|
|
|
g.study_end_time,
|
|
@@ -757,9 +759,9 @@
|
|
|
JOIN question_module_chapter a on e.major_id = a.module_exam_id LEFT JOIN question_chapter_exam h on
|
|
|
a.chapter_exam_id = h.chapter_exam_id where e.goods_id = g.goods_id and e.type=1) FROM goods_attached a where
|
|
|
a.goods_id=g.goods_id and a.type = 3) as exam_num,
|
|
|
- (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
|
|
|
+ (SELECT create_time FROM user_exam_record r where r.order_goods_id=s.order_goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
|
|
|
create_time ASC LIMIT 1) as start_time,
|
|
|
- (SELECT create_time FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
|
|
|
+ (SELECT update_time FROM user_exam_record r where r.order_goods_id=s.order_goods_id AND r.do_mode = 1 AND r.user_id = #{userId} ORDER BY
|
|
|
create_time DESC LIMIT 1) as end_time,
|
|
|
(SELECT COUNT(DISTINCT exam_id) FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId})
|
|
|
as stu_all_num
|
|
@@ -787,6 +789,12 @@
|
|
|
<if test="goodsStatus != null and goodsStatus != '' ">
|
|
|
and g.`status` = #{goodsStatus}
|
|
|
</if>
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND g.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="studyStartTime != null and studyStartTime != '' ">
|
|
|
and (SELECT count(*) FROM user_exam_record r where r.goods_id=g.goods_id AND r.do_mode = 1 AND r.user_id = #{userId} AND r.create_time >= #{studyStartTime} )>0
|
|
|
</if>
|