diff --git a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java index d0efeda..957321b 100644 --- a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java +++ b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java @@ -14,7 +14,7 @@ public interface ClassTeachingApi { @ApiOperation(value = "查询班级实验列表信息",notes = "查询班级实验列表信息") R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime, - String condition, Integer status, Integer isCode); + String condition, Integer status, Integer isCode,Integer isUserId); @ApiOperation(value = "查看成绩",notes = "查看成绩") R queryAchievement(); diff --git a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java index 6fd451d..346154b 100644 --- a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java @@ -33,9 +33,8 @@ public class ClassTeachingController implements ClassTeachingApi { @Override @GetMapping("userRecord") public R queryTestRecord(@RequestParam Integer page, @RequestParam Integer size, Integer month,@RequestParam String startTime,@RequestParam String endTime, - String condition, @RequestParam Integer status,@RequestParam Integer isCode){ + String condition, @RequestParam Integer status,@RequestParam Integer isCode,@RequestParam Integer isUserId){ ProjectRecordVo recordVo = new ProjectRecordVo(); - ExperimentalTeachingEntity entity = new ExperimentalTeachingEntity(); if (isCode==0){ if (status!=0) {//不限定实验状态 recordVo.setStatus(status); @@ -53,7 +52,7 @@ public class ClassTeachingController implements ClassTeachingApi { recordVo.setEndTime(endTime); } } - recordVo.setIsCode(isCode); + recordVo.setIsCode(isCode).setUserId(isUserId); PageUtils page1 = classTeachingService.queryClassRecord(page,size,recordVo); return R.ok().put("page", page1); }else if (isCode==1){ diff --git a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java index 4b1e237..4130590 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java @@ -71,6 +71,10 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable * 是否启用邀请码 */ private Integer isCode; + /** + * 绑定用户id + */ + private Integer userId; // /** // * 班级实验状态,0 不限,1 未发布,2 进行中,3 已完成 diff --git a/src/main/resources/mapper/tms/ClassTeachingDao.xml b/src/main/resources/mapper/tms/ClassTeachingDao.xml index 7327f7b..c36b5c4 100644 --- a/src/main/resources/mapper/tms/ClassTeachingDao.xml +++ b/src/main/resources/mapper/tms/ClassTeachingDao.xml @@ -21,9 +21,11 @@ WHERE `status` = #{cla.status} and is_code = #{cla.isCode} + and user_id = #{cla.userId} and ( project_name like concat('%',#{cla.condition},'%') or experimental_class_name like concat('%',#{cla.condition},'%') ) and stop_time between #{cla.endTime} and #{cla.startTime} and DATE_SUB(CURDATE(), INTERVAL #{cla.month} month ) <= date(stop_time) + \ No newline at end of file