Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
browser-backend
Commits
3d6d996f
Commit
3d6d996f
authored
Apr 11, 2020
by
jim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pom
parent
3f870445
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
AccountServiceImpl.java
...owserbackend/account/service/impl/AccountServiceImpl.java
+5
-4
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/AccountServiceImpl.java
View file @
3d6d996f
...
...
@@ -340,6 +340,7 @@ public class AccountServiceImpl implements AccountService {
resultDto
.
setStatus
(
0
);
resultDto
.
setData
(
current
);
}
catch
(
Exception
e
)
{
log
.
error
(
"eeee"
,
e
);
resultDto
.
setStatus
(-
1
);
Map
<
String
,
Object
>
statusInfo
=
new
HashMap
<>();
statusInfo
.
put
(
"code"
,
AccountErrorCode
.
NAMENOTEXIST
);
...
...
@@ -448,7 +449,7 @@ public class AccountServiceImpl implements AccountService {
if
(
StringUtils
.
isEmpty
(
parentName
))
{
account
.
setAllowedToCreateSubUser
(
true
);
account
.
setPermission
(
Integer
.
valueOf
(
"1111"
,
2
));
account
.
setPermission
(
Integer
.
valueOf
(
"1111"
,
2
));
}
else
{
account
.
setAllowedToCreateSubUser
(
user
.
isAllowedToCreateSubUser
());
account
.
setPermission
(
user
.
getPermission
());
...
...
@@ -541,7 +542,7 @@ public class AccountServiceImpl implements AccountService {
subUserPageResultDto
.
setUserList
(
subUsersDtoList
);
PageInfo
pageInfo
=
new
PageInfo
();
pageInfo
.
setTotalItems
((
int
)
accounts
.
getTotalElements
());
pageInfo
.
setTotalItems
((
int
)
accounts
.
getTotalElements
());
pageInfo
.
setCurrentPage
(
accounts
.
getNumber
());
pageInfo
.
setTotalPages
(
accounts
.
getTotalPages
());
subUserPageResultDto
.
setUserPage
(
pageInfo
);
...
...
@@ -601,7 +602,7 @@ public class AccountServiceImpl implements AccountService {
return
account
;
}
public
static
String
makeRandomPassword
(
int
len
){
public
static
String
makeRandomPassword
(
int
len
)
{
char
charr
[]
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@$%^&*.?"
.
toCharArray
();
StringBuilder
sb
=
new
StringBuilder
();
Random
r
=
new
Random
();
...
...
@@ -685,7 +686,7 @@ public class AccountServiceImpl implements AccountService {
@Override
public
void
saveSubUsers
(
String
name
,
SubUsersRequestDto
subUsersRequestDto
)
{
for
(
String
username:
subUsersRequestDto
.
getUsernames
())
{
for
(
String
username
:
subUsersRequestDto
.
getUsernames
())
{
Account
childAccount
=
repository
.
findByName
(
username
);
if
(
childAccount
==
null
||
!
name
.
equals
(
childAccount
.
getParent
()))
{
throw
new
ClientRequestException
(
AccountErrorCode
.
UNKNOWN
,
"Invalid Request"
);
...
...
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