学生自主选择床位权限添加
This commit is contained in:
@@ -174,10 +174,12 @@ public class SrsDormitoryStudentController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('dms:dormStu:add')")
|
||||
@ApiOperation(value = "学生自主选择床位", notes = "id不用填写,只能选择是当前学生班级并且为空的宿舍床位", response = StudentDormitoryDto.class)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody StudentDormitoryDto dto) {
|
||||
boolean hasRole = RoleBool.isHigh(getUserId(), _postService);
|
||||
System.out.println(hasRole);
|
||||
if (hasRole) {
|
||||
DomInfo dorm = _dormService.getDormHas(dto.getDormitoryId());
|
||||
SrsStudent stu = _stuService.getStuInfo(dto.getStuNo());
|
||||
@@ -262,6 +264,7 @@ public class SrsDormitoryStudentController extends BaseController {
|
||||
return srsDormitoryStudentService.cancel();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "管理员分配学生床位", notes = "id不用填写", response = StudentDormitoryDto.class)
|
||||
@PostMapping("/admin/add")
|
||||
public AjaxResult adminAdd(@RequestBody StudentDormitoryDto studentDormitoryDto) {
|
||||
|
||||
Reference in New Issue
Block a user