调整初始密码位置

master
RuoYi 6 years ago committed by Limy
parent db507b1624
commit c824e6cefa

@ -22,7 +22,6 @@ import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.base.BaseController; import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
@ -47,9 +46,6 @@ public class SysUserController extends BaseController
@Autowired @Autowired
private ISysPostService postService; private ISysPostService postService;
@Autowired
private ISysConfigService configService;
@Autowired @Autowired
private SysPasswordService passwordService; private SysPasswordService passwordService;
@ -90,8 +86,7 @@ public class SysUserController extends BaseController
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream()); List<SysUser> userList = util.importExcel(file.getInputStream());
String operName = getSysUser().getLoginName(); String operName = getSysUser().getLoginName();
String password = configService.selectConfigByKey("sys.user.initPassword"); String message = userService.importUser(userList, updateSupport, operName);
String message = userService.importUser(userList, updateSupport, operName, password);
return AjaxResult.success(message); return AjaxResult.success(message);
} }

@ -145,8 +145,7 @@ public interface ISysUserService
* @param userList * @param userList
* @param isUpdateSupport * @param isUpdateSupport
* @param operName * @param operName
* @param password
* @return * @return
*/ */
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName, String password); public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
} }

@ -22,6 +22,7 @@ import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserPostMapper; import com.ruoyi.system.mapper.SysUserPostMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper; import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
/** /**
@ -49,6 +50,9 @@ public class SysUserServiceImpl implements ISysUserService
@Autowired @Autowired
private SysUserRoleMapper userRoleMapper; private SysUserRoleMapper userRoleMapper;
@Autowired
private ISysConfigService configService;
/** /**
* *
* *
@ -368,7 +372,7 @@ public class SysUserServiceImpl implements ISysUserService
* @param password * @param password
* @return * @return
*/ */
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName, String password) public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName)
{ {
if (StringUtils.isNull(userList) || userList.size() == 0) if (StringUtils.isNull(userList) || userList.size() == 0)
{ {
@ -378,6 +382,7 @@ public class SysUserServiceImpl implements ISysUserService
int failureNum = 0; int failureNum = 0;
StringBuilder successMsg = new StringBuilder(); StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder(); StringBuilder failureMsg = new StringBuilder();
String password = configService.selectConfigByKey("sys.user.initPassword");
for (SysUser user : userList) for (SysUser user : userList)
{ {
try try

Loading…
Cancel
Save