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
1bce4436
Commit
1bce4436
authored
Mar 31, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
子用户bug
parent
31ca06df
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
27 deletions
+8
-27
AccountController.java
.../browserbackend/account/controller/AccountController.java
+0
-1
CompanyAuthorize.java
...edgec/browserbackend/account/domain/CompanyAuthorize.java
+0
-10
CompanyAuthorizeDto.java
...edgec/browserbackend/account/dto/CompanyAuthorizeDto.java
+0
-10
AccountServiceImpl.java
...owserbackend/account/service/impl/AccountServiceImpl.java
+5
-6
BrowserTask.java
...va/com/edgec/browserbackend/browser/task/BrowserTask.java
+3
-0
No files found.
src/main/java/com/edgec/browserbackend/account/controller/AccountController.java
View file @
1bce4436
...
@@ -431,7 +431,6 @@ public class AccountController {
...
@@ -431,7 +431,6 @@ public class AccountController {
throw
new
ClientRequestException
(
BrowserErrorCode
.
INFORMATIONNOTCOMPELETE
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
INFORMATIONNOTCOMPELETE
);
companyAuthorizeDto
.
setCoporationLicense_front
(
coporationLicense_front
);
companyAuthorizeDto
.
setCoporationLicense_front
(
coporationLicense_front
);
companyAuthorizeDto
.
setCoporationLicense_back
(
coporationLicense_back
);
companyAuthorizeDto
.
setCoporationLicense_back
(
coporationLicense_back
);
companyAuthorizeDto
.
setRealController
(
realController
);
companyAuthorizeDto
.
setWritePerson
(
writePerson
);
companyAuthorizeDto
.
setWritePerson
(
writePerson
);
if
(
writePerson
==
1
&&
(
agency_back
==
null
||
agency_back
==
null
))
if
(
writePerson
==
1
&&
(
agency_back
==
null
||
agency_back
==
null
))
throw
new
ClientRequestException
(
BrowserErrorCode
.
INFORMATIONNOTCOMPELETE
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
INFORMATIONNOTCOMPELETE
);
...
...
src/main/java/com/edgec/browserbackend/account/domain/CompanyAuthorize.java
View file @
1bce4436
...
@@ -17,7 +17,6 @@ public class CompanyAuthorize {
...
@@ -17,7 +17,6 @@ public class CompanyAuthorize {
private
String
coporationPlace
;
private
String
coporationPlace
;
private
String
coporationLicenseFront
;
private
String
coporationLicenseFront
;
private
String
coporationLicenseBack
;
private
String
coporationLicenseBack
;
private
int
realController
;
//0 -- 法定代表人, 1 -- 非法定代表人
private
int
writePerson
;
//0 -- 法定代表人, 1 -- 代理人
private
int
writePerson
;
//0 -- 法定代表人, 1 -- 代理人
private
String
agencyFront
;
private
String
agencyFront
;
...
@@ -35,7 +34,6 @@ public class CompanyAuthorize {
...
@@ -35,7 +34,6 @@ public class CompanyAuthorize {
this
.
companyName
=
companyAuthorizeDto
.
getCompanyName
();
this
.
companyName
=
companyAuthorizeDto
.
getCompanyName
();
if
(
companyAuthorizeDto
.
getRegisterNumber
()
!=
null
)
if
(
companyAuthorizeDto
.
getRegisterNumber
()
!=
null
)
this
.
registerNumber
=
companyAuthorizeDto
.
getRegisterNumber
();
this
.
registerNumber
=
companyAuthorizeDto
.
getRegisterNumber
();
this
.
realController
=
companyAuthorizeDto
.
getRealController
();
this
.
writePerson
=
companyAuthorizeDto
.
getWritePerson
();
this
.
writePerson
=
companyAuthorizeDto
.
getWritePerson
();
}
}
...
@@ -71,11 +69,6 @@ public class CompanyAuthorize {
...
@@ -71,11 +69,6 @@ public class CompanyAuthorize {
this
.
companyName
=
companyName
;
this
.
companyName
=
companyName
;
}
}
public
int
getRealController
()
{
return
realController
;
}
public
int
getWritePerson
()
{
public
int
getWritePerson
()
{
return
writePerson
;
return
writePerson
;
}
}
...
@@ -89,9 +82,6 @@ public class CompanyAuthorize {
...
@@ -89,9 +82,6 @@ public class CompanyAuthorize {
return
coporationPlace
;
return
coporationPlace
;
}
}
public
void
setRealController
(
int
realController
)
{
this
.
realController
=
realController
;
}
public
void
setRegisterNumber
(
String
registerNumber
)
{
public
void
setRegisterNumber
(
String
registerNumber
)
{
this
.
registerNumber
=
registerNumber
;
this
.
registerNumber
=
registerNumber
;
...
...
src/main/java/com/edgec/browserbackend/account/dto/CompanyAuthorizeDto.java
View file @
1bce4436
...
@@ -16,7 +16,6 @@ public class CompanyAuthorizeDto {
...
@@ -16,7 +16,6 @@ public class CompanyAuthorizeDto {
private
String
coporationPlace
;
private
String
coporationPlace
;
private
MultipartFile
coporationLicense_front
;
private
MultipartFile
coporationLicense_front
;
private
MultipartFile
coporationLicense_back
;
private
MultipartFile
coporationLicense_back
;
private
int
realController
;
//0 -- 法定代表人, 1 -- 非法定代表人
private
int
writePerson
;
//0 -- 法定代表人, 1 -- 代理人
private
int
writePerson
;
//0 -- 法定代表人, 1 -- 代理人
private
MultipartFile
agency_front
;
private
MultipartFile
agency_front
;
...
@@ -34,7 +33,6 @@ public class CompanyAuthorizeDto {
...
@@ -34,7 +33,6 @@ public class CompanyAuthorizeDto {
this
.
companyName
=
companyAuthorize
.
getCompanyName
();
this
.
companyName
=
companyAuthorize
.
getCompanyName
();
if
(
companyAuthorize
.
getRegisterNumber
()
!=
null
)
if
(
companyAuthorize
.
getRegisterNumber
()
!=
null
)
this
.
registerNumber
=
companyAuthorize
.
getRegisterNumber
();
this
.
registerNumber
=
companyAuthorize
.
getRegisterNumber
();
this
.
realController
=
companyAuthorize
.
getRealController
();
this
.
writePerson
=
companyAuthorize
.
getWritePerson
();
this
.
writePerson
=
companyAuthorize
.
getWritePerson
();
}
}
...
@@ -70,10 +68,6 @@ public class CompanyAuthorizeDto {
...
@@ -70,10 +68,6 @@ public class CompanyAuthorizeDto {
return
coporationPlace
;
return
coporationPlace
;
}
}
public
void
setRealController
(
int
realController
)
{
this
.
realController
=
realController
;
}
public
void
setCoporationPlace
(
String
coporationPlace
)
{
public
void
setCoporationPlace
(
String
coporationPlace
)
{
this
.
coporationPlace
=
coporationPlace
;
this
.
coporationPlace
=
coporationPlace
;
}
}
...
@@ -82,10 +76,6 @@ public class CompanyAuthorizeDto {
...
@@ -82,10 +76,6 @@ public class CompanyAuthorizeDto {
return
writePerson
;
return
writePerson
;
}
}
public
int
getRealController
()
{
return
realController
;
}
public
int
getType
()
{
public
int
getType
()
{
return
type
;
return
type
;
}
}
...
...
src/main/java/com/edgec/browserbackend/account/service/impl/AccountServiceImpl.java
View file @
1bce4436
...
@@ -712,10 +712,12 @@ public class AccountServiceImpl implements AccountService {
...
@@ -712,10 +712,12 @@ public class AccountServiceImpl implements AccountService {
User
authUser
=
new
User
();
User
authUser
=
new
User
();
authUser
.
setUsername
(
user
.
getName
());
authUser
.
setUsername
(
user
.
getName
());
String
password
;
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
subUsersRequestDto
.
getPassword
()))
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
subUsersRequestDto
.
getPassword
()))
authUser
.
setPassword
(
subUsersRequestDto
.
getPassword
()
);
password
=
subUsersRequestDto
.
getPassword
(
);
else
else
authUser
.
setPassword
(
makeRandomPassword
(
8
));
password
=
makeRandomPassword
(
8
);
authUser
.
setPassword
(
password
);
authUser
.
setPhone
(
existing
.
getPhoneNumber
());
authUser
.
setPhone
(
existing
.
getPhoneNumber
());
authUser
.
setEnabled
(
true
);
authUser
.
setEnabled
(
true
);
if
(
subUsersRequestDto
.
getPermission
()
!=
-
1
)
if
(
subUsersRequestDto
.
getPermission
()
!=
-
1
)
...
@@ -738,10 +740,7 @@ public class AccountServiceImpl implements AccountService {
...
@@ -738,10 +740,7 @@ public class AccountServiceImpl implements AccountService {
if
(
user
.
getWhiteList
()
!=
null
&&
user
.
getWhiteList
().
size
()
>
0
)
if
(
user
.
getWhiteList
()
!=
null
&&
user
.
getWhiteList
().
size
()
>
0
)
whiteList
.
addAll
(
user
.
getWhiteList
());
whiteList
.
addAll
(
user
.
getWhiteList
());
account
.
setWhiteList
(
whiteList
);
account
.
setWhiteList
(
whiteList
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
subUsersRequestDto
.
getPassword
()))
account
.
setPassword
(
password
);
account
.
setPassword
(
subUsersRequestDto
.
getPassword
());
else
account
.
setPassword
(
makeRandomPassword
(
8
));
repository
.
save
(
account
);
repository
.
save
(
account
);
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
...
...
src/main/java/com/edgec/browserbackend/browser/task/BrowserTask.java
View file @
1bce4436
...
@@ -121,6 +121,7 @@ public class BrowserTask {
...
@@ -121,6 +121,7 @@ public class BrowserTask {
if
(
StringUtils
.
isNotBlank
(
ipBuyResultDto
.
getErrorCode
()))
{
if
(
StringUtils
.
isNotBlank
(
ipBuyResultDto
.
getErrorCode
()))
{
log
.
error
(
"fail to buy ip"
);
log
.
error
(
"fail to buy ip"
);
log
.
error
(
ipBuyResultDto
.
getErrorCode
());
log
.
error
(
ipBuyResultDto
.
getErrorCode
());
result
.
set
(
false
);
}
}
if
(
ipBuyResultDto
!=
null
&&
ipBuyResultDto
.
getIplist
()
!=
null
&&
ipBuyResultDto
.
getIplist
().
size
()
>=
1
)
{
if
(
ipBuyResultDto
!=
null
&&
ipBuyResultDto
.
getIplist
()
!=
null
&&
ipBuyResultDto
.
getIplist
().
size
()
>=
1
)
{
AtomicInteger
index
=
new
AtomicInteger
();
AtomicInteger
index
=
new
AtomicInteger
();
...
@@ -132,6 +133,7 @@ public class BrowserTask {
...
@@ -132,6 +133,7 @@ public class BrowserTask {
ipResourceRepository
.
save
(
ipResource
);
ipResourceRepository
.
save
(
ipResource
);
}
else
{
}
else
{
log
.
error
(
"no ipResource"
);
log
.
error
(
"no ipResource"
);
result
.
set
(
false
);
}
}
index
.
getAndIncrement
();
index
.
getAndIncrement
();
});
});
...
@@ -141,6 +143,7 @@ public class BrowserTask {
...
@@ -141,6 +143,7 @@ public class BrowserTask {
result
.
set
(
true
);
result
.
set
(
true
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
result
.
set
(
false
);
}
}
if
(
result
.
get
()
==
false
&&
(
ipResource
.
getPurchasedTime
()
<
Instant
.
now
().
minusSeconds
(
7200
).
toEpochMilli
()))
{
if
(
result
.
get
()
==
false
&&
(
ipResource
.
getPurchasedTime
()
<
Instant
.
now
().
minusSeconds
(
7200
).
toEpochMilli
()))
{
IpChargeRequestDto
ipChargeRequestDto
=
buildIpChargeRequestDto
(
ipResource
,
3
,
0
);
IpChargeRequestDto
ipChargeRequestDto
=
buildIpChargeRequestDto
(
ipResource
,
3
,
0
);
...
...
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