|
@@ -342,9 +342,9 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
//建立角色
|
|
|
Integer roleId = createRole(tenantInfo);
|
|
|
//密码规则 gym + 随机6位数字
|
|
|
- String pw = new BCryptPasswordEncoder().encode("gym" + (int) ((Math.random() * 9 + 1) * 100000));
|
|
|
+ String pwStr = "gym" + (int) ((Math.random() * 9 + 1) * 100000);
|
|
|
// 创建账号、用户信息、用户和角色关系
|
|
|
- createUser(tenantInfo, orgId, Lists.newArrayList(roleId), pw);
|
|
|
+ createUser(tenantInfo, orgId, Lists.newArrayList(roleId), new BCryptPasswordEncoder().encode(pwStr));
|
|
|
//建立角色和菜单关系数据
|
|
|
Lists.partition(collectMenuId, 50)
|
|
|
.forEach(idList -> employeeService.batchInsertRoleMenu(roleId, idList, tenantId));
|
|
@@ -369,7 +369,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
//释放锁
|
|
|
bucket.delete();
|
|
|
|
|
|
- return pw;
|
|
|
+ return pwStr;
|
|
|
}
|
|
|
|
|
|
//计算过期时间
|