forked from liweijie/education
1、分页添加默认项,
2、登录名冲突无"复用/认领"机制,教员永久无法开通账号 3、两条对齐路径对"停用教研室"处理不一致
This commit is contained in:
+8
-1
@@ -1,5 +1,6 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.common.core.domain.entity.SysUser;
|
||||
import com.roomroot.common.utils.StringUtils;
|
||||
import com.roomroot.jwgl.dto.faculty.AddTeacherDTO;
|
||||
import com.roomroot.jwgl.dto.jys.ElectiveCourseBatchDTO;
|
||||
@@ -225,7 +226,13 @@ public class JYSController {
|
||||
if (entity == null) {
|
||||
return Result.error("教员不存在:" + jybh);
|
||||
}
|
||||
return Result.success(orgSyncService.ensureTeacherUser(entity, loginName, password, roleId));
|
||||
SysUser user = orgSyncService.ensureTeacherUser(entity, loginName, password, roleId);
|
||||
String expected = StringUtils.hasText(loginName) ? loginName.trim() : jybh;
|
||||
if (!expected.equals(user.getUserName())) {
|
||||
return Result.success("登录名 " + expected + " 已被无关账号占用,已自动改用 "
|
||||
+ user.getUserName(), user.getUserId());
|
||||
}
|
||||
return Result.success(user.getUserId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user