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
e8fb276a
Commit
e8fb276a
authored
Mar 30, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
子用户bug
parent
13ddf354
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
AccountServiceImpl.java
...owserbackend/account/service/impl/AccountServiceImpl.java
+9
-9
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/AccountServiceImpl.java
View file @
e8fb276a
...
@@ -690,19 +690,18 @@ public class AccountServiceImpl implements AccountService {
...
@@ -690,19 +690,18 @@ public class AccountServiceImpl implements AccountService {
throw
new
ClientRequestException
(
AccountErrorCode
.
CHILDMAX
,
"account cannot have more children"
);
throw
new
ClientRequestException
(
AccountErrorCode
.
CHILDMAX
,
"account cannot have more children"
);
}
}
int
nameNumber
=
existing
.
getChildCount
();
int
count
=
existing
.
getChildCount
();
int
time
=
subUsersRequestDto
.
getAmount
();
int
time
=
subUsersRequestDto
.
getAmount
();
for
(
int
i
=
0
;
i
<
time
;
i
++)
{
for
(
int
i
=
0
;
i
<
time
;
i
++)
{
if
(
nameNumber
>=
1000
)
if
(
count
>=
1000
)
throw
new
ClientRequestException
(
AccountErrorCode
.
CHILDMAX
,
"account cannot have more children"
);
throw
new
ClientRequestException
(
AccountErrorCode
.
CHILDMAX
,
"account cannot have more children"
);
AccountDto
user
=
new
AccountDto
();
AccountDto
user
=
new
AccountDto
();
nameNumber
++;
if
(
i
<
10
)
if
(
nameNumber
<
10
)
user
.
setName
(
existing
.
getName
()
+
"00"
+
i
);
user
.
setName
(
existing
.
getName
()
+
"00"
+
nameNumber
);
else
if
(
i
<
100
)
else
if
(
nameNumber
<
100
)
user
.
setName
(
existing
.
getName
()
+
"0"
+
i
);
user
.
setName
(
existing
.
getName
()
+
"0"
+
nameNumber
);
else
else
user
.
setName
(
existing
.
getName
()
+
nameNumber
);
user
.
setName
(
existing
.
getName
()
+
i
);
Account
child
=
repository
.
findByName
(
user
.
getName
());
Account
child
=
repository
.
findByName
(
user
.
getName
());
if
(
child
!=
null
)
{
if
(
child
!=
null
)
{
...
@@ -746,9 +745,10 @@ public class AccountServiceImpl implements AccountService {
...
@@ -746,9 +745,10 @@ public class AccountServiceImpl implements AccountService {
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
log
.
info
(
"new account has been created: "
+
account
.
getName
());
log
.
info
(
"new account has been created: "
+
account
.
getName
());
count
++;
}
}
existing
.
setChildCount
(
nameNumber
);
existing
.
setChildCount
(
count
);
repository
.
save
(
existing
);
repository
.
save
(
existing
);
}
}
...
...
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