Browse Source

修改发送邮件的密码改为未加密状态

hgw 3 năm trước cách đây
mục cha
commit
1b49fd8d6b

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -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;
     }
 
     //计算过期时间