Commit a265c758 by huangjy

fix:修复bug

parent 40ea5954
...@@ -1147,7 +1147,7 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser> ...@@ -1147,7 +1147,7 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
List<PlatUserRole> platUserRoles = new ArrayList<>(); List<PlatUserRole> platUserRoles = new ArrayList<>();
platUserImportDTOS.forEach(vo -> { platUserImportDTOS.forEach(vo -> {
PlatUser platUser = BeanDtoVoUtils.convert(vo, PlatUser.class); 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.setStatus(CommonEnum.YES.getValue());
platUser.setTenantId(TenantIdUtil.getTenantId()); platUser.setTenantId(TenantIdUtil.getTenantId());
platUser.setAccount(platUser.getMobile()); platUser.setAccount(platUser.getMobile());
......
...@@ -503,6 +503,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -503,6 +503,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
PlatSpaceImportDTO item = list.get(i); PlatSpaceImportDTO item = list.get(i);
String spacePath = null; String spacePath = null;
PlatOrg org = platOrgService.getById(orgId);
//第一层级 //第一层级
String firstId = null; String firstId = null;
if (!firstSpaceNameMap.containsKey(item.getCommunity())) { if (!firstSpaceNameMap.containsKey(item.getCommunity())) {
...@@ -510,7 +511,6 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -510,7 +511,6 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setName(item.getCommunity()); platSpace.setName(item.getCommunity());
platSpace.setType(PlatSpaceEnum.TypeEnum.COMMUNITY.getValue()); platSpace.setType(PlatSpaceEnum.TypeEnum.COMMUNITY.getValue());
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
PlatOrg org = platOrgService.getById(orgId);
if (org != null) { if (org != null) {
platSpace.setAttribute(org.getType()); platSpace.setAttribute(org.getType());
} }
...@@ -544,6 +544,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -544,6 +544,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
platSpace.setParentId(firstId); platSpace.setParentId(firstId);
platSpace.setParentPath(firstId); platSpace.setParentPath(firstId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
save(platSpace); save(platSpace);
childrenIdMap.put(secondKey, platSpace.getId()); childrenIdMap.put(secondKey, platSpace.getId());
secondId = platSpace.getId(); secondId = platSpace.getId();
...@@ -573,6 +576,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -573,6 +576,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
platSpace.setParentId(secondId); platSpace.setParentId(secondId);
platSpace.setParentPath(firstId + "," + secondId); platSpace.setParentPath(firstId + "," + secondId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
save(platSpace); save(platSpace);
childrenIdMap.put(threeKey, platSpace.getId()); childrenIdMap.put(threeKey, platSpace.getId());
threeId = platSpace.getId(); threeId = platSpace.getId();
...@@ -600,6 +606,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -600,6 +606,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setName(item.getFloor()); platSpace.setName(item.getFloor());
platSpace.setType(PlatSpaceEnum.TypeEnum.FLOOR.getValue()); platSpace.setType(PlatSpaceEnum.TypeEnum.FLOOR.getValue());
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
platSpace.setParentId(threeId); platSpace.setParentId(threeId);
platSpace.setParentPath(firstId + "," + secondId + "," + threeId); platSpace.setParentPath(firstId + "," + secondId + "," + threeId);
save(platSpace); 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