he2802 il y a 4 ans
Parent
commit
db741d8b65

+ 3 - 3
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserBankRecordController.java

@@ -37,7 +37,7 @@ import io.swagger.annotations.ApiOperation;
  * @author ruoyi
  * @date 2021-06-24
  */
-@Api(value = "用户的做题历史控制器", tags = {"用户的做题历史管理"})
+@Api(value = "视频商品用户的做题历史控制器", tags = {"视频商品用户的做题历史管理"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
 @RequestMapping("/bank/record")
@@ -50,7 +50,7 @@ public class UserBankRecordController extends BaseController {
     /**
      * 查询用户的做题历史列表
      */
-    @ApiOperation("查询用户的做题历史列表")
+    @ApiOperation("视频商品查询用户的做题历史列表")
     @GetMapping("/list")
     public TableDataInfo<UserBankRecordVo> list(UserBankRecordQueryBo bo) {
         startPage();
@@ -63,7 +63,7 @@ public class UserBankRecordController extends BaseController {
     /**
      * 获取用户的做题历史详细信息
      */
-    @ApiOperation("获取用户的做题历史详细信息")
+    @ApiOperation("视频商品获取用户的做题历史详细信息")
     @GetMapping("/{recordId}")
     public AjaxResult<UserBankRecordVo> getInfo(@PathVariable("recordId" ) Long recordId) {
         return AjaxResult.success(iUserBankRecordService.queryById(recordId));

+ 28 - 11
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordAddBo.java

@@ -20,12 +20,7 @@ import java.util.List;
 @ApiModel("用户的做题历史添加对象")
 public class UserBankRecordAddBo {
 
-    /** 1真题模拟考试 2试卷练习 3真题练习 */
-    @ApiModelProperty("1真题模拟考试 2试卷练习 3真题练习")
-    private Long type;
-    /** 真题模拟ID */
-    @ApiModelProperty("真题模拟ID")
-    private Long simulateId;
+
     /** 试卷ID */
     @ApiModelProperty("试卷ID")
     private Long examId;
@@ -38,12 +33,34 @@ public class UserBankRecordAddBo {
     /** 更新时间 */
     @ApiModelProperty("更新时间")
     private Long updateTime;
-    /** 更新时间 */
-    @ApiModelProperty("用户答题数组")
-    private List<UserBankQuestionRecordAddBo> answerList;
+    /** 用户ID */
     @ApiModelProperty("用户ID")
     private Long userId;
-
+    /** 是否完成 1完成 0未完成 */
+    @ApiModelProperty("是否完成 1完成 0未完成")
+    private Integer status;
+    /** 试卷绑定的商品 */
+    @ApiModelProperty("试卷绑定的商品")
+    private Long goodsId;
+    /** 1及格 0不及格 */
+    @ApiModelProperty("1及格 0不及格")
+    private Integer reportStatus;
+    /** 绑定课程 */
+    @ApiModelProperty("绑定课程")
+    private Long courseId;
+    /** 节ID */
+    @ApiModelProperty("节ID")
+    private Long sectionId;
+    /** 模块ID */
+    @ApiModelProperty("模块ID")
+    private Long moduleId;
+    /** 章ID */
+    @ApiModelProperty("章ID")
+    private Long chapterId;
+    /** 分数 */
     @ApiModelProperty("分数")
-    private BigDecimal grade;
+    private Long performance;
+    /** grade_id */
+    @ApiModelProperty("班级ID")
+    private Long gradeId;
 }

+ 30 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordQueryBo.java

@@ -21,7 +21,6 @@ import com.zhongzheng.common.core.domain.BaseEntity;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel("用户的做题历史分页查询对象")
 public class UserBankRecordQueryBo extends BaseEntity {
-
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")
 	private Integer pageSize;
@@ -48,5 +47,35 @@ public class UserBankRecordQueryBo extends BaseEntity {
 	/** 题库ID */
 	@ApiModelProperty("题库ID")
 	private Long bankId;
+	/** 用户ID */
+	@ApiModelProperty("用户ID")
+	private Long userId;
+	/** 是否完成 1完成 0未完成 */
+	@ApiModelProperty("是否完成 1完成 0未完成")
+	private Integer status;
+	/** 试卷绑定的商品 */
+	@ApiModelProperty("试卷绑定的商品")
+	private Long goodsId;
+	/** 1及格 0不及格 */
+	@ApiModelProperty("1及格 0不及格")
+	private Integer reportStatus;
+	/** 绑定课程 */
+	@ApiModelProperty("绑定课程")
+	private Long courseId;
+	/** 节ID */
+	@ApiModelProperty("节ID")
+	private Long sectionId;
+	/** 模块ID */
+	@ApiModelProperty("模块ID")
+	private Long moduleId;
+	/** 章ID */
+	@ApiModelProperty("章ID")
+	private Long chapterId;
+	/** 分数 */
+	@ApiModelProperty("分数")
+	private Long performance;
+	/** grade_id */
+	@ApiModelProperty("grade_id")
+	private Long gradeId;
 
 }

+ 19 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/UserBankRecord.java

@@ -28,25 +28,34 @@ private static final long serialVersionUID=1L;
     @TableId(value = "record_id")
     private Long recordId;
 
-    /** 1真题模拟考试 2试卷练习 3真题练习 */
-    private Long type;
-
-    /** 真题模拟ID */
-    private Long simulateId;
-
     /** 试卷ID */
     private Long examId;
-
     /** 题库ID */
     private Long bankId;
-
     /** 创建时间 */
     @TableField(fill = FieldFill.INSERT)
     private Long createTime;
-
     /** 更新时间 */
     @TableField(fill = FieldFill.INSERT_UPDATE)
     private Long updateTime;
-
+    /** 用户ID */
     private Long userId;
+    /** 是否完成 1完成 0未完成 */
+    private Integer status;
+    /** 试卷绑定的商品 */
+    private Long goodsId;
+    /** 1及格 0不及格 */
+    private Integer reportStatus;
+    /** 绑定课程 */
+    private Long courseId;
+    /** 节ID */
+    private Long sectionId;
+    /** 模块ID */
+    private Long moduleId;
+    /** 章ID */
+    private Long chapterId;
+    /** 分数 */
+    private Long performance;
+    /** grade_id */
+    private Long gradeId;
 }

+ 13 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserBankRecordServiceImpl.java

@@ -63,10 +63,19 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
     @Override
     public List<UserBankRecordVo> queryList(UserBankRecordQueryBo bo) {
         LambdaQueryWrapper<UserBankRecord> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getType() != null, UserBankRecord::getType, bo.getType());
-        lqw.eq(bo.getSimulateId() != null, UserBankRecord::getSimulateId, bo.getSimulateId());
+
         lqw.eq(bo.getExamId() != null, UserBankRecord::getExamId, bo.getExamId());
         lqw.eq(bo.getBankId() != null, UserBankRecord::getBankId, bo.getBankId());
+        lqw.eq(bo.getUserId() != null, UserBankRecord::getUserId, bo.getUserId());
+        lqw.eq(bo.getStatus() != null, UserBankRecord::getStatus, bo.getStatus());
+        lqw.eq(bo.getGoodsId() != null, UserBankRecord::getGoodsId, bo.getGoodsId());
+        lqw.eq(bo.getReportStatus() != null, UserBankRecord::getReportStatus, bo.getReportStatus());
+        lqw.eq(bo.getCourseId() != null, UserBankRecord::getCourseId, bo.getCourseId());
+        lqw.eq(bo.getSectionId() != null, UserBankRecord::getSectionId, bo.getSectionId());
+        lqw.eq(bo.getModuleId() != null, UserBankRecord::getModuleId, bo.getModuleId());
+        lqw.eq(bo.getChapterId() != null, UserBankRecord::getChapterId, bo.getChapterId());
+        lqw.eq(bo.getPerformance() != null, UserBankRecord::getPerformance, bo.getPerformance());
+        lqw.eq(bo.getGradeId() != null, UserBankRecord::getGradeId, bo.getGradeId());
         return entity2Vo(this.list(lqw));
     }
 
@@ -98,19 +107,15 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
 
-        //模拟考试获得用户积分
-        if(bo.getType() != null && bo.getType() == 1){
-
-        }
 
         if(this.save(add)){
             Long recordId =  add.getRecordId();
-            for(UserBankQuestionRecordAddBo item : bo.getAnswerList()){
+           /* for(UserBankQuestionRecordAddBo item : bo.getAnswerList()){
                 item.setBankId(bo.getBankId());
                 item.setRecordId(recordId);
                 item.setUserId(bo.getUserId());
                 iUserBankQuestionRecordService.insertByAddBo(item);
-            }
+            }*/
             return true;
         }
         return false;

+ 40 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserBankRecordVo.java

@@ -24,14 +24,6 @@ public class UserBankRecordVo {
 	@ApiModelProperty("$pkColumn.columnComment")
 	private Long recordId;
 
-	/** 1真题模拟考试 2试卷练习 3真题练习 */
-	@Excel(name = "1真题模拟考试 2试卷练习 3真题练习")
-	@ApiModelProperty("1真题模拟考试 2试卷练习 3真题练习")
-	private Long type;
-	/** 真题模拟ID */
-	@Excel(name = "真题模拟ID")
-	@ApiModelProperty("真题模拟ID")
-	private Long simulateId;
 	/** 试卷ID */
 	@Excel(name = "试卷ID")
 	@ApiModelProperty("试卷ID")
@@ -40,5 +32,44 @@ public class UserBankRecordVo {
 	@Excel(name = "题库ID")
 	@ApiModelProperty("题库ID")
 	private Long bankId;
-
+	/** 用户ID */
+	@Excel(name = "用户ID")
+	@ApiModelProperty("用户ID")
+	private Long userId;
+	/** 是否完成 1完成 0未完成 */
+	@Excel(name = "是否完成 1完成 0未完成")
+	@ApiModelProperty("是否完成 1完成 0未完成")
+	private Integer status;
+	/** 试卷绑定的商品 */
+	@Excel(name = "试卷绑定的商品")
+	@ApiModelProperty("试卷绑定的商品")
+	private Long goodsId;
+	/** 1及格 0不及格 */
+	@Excel(name = "1及格 0不及格")
+	@ApiModelProperty("1及格 0不及格")
+	private Integer reportStatus;
+	/** 绑定课程 */
+	@Excel(name = "绑定课程")
+	@ApiModelProperty("绑定课程")
+	private Long courseId;
+	/** 节ID */
+	@Excel(name = "节ID")
+	@ApiModelProperty("节ID")
+	private Long sectionId;
+	/** 模块ID */
+	@Excel(name = "模块ID")
+	@ApiModelProperty("模块ID")
+	private Long moduleId;
+	/** 章ID */
+	@Excel(name = "章ID")
+	@ApiModelProperty("章ID")
+	private Long chapterId;
+	/** 分数 */
+	@Excel(name = "分数")
+	@ApiModelProperty("分数")
+	private Long performance;
+	/** grade_id */
+	@Excel(name = "grade_id")
+	@ApiModelProperty("grade_id")
+	private Long gradeId;
 }

+ 9 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserBankRecordMapper.xml

@@ -13,6 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
         <result property="userId" column="user_id"/>
+        <result property="status" column="status"/>
+        <result property="goodsId" column="goods_id"/>
+        <result property="reportStatus" column="report_status"/>
+        <result property="courseId" column="course_id"/>
+        <result property="sectionId" column="section_id"/>
+        <result property="moduleId" column="module_id"/>
+        <result property="chapterId" column="chapter_id"/>
+        <result property="performance" column="performance"/>
+        <result property="gradeId" column="grade_id"/>
     </resultMap>