Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a265c758
authored
Oct 30, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修复bug
parent
40ea5954
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
View file @
a265c758
...
@@ -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
());
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
View file @
a265c758
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment