Commit a265c758 by huangjy

fix:修复bug

parent 40ea5954
......@@ -1147,7 +1147,7 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
List<PlatUserRole> platUserRoles = new ArrayList<>();
platUserImportDTOS.forEach(vo -> {
PlatUser platUser = BeanDtoVoUtils.convert(vo, PlatUser.class);
vo.setPassword(PasswordUtils.encryptPassword(vo.getPassword()));
platUser.setPassword(PasswordUtils.encryptPassword(vo.getPassword()));
platUser.setStatus(CommonEnum.YES.getValue());
platUser.setTenantId(TenantIdUtil.getTenantId());
platUser.setAccount(platUser.getMobile());
......
......@@ -503,6 +503,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
PlatSpaceImportDTO item = list.get(i);
String spacePath = null;
PlatOrg org = platOrgService.getById(orgId);
//第一层级
String firstId = null;
if (!firstSpaceNameMap.containsKey(item.getCommunity())) {
......@@ -510,7 +511,6 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setName(item.getCommunity());
platSpace.setType(PlatSpaceEnum.TypeEnum.COMMUNITY.getValue());
platSpace.setOrgId(orgId);
PlatOrg org = platOrgService.getById(orgId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
......@@ -544,6 +544,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setOrgId(orgId);
platSpace.setParentId(firstId);
platSpace.setParentPath(firstId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
save(platSpace);
childrenIdMap.put(secondKey, platSpace.getId());
secondId = platSpace.getId();
......@@ -573,6 +576,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setOrgId(orgId);
platSpace.setParentId(secondId);
platSpace.setParentPath(firstId + "," + secondId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
save(platSpace);
childrenIdMap.put(threeKey, platSpace.getId());
threeId = platSpace.getId();
......@@ -600,6 +606,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setName(item.getFloor());
platSpace.setType(PlatSpaceEnum.TypeEnum.FLOOR.getValue());
platSpace.setOrgId(orgId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
platSpace.setParentId(threeId);
platSpace.setParentPath(firstId + "," + secondId + "," + threeId);
save(platSpace);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment