|
|
@ -22,7 +22,6 @@ import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.AccountExportModel;
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.AccountExportModel;
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.UserExportModel;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
@ -39,7 +38,6 @@ import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
@ -56,14 +54,10 @@ import java.io.DataInputStream;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
|
|
import static java.util.stream.Collectors.toCollection;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Description : 系统用户操作服务
|
|
|
|
* @Description : 系统用户操作服务
|
|
|
|
* @Reference :
|
|
|
|
* @Reference :
|
|
|
@ -569,8 +563,10 @@ public class SysUserController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String password = RandomStringUtils.random(6, true, false);
|
|
|
|
String password = RandomStringUtils.random(6, true, false);
|
|
|
|
userPasswordService.updatePasswordResetLastModifyTime(user.getId(), password);
|
|
|
|
//随机生成密码的不检验密码的长度、复杂等信息
|
|
|
|
|
|
|
|
userPasswordService.updatePasswordResetLastModifyTime(user.getId(), password, false);
|
|
|
|
|
|
|
|
//重置成随机密码会让用户首次登录修改密码
|
|
|
|
|
|
|
|
sysUserService.updateUserLoginNum(user.getId(),0);
|
|
|
|
String content = "系统提示:\n" +
|
|
|
|
String content = "系统提示:\n" +
|
|
|
|
"\t" + getSessionUser().getUserName() + "使用密码重置功能帮您重置了【" + user.getUserLoginName() + "】账号的密码," +
|
|
|
|
"\t" + getSessionUser().getUserName() + "使用密码重置功能帮您重置了【" + user.getUserLoginName() + "】账号的密码," +
|
|
|
|
"新密码是:" + password + "";
|
|
|
|
"新密码是:" + password + "";
|
|
|
@ -622,7 +618,7 @@ public class SysUserController extends CoreBaseController {
|
|
|
|
Integer num = personnelService.checkSysUserResetPassword(user);
|
|
|
|
Integer num = personnelService.checkSysUserResetPassword(user);
|
|
|
|
num = CommonConstWords.CONFIG_PWD_RESET_PASSWORD_DEFAULT - num;
|
|
|
|
num = CommonConstWords.CONFIG_PWD_RESET_PASSWORD_DEFAULT - num;
|
|
|
|
|
|
|
|
|
|
|
|
userPasswordService.updatePasswordResetLastModifyTime(user.getId(), password);
|
|
|
|
userPasswordService.updatePasswordResetLastModifyTime(user.getId(), password, true);
|
|
|
|
LOGGER.info("系统提示:{} 使用密码重置功能帮{}重置了{}账号的密码,新密码是:{}",
|
|
|
|
LOGGER.info("系统提示:{} 使用密码重置功能帮{}重置了{}账号的密码,新密码是:{}",
|
|
|
|
getSessionUser().getUserName(), user.getUserName(), user.getUserLoginName(), password);
|
|
|
|
getSessionUser().getUserName(), user.getUserName(), user.getUserLoginName(), password);
|
|
|
|
|
|
|
|
|
|
|
|