浏览代码

fix 学习记录

he2802 3 年之前
父节点
当前提交
d6af3623d4

+ 9 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/UserPeriodExportVo.java

@@ -22,24 +22,32 @@ public class UserPeriodExportVo {
 	private static final long serialVersionUID = 1L;
 
 	@Excel(name = "序号")
+	@ApiModelProperty("序号")
 	private Long id;
 
 	@Excel(name = "模块标题")
+	@ApiModelProperty("模块标题")
 	private String moduleName;
-	@Excel(name = "章ID")
+	@Excel(name = "章标题")
 	@ApiModelProperty("章标题")
 	private String chapterName;
 	@Excel(name = "节标题")
+	@ApiModelProperty("节标题")
 	private String sectionName;
 	@Excel(name = "节时长(秒)")
+	@ApiModelProperty("节时长(秒)")
 	private Long durationTime;
 	@Excel(name = "学习/做题时间")
+	@ApiModelProperty("学习/做题时间")
 	private String studyTimeTxt;
 	@Excel(name = "学习/做题时长")
+	@ApiModelProperty("学习/做题时长")
 	private String studyTimeLongTxt;
 	@Excel(name = "学习/做题状态")
+	@ApiModelProperty("学习/做题状态")
 	private String studyStatusTxt;
 	@Excel(name = "测试成绩")
+	@ApiModelProperty("测试成绩")
 	private BigDecimal score;
 
 }

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -420,10 +420,10 @@
         (SELECT COUNT(ccs.section_id) FROM course_chapter_section ccs where ccs.chapter_id=cm.menu_id) as class_hours,
         2 as type,
         (SELECT usr.create_time FROM user_study_record usr LEFT JOIN course_chapter_section ccs on usr.section_id =
-        ccs.section_id where ccs.chapter_id = cm.menu_id and usr.course_id = cm.course_id and usr.goods_id = gc.goods_id and usr.grade_id = #{gradeId} ORDER BY usr.create_time ASC
+        ccs.section_id and ccs.chapter_id = usr.chapter_id where ccs.chapter_id = cm.menu_id AND usr.current_status = 1 AND usr.user_id=#{userId} and usr.course_id = cm.course_id and usr.goods_id = gc.goods_id and usr.grade_id = #{gradeId} ORDER BY usr.create_time ASC
         limit 1) as study_start_time,
         (SELECT usr.update_time FROM user_study_record usr LEFT JOIN course_chapter_section ccs on usr.section_id =
-        ccs.section_id where ccs.chapter_id = cm.menu_id and usr.course_id = cm.course_id and usr.goods_id = gc.goods_id and usr.grade_id = #{gradeId} ORDER BY usr.create_time DESC
+        ccs.section_id and ccs.chapter_id = usr.chapter_id where ccs.chapter_id = cm.menu_id AND usr.current_status = 1 AND usr.user_id=#{userId} and usr.course_id = cm.course_id and usr.goods_id = gc.goods_id and usr.grade_id = #{gradeId} ORDER BY usr.create_time DESC
         limit 1) as study_end_time
         FROM
         course_menu cm