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
6d404617
Commit
6d404617
authored
Apr 14, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
840e792f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
20 deletions
+16
-20
AdministratorServiceImpl.java
...ackend/account/service/impl/AdministratorServiceImpl.java
+14
-12
PaymentServiceImpl.java
...owserbackend/account/service/impl/PaymentServiceImpl.java
+0
-1
BrowserTask.java
...va/com/edgec/browserbackend/browser/task/BrowserTask.java
+1
-1
ThreadPoolUtils.java
...om/edgec/browserbackend/common/utils/ThreadPoolUtils.java
+1
-6
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/AdministratorServiceImpl.java
View file @
6d404617
...
...
@@ -142,19 +142,21 @@ public class AdministratorServiceImpl implements AdministratorService {
double
childbalanceused
=
0
;
if
(
account
.
getParent
()
==
null
)
{
List
<
Account
>
children
=
accountRepository
.
findByParent
(
account
.
getName
());
for
(
Account
child
:
children
)
{
List
<
UserPrePaidBilling
>
userPrePaidBillings_child
=
userPrePaidBillingRepository
.
findByUsernameAndPayMethodIn
(
child
.
getName
(),
Arrays
.
asList
(
1
,
2
));
if
(
userPrePaidBillings_child
!=
null
)
childexpense
+=
userPrePaidBillings_child
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
childwithdrawn
+=
child
.
getPromotion
().
getWithdrawn
();
UserBalance
userBalance_child
=
userBalanceRepository
.
findById
(
child
.
getName
()).
orElse
(
null
);
if
(
userBalance_child
!=
null
)
{
childbalanced
+=
userBalance_child
.
getBalanced
();
childbalanceused
+=
userBalance_child
.
getUsed
();
if
(
children
!=
null
&&
children
.
size
()
>
0
)
{
for
(
Account
child
:
children
)
{
List
<
UserPrePaidBilling
>
userPrePaidBillings_child
=
userPrePaidBillingRepository
.
findByUsernameAndPayMethodIn
(
child
.
getName
(),
Arrays
.
asList
(
1
,
2
));
if
(
userPrePaidBillings_child
!=
null
)
childexpense
+=
userPrePaidBillings_child
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
childwithdrawn
+=
child
.
getPromotion
().
getWithdrawn
();
UserBalance
userBalance_child
=
userBalanceRepository
.
findById
(
child
.
getName
()).
orElse
(
null
);
if
(
userBalance_child
!=
null
)
{
childbalanced
+=
userBalance_child
.
getBalanced
();
childbalanceused
+=
userBalance_child
.
getUsed
();
}
List
<
UserPrePaidBilling
>
userPrePaidBillings1_child
=
userPrePaidBillingRepository
.
findByUsernameAndPayMethod
(
child
.
getName
(),
3
);
if
(
userPrePaidBillings1_child
!=
null
)
childbanktransfer
+=
userPrePaidBillings1_child
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
}
List
<
UserPrePaidBilling
>
userPrePaidBillings1_child
=
userPrePaidBillingRepository
.
findByUsernameAndPayMethod
(
child
.
getName
(),
3
);
if
(
userPrePaidBillings1_child
!=
null
)
childbanktransfer
+=
userPrePaidBillings1_child
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
}
}
...
...
src/main/java/com/edgec/browserbackend/account/service/impl/PaymentServiceImpl.java
View file @
6d404617
...
...
@@ -404,7 +404,6 @@ public class PaymentServiceImpl implements PaymentService {
internalOrder
.
setTransId
(
response
.
getTradeNo
());
userPaymentRepository
.
save
(
internalOrder
);
log
.
error
(
response
.
getBody
());
String
form
=
response
.
getBody
();
return
form
;
...
...
src/main/java/com/edgec/browserbackend/browser/task/BrowserTask.java
View file @
6d404617
...
...
@@ -181,7 +181,7 @@ public class BrowserTask {
HttpMethod
.
GET
,
entity
,
IpInfoResultDto
.
class
,
"browser"
,
ipResource
.
getAddr
());
IpInfoResultDto
ipInfoResultDto
=
result
.
getBody
();
if
(
ipInfoResultDto
!=
null
&&
StringUtils
.
isBlank
(
ipInfoResultDto
.
getErrorCode
()))
{
if
(
ipInfoResultDto
.
getStatus
().
equals
(
"Running"
))
{
if
(
ipInfoResultDto
.
getStatus
()
!=
null
&&
ipInfoResultDto
.
getStatus
()
.
equals
(
"Running"
))
{
ipResource
.
setStatus
(
0
);
ipResourceRepository
.
save
(
ipResource
);
}
...
...
src/main/java/com/edgec/browserbackend/common/utils/ThreadPoolUtils.java
View file @
6d404617
...
...
@@ -11,11 +11,6 @@ public abstract class ThreadPoolUtils {
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ThreadPoolUtils
.
class
);
private
static
final
int
SCHEDULER_POOL_COUNT
=
50
;
public
static
final
int
MAX_WAITING_TASKS
=
10
;
public
static
final
BlockingQueue
<
Runnable
>
schedulerQueue
=
new
UniquePriorityBlockingQueue
<>(
50
);
...
...
@@ -33,7 +28,7 @@ public abstract class ThreadPoolUtils {
private
static
final
int
TIME_SCHEDULER_POOL_COUNT
=
20
;
public
static
final
ScheduledExecutorService
queryIpTasksPool
=
Executors
.
newSchedul
edThreadPool
(
TIME_SCHEDULER_POOL_COUNT
,
new
ThreadFactory
()
{
public
static
final
ExecutorService
queryIpTasksPool
=
Executors
.
newFix
edThreadPool
(
TIME_SCHEDULER_POOL_COUNT
,
new
ThreadFactory
()
{
int
count
=
1
;
@Override
...
...
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