Ver código fonte

Merge remote-tracking branch 'origin/dev' into dev

yangdamao 1 ano atrás
pai
commit
0c1c429e95

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserExamRecordAddBo.java

@@ -96,4 +96,5 @@ public class UserExamRecordAddBo {
     private Long simulateExamId;
     @ApiModelProperty("来源平台 1小程序 2PC网站 3h5")
     private Integer fromPlat;
+    private BigDecimal rightRate;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserExamRecordEditBo.java

@@ -114,4 +114,5 @@ public class UserExamRecordEditBo {
     private Long simulateExamId;
     @ApiModelProperty("来源平台 1小程序 2PC网站 3h5")
     private Integer fromPlat;
+    private BigDecimal rightRate;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/UserExamRecord.java

@@ -83,4 +83,6 @@ private static final long serialVersionUID=1L;
 
     private Integer fromPlat;
 
+    private BigDecimal rightRate;
+
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/ExamStudyRecordVo.java

@@ -123,4 +123,8 @@ public class ExamStudyRecordVo {
     private String subjectNames;
 
     private Integer goodsStatus;
+
+  
+    @ApiModelProperty("准确率")
+    private BigDecimal rightRate;
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserExamRecordVo.java

@@ -152,4 +152,8 @@ public class UserExamRecordVo {
 	private Long simulateExamId;
 	@ApiModelProperty("来源平台 1小程序 2PC网站 3h5")
 	private Integer fromPlat;
+	/** 准确率 */
+	@Excel(name = "准确率")
+	@ApiModelProperty("准确率")
+	private BigDecimal rightRate;
 }

+ 2 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamRecordMapper.xml

@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="doMode" column="do_mode"/>
         <result property="simulateExamId" column="simulate_exam_id"/>
         <result property="fromPlat" column="from_plat"/>
+        <result property="rightRate" column="right_rate"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.user.vo.UserExamRecordVo" id="UserExamRecordVoResult">
@@ -66,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="doMode" column="do_mode"/>
         <result property="simulateExamId" column="simulate_exam_id"/>
         <result property="fromPlat" column="from_plat"/>
+        <result property="rightRate" column="right_rate"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.user.vo.UserExamWrongRecordVo" id="UserExamRecordQuestionVoResult">

+ 5 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -131,6 +131,7 @@
         <result property="fileNum" column="file_num"/>
         <result property="subjectNames" column="subject_names"/>
         <result property="goodsStatus" column="goods_status"/>
+        <result property="rightRate" column="right_rate"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.user.vo.ExamSonStudyRecordVo" id="ExamSonStudyRecordVoResult">
@@ -763,8 +764,10 @@
         create_time ASC LIMIT 1) as start_time,
         (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
+        (SELECT COUNT(DISTINCT exam_id) FROM user_exam_record r where r.order_goods_id=s.order_goods_id AND r.do_mode = 1 AND r.user_id = #{userId})
+        as stu_all_num,
+        (SELECT MAX(right_rate) FROM user_exam_record r where r.order_goods_id=s.order_goods_id AND r.do_mode = 1 AND r.user_id = #{userId})
+        as right_rate
         FROM
         goods g
         LEFT JOIN order_goods s ON g.goods_id = s.goods_id AND s.pay_status in (2,3,4)