he2802 2 år sedan
förälder
incheckning
9e051ef8a1

+ 4 - 6
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserExamWrongRecordController.java

@@ -118,13 +118,11 @@ public class UserExamWrongRecordController extends BaseController {
 
 
     @ApiOperation("获取用户报告错题数")
-    @GetMapping("/wrongNum/{recordId}")
-    public AjaxResult<Long> wrongNum(@PathVariable("recordId" ) Long recordId) {
+    @GetMapping("/wrongNum")
+    public AjaxResult<Long> wrongNum(UserExamWrongRecordQueryBo bo) {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-        UserExamWrongRecordQueryBo wBo = new UserExamWrongRecordQueryBo();
-        wBo.setRecordId(recordId);
-        wBo.setUserId(loginUser.getUser().getUserId());
-        return AjaxResult.success(iUserExamWrongRecordService.recordNum(wBo));
+        bo.setUserId(loginUser.getUser().getUserId());
+        return AjaxResult.success(iUserExamWrongRecordService.recordNum(bo));
     }
 
     /**

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserExamWrongRecordQueryBo.java

@@ -70,4 +70,7 @@ public class UserExamWrongRecordQueryBo extends BaseEntity {
 	/** 做题模式 1章卷 2随机练习 */
 	@ApiModelProperty("做题模式 1章卷 2随机练习")
 	private Long doMode;
+	/** 类型1,题库 2,视频 */
+	@ApiModelProperty("类型1,题库 2,视频 ")
+	private Integer courseType;
 }

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamWrongRecordMapper.xml

@@ -280,6 +280,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="doMode != null and doMode != ''">
             AND do_mode = #{doMode}
         </if>
+        <if test="courseType != null and courseType != ''">
+            AND course_type = #{courseType}
+        </if>
         GROUP BY
         exam_id
         ) uewr