|
@@ -194,21 +194,15 @@ public class UserController {
|
|
|
@PreAuthorize("@ss.hasPermission('system:user:deptTeacherList')")
|
|
|
public CommonResult<PageResult<UserRespVO>> getTeacherPageForTeacher(@Valid UserPageReqVO pageReqVO) {
|
|
|
|
|
|
- // 获得用户分页列表
|
|
|
- Long deptId =SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
- if (deptId!=null && deptId!=0) {
|
|
|
- PageResult<AdminUserDO> pageResult = userService.getTeacherPageForTeacher(pageReqVO);
|
|
|
- if (CollUtil.isEmpty(pageResult.getList())) {
|
|
|
- return success(new PageResult<>(pageResult.getTotal()));
|
|
|
- }
|
|
|
- // 拼接数据
|
|
|
- Map<Long, DeptDO> deptMap = deptService.getDeptMap(
|
|
|
- convertList(pageResult.getList(), AdminUserDO::getDeptId));
|
|
|
- return success(new PageResult<>(UserConvert.INSTANCE.convertList(pageResult.getList(), deptMap),
|
|
|
- pageResult.getTotal()));
|
|
|
- }else {
|
|
|
- return null;
|
|
|
+ PageResult<AdminUserDO> pageResult = userService.getTeacherPageForTeacher(pageReqVO);
|
|
|
+ if (CollUtil.isEmpty(pageResult.getList())) {
|
|
|
+ return success(new PageResult<>(pageResult.getTotal()));
|
|
|
}
|
|
|
+ // 拼接数据
|
|
|
+ Map<Long, DeptDO> deptMap = deptService.getDeptMap(
|
|
|
+ convertList(pageResult.getList(), AdminUserDO::getDeptId));
|
|
|
+ return success(new PageResult<>(UserConvert.INSTANCE.convertList(pageResult.getList(), deptMap),
|
|
|
+ pageResult.getTotal()));
|
|
|
}
|
|
|
|
|
|
//lsq
|
|
@@ -237,12 +231,7 @@ public class UserController {
|
|
|
@PreAuthorize("@ss.hasPermission('system:user:teacherGetstudentList')")
|
|
|
public CommonResult<PageResult<UserRespVO>> getUserPageForTeacher(@Valid UserPageReqVO pageReqVO) {
|
|
|
// 获得用户分页列表
|
|
|
- Long loginId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
- Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
|
|
- Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(loginId);
|
|
|
- if (roleIds.contains(113L)&&(deptId==null||deptId==0)){
|
|
|
- return null;
|
|
|
- }
|
|
|
+
|
|
|
PageResult<AdminUserDO> pageResult = userService.getUserPageForTeacher(pageReqVO);
|
|
|
if (CollUtil.isEmpty(pageResult.getList())) {
|
|
|
return success(new PageResult<>(pageResult.getTotal()));
|
|
@@ -622,8 +611,8 @@ public class UserController {
|
|
|
//更新导师的
|
|
|
List<Long> supervisorIds = project.getSupervisorIds();
|
|
|
UserSaveReqVO saveReqVO =new UserSaveReqVO();
|
|
|
- UserPageReqVO studentVo =new UserPageReqVO();
|
|
|
- studentVo.setGrade(project.getStudentGrade());
|
|
|
+ UserPageReqVO studentVO =new UserPageReqVO();
|
|
|
+ studentVO.setGrade(project.getStudentGrade());
|
|
|
if (supervisorIds!=null&&!supervisorIds.isEmpty()){
|
|
|
for (Long supervisorId : supervisorIds){
|
|
|
saveReqVO.setId(supervisorId);
|
|
@@ -634,7 +623,7 @@ public class UserController {
|
|
|
}
|
|
|
}
|
|
|
//更新学生
|
|
|
- List<AdminUserDO> studentList = userService.getUserList1(studentVo);
|
|
|
+ List<AdminUserDO> studentList = userService.getUserList1(studentVO);
|
|
|
if (PD.getIsStudent()!=null&&studentList!=null&&!studentList.isEmpty()){
|
|
|
saveReqVO =new UserSaveReqVO();
|
|
|
for (AdminUserDO student :studentList){
|