diff --git a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java index 3940de6..2efe0bb 100644 --- a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java +++ b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java @@ -18,4 +18,7 @@ public interface ClassTeachingApi { @ApiOperation(value = "查看成绩",notes = "查看成绩") R queryAchievement(); + + @ApiOperation(value = "查看虚拟仿真课程列表",notes = "查看虚拟仿真课程列表") + R querySimulationPlayList(Integer page,Integer size); } diff --git a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java index aebf9b3..41fe464 100644 --- a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java @@ -3,6 +3,7 @@ package com.msdw.tms.controller; import com.msdw.tms.api.ClassTeachingApi; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; +import com.msdw.tms.entity.BroadcastEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.service.ClassTeachingService; @@ -96,4 +97,17 @@ public class ClassTeachingController implements ClassTeachingApi { public R queryAchievement(){ return R.ok(); } + + /** + * 查看虚拟仿真课程列表信息 + * @param page + * @param size + * @return + */ + @Override + @GetMapping("/simulationPlayList") + public R querySimulationPlayList(@RequestParam Integer page,@RequestParam Integer size){ + PageUtils page1 = classTeachingService.querySimulationPlayList(page,size); + return R.ok().put("data",page1); + } } diff --git a/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java b/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java index d3abacd..3597510 100644 --- a/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java +++ b/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java @@ -2,6 +2,7 @@ package com.msdw.tms.dao; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.msdw.tms.entity.BroadcastEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.vo.ProjectRecordVo; import org.apache.ibatis.annotations.Mapper; @@ -15,4 +16,5 @@ public interface ClassTeachingDao { void updateSurplusTime(@Param("cla") ProjectRecordVo recordVo); void updateSurplusTimeNull(@Param("cla") ProjectRecordVo recordVo); + IPage querySimulationPlayList(Page page1); } diff --git a/src/main/java/com/msdw/tms/entity/BroadcastEntity.java b/src/main/java/com/msdw/tms/entity/BroadcastEntity.java new file mode 100644 index 0000000..8907da0 --- /dev/null +++ b/src/main/java/com/msdw/tms/entity/BroadcastEntity.java @@ -0,0 +1,30 @@ +package com.msdw.tms.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +@TableName("tms_broadcast") +public class BroadcastEntity { + /** + * 主键 + */ + @TableId(type = IdType.AUTO) + private Integer id; + /** + * 视频/文档链接 + */ + private String links; + /** + * 存活状态(0存在,1已删除) + */ + private Integer isdel; + /** + * 视频/文档标题 + */ + private String title; +} diff --git a/src/main/java/com/msdw/tms/service/ClassTeachingService.java b/src/main/java/com/msdw/tms/service/ClassTeachingService.java index f56b0d7..97fbfb3 100644 --- a/src/main/java/com/msdw/tms/service/ClassTeachingService.java +++ b/src/main/java/com/msdw/tms/service/ClassTeachingService.java @@ -9,4 +9,6 @@ public interface ClassTeachingService { ExperimentalTeachingEntity queryInvitationcode(ExperimentalTeachingEntity experimentalTeachingEntity); PageUtils queryClassRecord(Integer page, Integer size, ProjectRecordVo recordVo); + + PageUtils querySimulationPlayList(Integer page,Integer size); } diff --git a/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java index ccfdf83..f3b9f61 100644 --- a/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java @@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.dao.ClassTeachingDao; +import com.msdw.tms.entity.BroadcastEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity; +import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.service.ClassTeachingService; import org.apache.poi.ss.formula.functions.T; @@ -43,4 +45,19 @@ public class ClassTeachingServiceImpl implements ClassTeachingService { PageUtils pageUtils = new PageUtils(schoolRecord); return pageUtils; } + + @Override + public PageUtils querySimulationPlayList(Integer page,Integer size){ + + new BroadcastEntity().setIsdel(Constant.IsDel.NOT_DEL.getType()); + + //分页对象 + Page page1 = new Page<>(page, size); + + IPage broadcastEntity = this.classMapper.querySimulationPlayList(page1); + + PageUtils questionsPage = new PageUtils(broadcastEntity); + + return questionsPage; + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1c19f32..68430e8 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,7 +11,7 @@ spring: # url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai # username: root # password: root - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver # redis: # host: www.liuwanr.cn # port: 6379 diff --git a/src/main/resources/mapper/tms/ClassTeachingDao.xml b/src/main/resources/mapper/tms/ClassTeachingDao.xml index 59cf6ec..e0f2e1b 100644 --- a/src/main/resources/mapper/tms/ClassTeachingDao.xml +++ b/src/main/resources/mapper/tms/ClassTeachingDao.xml @@ -43,4 +43,7 @@ AND is_del=0 + \ No newline at end of file