From f70bd31d3902ea328016d76ecf6ee64e9c50fbff Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 25 Feb 2021 17:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExperimentalTeachingControllerApi.java | 4 +-- .../ExperimentalProjectController.java | 12 +-------- .../ExperimentalTeachingController.java | 25 +++++++++++-------- .../entity/ExperimentalTeachingEntity.java | 2 ++ .../tms/entity/vo/ExperimentalTeachingVO.java | 2 ++ .../impl/ExperimentalTeachingServiceImpl.java | 11 -------- 6 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java b/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java index e5c9351..f6c28a0 100644 --- a/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java +++ b/src/main/java/com/msdw/tms/api/ExperimentalTeachingControllerApi.java @@ -2,12 +2,9 @@ package com.msdw.tms.api; import com.msdw.tms.common.utils.R; import com.msdw.tms.entity.ExperimentalTeachingEntity; -import com.msdw.tms.entity.UserEntity; -import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.springframework.web.bind.annotation.GetMapping; import java.text.ParseException; @@ -20,6 +17,7 @@ public interface ExperimentalTeachingControllerApi { @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 = "systemId", value = "系统id", required = false) Integer systemId, @ApiParam(name = "startTime", value = "开始时间", required = false) String startTime, @ApiParam(name = "stopTime", value = "结束时间", required = false) String stopTime, @ApiParam(name = "searchContent", value = "搜索内容", required = false) String searchContent, diff --git a/src/main/java/com/msdw/tms/controller/ExperimentalProjectController.java b/src/main/java/com/msdw/tms/controller/ExperimentalProjectController.java index 049eed6..31799c7 100644 --- a/src/main/java/com/msdw/tms/controller/ExperimentalProjectController.java +++ b/src/main/java/com/msdw/tms/controller/ExperimentalProjectController.java @@ -2,26 +2,16 @@ package com.msdw.tms.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.msdw.tms.api.ExperimentalProjectControllerApi; -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.ExperimentalProjectEntity; -import com.msdw.tms.entity.ExperimentalTeachingEntity; -import com.msdw.tms.entity.UserEntity; import com.msdw.tms.entity.vo.ExperimentalProjectEntityVO; -import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO; -import com.msdw.tms.entity.vo.UserEntityVo; import com.msdw.tms.service.ExperimentalProjectService; -import com.msdw.tms.service.UserService; -import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Arrays; -import java.util.List; -import java.util.Map; @RestController @RequestMapping("tms/project") @@ -40,7 +30,7 @@ public class ExperimentalProjectController implements ExperimentalProjectControl return R.ok().put("experimental_project_name", one); } - /** + /**nm * 根据id查询实验班级详情 */ @GetMapping("/getById/{id}") diff --git a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java index 7dd84ce..f070234 100644 --- a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java @@ -2,24 +2,20 @@ 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; -import com.msdw.tms.entity.UserEntity; -import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO; import com.msdw.tms.entity.vo.ExperimentalTeachingVO; -import com.msdw.tms.entity.vo.UserEntityVo; import com.msdw.tms.service.ExperimentalTeachingService; -import com.msdw.tms.service.UserService; -import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; @RestController @RequestMapping("tms/exp") @@ -32,6 +28,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 根据id查询实验班级详情 */ + @Override @GetMapping("/getById/{id}") public R getById(@PathVariable("id") Integer id){ ExperimentalTeachingEntity et = experimentalTeachingService.getById(id); @@ -40,6 +37,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 根据邀请码查询 */ + @Override @GetMapping("/getInvitationCode") public R getInvitationCode(@RequestParam Integer invitationCode) { ExperimentalTeachingEntity one = experimentalTeachingService.getOne(new QueryWrapper().eq("invitation_code", invitationCode) @@ -49,15 +47,19 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 查询 */ + @Override @GetMapping("/list") - public R list(@RequestParam Integer page, - @RequestParam Integer size, - Integer month, Integer type, Integer status, String startTime, String stopTime, String searchContent,@RequestParam Integer schoolId){ + public R list(@RequestParam Integer page, @RequestParam Integer size, + Integer month, Integer type, Integer status,Integer systemId, String startTime, + String stopTime, String searchContent,@RequestParam Integer schoolId){ ExperimentalTeachingVO vo = new ExperimentalTeachingVO(); vo.setSchoolId(schoolId); if (month!=null){ vo.setMonth(month); } + if (systemId!=null){ + vo.setSystemId(systemId); + } if (type!=null){ vo.setType(type); } @@ -80,6 +82,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 保存 */ + @Override @PostMapping("/save") public R save(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity){ experimentalTeachingService.save(experimentalTeachingEntity); @@ -89,6 +92,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 修改 */ + @Override @PostMapping("/update") public R update(@RequestBody ExperimentalTeachingEntity experimentalTeachingEntity) throws ParseException { //添加实验结束时间 @@ -117,6 +121,7 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr /** * 删除 */ + @Override @PostMapping("/delete") public R delete(@RequestBody Integer[] ids){ experimentalTeachingService.removeByIds(Arrays.asList(ids)); diff --git a/src/main/java/com/msdw/tms/entity/ExperimentalTeachingEntity.java b/src/main/java/com/msdw/tms/entity/ExperimentalTeachingEntity.java index c6f3795..78033be 100644 --- a/src/main/java/com/msdw/tms/entity/ExperimentalTeachingEntity.java +++ b/src/main/java/com/msdw/tms/entity/ExperimentalTeachingEntity.java @@ -45,6 +45,8 @@ public class ExperimentalTeachingEntity { private Integer isCode; //绑定用户Id private Integer userId; + //绑定系统Id + private Integer systemId; //创建时间 private String creationTime; //实验倒计时 diff --git a/src/main/java/com/msdw/tms/entity/vo/ExperimentalTeachingVO.java b/src/main/java/com/msdw/tms/entity/vo/ExperimentalTeachingVO.java index 270246f..b3370c1 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ExperimentalTeachingVO.java +++ b/src/main/java/com/msdw/tms/entity/vo/ExperimentalTeachingVO.java @@ -18,4 +18,6 @@ public class ExperimentalTeachingVO { private Integer status; //学校id private Integer schoolId; + //绑定系统Id + private Integer systemId; } diff --git a/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java index 140fa2c..1265737 100644 --- a/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java @@ -1,31 +1,20 @@ package com.msdw.tms.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.PageUtils; -import com.msdw.tms.common.utils.Query; import com.msdw.tms.dao.ClassTeachingDao; import com.msdw.tms.dao.ExperimentalTeachingDao; -import com.msdw.tms.dao.UserDao; import com.msdw.tms.entity.ExperimentalTeachingEntity; -import com.msdw.tms.entity.UserEntity; -import com.msdw.tms.entity.vo.ExperimentalTeachingEntityVO; import com.msdw.tms.entity.vo.ExperimentalTeachingVO; import com.msdw.tms.entity.vo.ProjectRecordVo; -import com.msdw.tms.entity.vo.UserEntityVo; import com.msdw.tms.service.ExperimentalTeachingService; -import com.msdw.tms.service.UserService; import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.List; -import java.util.Map; - @Service("experimentalTeachingService") public class ExperimentalTeachingServiceImpl extends ServiceImpl implements ExperimentalTeachingService {