|
@@ -1,9 +1,12 @@
|
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
|
|
|
import com.ym.mec.biz.service.ClassGroupStudentMapperService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -23,8 +26,18 @@ public class ClassGroupStudentController extends BaseController {
|
|
|
@ApiOperation(value = "删除班级学生")
|
|
|
@PostMapping("/del")
|
|
|
@PreAuthorize("@pcs.hasPermissions('classGroupStudent/del')")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "用户id", required = true, dataType = "int"),
|
|
|
+ @ApiImplicitParam(name = "classGroupId", value = "班级id", required = true, dataType = "int")})
|
|
|
public HttpResponseResult del(Integer userId, Integer classGroupId) throws Exception {
|
|
|
return succeed(classGroupStudentMapperService.delClassGroupStudent(userId, classGroupId));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询班级所有学生")
|
|
|
+ @PostMapping("/findAllStudent")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroupStudent/findAllStudent')")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "classGroupId", value = "班级id", required = true, dataType = "int")})
|
|
|
+ public HttpResponseResult findAllStudent(Integer classGroupId) throws Exception {
|
|
|
+ return succeed(classGroupStudentMapperService.findClassStudentList(classGroupId, ClassGroupStudentStatusEnum.NORMAL));
|
|
|
+ }
|
|
|
+
|
|
|
}
|