|
|
|
@ -507,6 +507,7 @@ public class SysUserController { |
|
|
|
|
try { |
|
|
|
|
List<SysUser> listSysUsers = ExcelImportUtil.importExcel(file.getInputStream(), SysUser.class, params); |
|
|
|
|
for (int i = 0; i < listSysUsers.size(); i++) { |
|
|
|
|
SysUserRole sysUserRole = new SysUserRole(); |
|
|
|
|
SysUser sysUserExcel = listSysUsers.get(i); |
|
|
|
|
if (StringUtils.isBlank(sysUserExcel.getPassword())) { |
|
|
|
|
// 密码默认为 “123456”
|
|
|
|
@ -523,6 +524,9 @@ public class SysUserController { |
|
|
|
|
if (sysUserExcel.getJuese().equals("学生")) { |
|
|
|
|
sysUserExcel.setDelFlag(0); |
|
|
|
|
sysUserService.save(sysUserExcel); |
|
|
|
|
sysUserRole.setUserId(sysUserExcel.getId()); |
|
|
|
|
sysUserRole.setRoleId("1724327596426760194"); |
|
|
|
|
sysUserRoleService.save(sysUserRole); |
|
|
|
|
} else { |
|
|
|
|
errorMessage.add("第 " + i + 1 + " 行:目前仅允许导入学生身份的用户,其他身份请手动导入"); |
|
|
|
|
} |
|
|
|
|