|
@@ -1,13 +1,14 @@
|
|
|
package com.yonge.cooleshow.classroom.controller;
|
|
|
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.HereWhiteDto;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.HereWhite;
|
|
|
import com.yonge.cooleshow.biz.dal.service.RongyunHereWhiteService;
|
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -18,31 +19,9 @@ public class HereWhiteController extends BaseController {
|
|
|
@Autowired
|
|
|
private RongyunHereWhiteService hereWhiteService;
|
|
|
|
|
|
- /**
|
|
|
- * 创建白板,默认全部采用零时白板
|
|
|
- * @param name 白板名称
|
|
|
- * @param userNum 白板人数上限,0不限制
|
|
|
- * @param courseScheduleId 课程编号
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
+ @ApiOperation("创建白板,默认全部采用零时白板")
|
|
|
@PostMapping(value = "create")
|
|
|
- public HttpResponseResult<HereWhite> userAdd(String name, Integer userNum, Integer courseScheduleId) throws Exception {
|
|
|
- if(StringUtils.isEmpty(name) || userNum == null || courseScheduleId == null){
|
|
|
- return failed("参数校验失败");
|
|
|
- }
|
|
|
- return succeed(hereWhiteService.create(name, userNum,courseScheduleId));
|
|
|
+ public HttpResponseResult<HereWhite> userAdd(@RequestBody HereWhiteDto hereWhiteDto) throws Exception {
|
|
|
+ return succeed(hereWhiteService.create(hereWhiteDto.getName(), hereWhiteDto.getUserNum(),hereWhiteDto.getCourseScheduleId()));
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取特定白板详情
|
|
|
- * @param courseScheduleId 课程编号
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @GetMapping(value = "get")
|
|
|
- public HttpResponseResult<HereWhite> join(Integer courseScheduleId){
|
|
|
- return succeed(hereWhiteService.getDao().findByCourseScheduleId(courseScheduleId));
|
|
|
- }
|
|
|
-
|
|
|
}
|