diff --git a/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java b/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java index 86297ea..ac88375 100644 --- a/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java +++ b/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java @@ -14,9 +14,9 @@ public interface ExperimentalTeachingControllerApi { @ApiOperation(value = "实验教学列表",notes = "实验教学列表查询") R list(@ApiParam(name = "page", value = "页码", required = true) Integer page, @ApiParam(name = "size", value = "每页显示的数据条数", required = true) Integer size, - @ApiParam(name = "month", value = "月份", required = false) Integer month, - @ApiParam(name = "type", value = "类型", required = false) Integer type, - @ApiParam(name = "status", value = "状态", required = false) Integer status, + @ApiParam(name = "month", value = "月份:1、近一个月内 3、近三个月内 6、近六个月内", required = false) Integer month, + @ApiParam(name = "type", value = "类型:1、手动发布 2、定时发布", required = false) Integer type, + @ApiParam(name = "status", value = "状态:1、待开始 2、进行中 3、已结束", required = false) Integer status, @ApiParam(name = "startTime", value = "开始时间", required = false) String startTime, @ApiParam(name = "stopTime", value = "结束时间", required = false) String stopTime, @ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent); @@ -29,4 +29,11 @@ public interface ExperimentalTeachingControllerApi { @ApiOperation(value = "删除用户个人档案",notes = "删除用户个人档案") R delete(Integer[] ids); + + @ApiOperation(value = "根据id查询教学详情",notes = "根据id查询教学详情") + R getById(Integer id); + + @ApiOperation(value = "查询邀请码是否存在",notes = "查询邀请码是否存在") + R getInvitationCode(Integer invitationCode); + } diff --git a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java index 04b3154..c6288d0 100644 --- a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java @@ -1,7 +1,9 @@ package com.msdw.tms.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.msdw.tms.api.ExperimentalTeachingControllerApi; import com.msdw.tms.api.UserControllerApi; +import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; import com.msdw.tms.entity.ExperimentalTeachingEntity; @@ -27,14 +29,22 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** - * 列表 + * 根据id查询实验班级详情 */ -// @GetMapping("/page") -// public R list(@RequestParam Map params){ -// PageUtils page = experimentalTeachingService.queryPage(params); -// return R.ok().put("page", page); -// } - + @GetMapping("/getById/{id}") + public R getById(@PathVariable("id") Integer id){ + ExperimentalTeachingEntity et = experimentalTeachingService.getById(id); + return R.ok().put("ExperimentalTeaching", et); + } + /** + * 根据邀请码查询 + */ + @GetMapping("/getInvitationCode") + public R getInvitationCode(@RequestParam Integer invitationCode) { + ExperimentalTeachingEntity one = experimentalTeachingService.getOne(new QueryWrapper().eq("invitation_code", invitationCode) + .eq("is_del", Constant.IsDel.NOT_DEL)); + return R.ok().put("InvitationCode", one); + } /** * 查询 */ @@ -92,4 +102,14 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr return R.ok(); } + +// /** +// * 修改 +// */ +// @PostMapping("/start") +// public R start(@RequestParam Integer id){ +// experimentalTeachingService.updateById(experimentalTeachingEntity); +// +// return R.ok(); +// } } diff --git a/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java b/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java index 36295e7..9c9777a 100644 --- a/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java +++ b/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java @@ -15,6 +15,4 @@ public interface ExperimentalTeachingService extends IService params); - }