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
a99065ca
Commit
a99065ca
authored
Apr 02, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付方式bug
parent
5cff936b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
AdministratorServiceImpl.java
...ackend/account/service/impl/AdministratorServiceImpl.java
+6
-4
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+1
-1
No files found.
src/main/java/com/edgec/browserbackend/account/service/impl/AdministratorServiceImpl.java
View file @
a99065ca
...
@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
...
@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -23,6 +24,7 @@ import java.util.ArrayList;
...
@@ -23,6 +24,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.StringTokenizer
;
import
java.util.StringTokenizer
;
import
java.util.stream.DoubleStream
;
@Service
@Service
...
@@ -105,6 +107,7 @@ public class AdministratorServiceImpl implements AdministratorService {
...
@@ -105,6 +107,7 @@ public class AdministratorServiceImpl implements AdministratorService {
List
<
UserPrePaidBilling
>
userBillingList
=
userPrePaidBillingRepository
.
findByUsername
(
name
);
List
<
UserPrePaidBilling
>
userBillingList
=
userPrePaidBillingRepository
.
findByUsername
(
name
);
if
(
userBillingList
==
null
)
if
(
userBillingList
==
null
)
throw
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
,
"Username does not exist: "
+
name
);
throw
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
,
"Username does not exist: "
+
name
);
double
total
=
userBillingList
.
stream
().
mapToDouble
(
UserPrePaidBilling:
:
getTotal
).
sum
();
return
userBillingList
;
return
userBillingList
;
}
}
...
@@ -146,10 +149,9 @@ public class AdministratorServiceImpl implements AdministratorService {
...
@@ -146,10 +149,9 @@ public class AdministratorServiceImpl implements AdministratorService {
@Override
@Override
public
Page
<
UserPrePaidBilling
>
searchAllUserBillingPage
(
int
page
,
int
year1
,
int
year2
,
int
month1
,
int
month2
)
{
public
Page
<
UserPrePaidBilling
>
searchAllUserBillingPage
(
int
page
,
int
year1
,
int
year2
,
int
month1
,
int
month2
)
{
// Pageable pageable = new PageRequest(page, 15);
Pageable
pageable
=
PageRequest
.
of
(
page
,
15
);
// Page<UserPrePaidBilling> userPrePaidBillings = userPrePaidBillingRepository.findAllByYearBetweenAndMonthBetween(pageable, year1, year2, month1, month2);
Page
<
UserPrePaidBilling
>
userPrePaidBillings
=
userPrePaidBillingRepository
.
findAllByYearBetweenAndMonthBetween
(
pageable
,
year1
,
year2
,
month1
,
month2
);
// return userPrePaidBillings;
return
userPrePaidBillings
;
return
null
;
}
}
@Override
@Override
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
a99065ca
...
@@ -155,7 +155,7 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -155,7 +155,7 @@ public class IpResourceServiceImpl implements IpResourceService {
ipChargeRequestDto
.
setRegion
(
request
.
getRegion
());
ipChargeRequestDto
.
setRegion
(
request
.
getRegion
());
ipChargeRequestDto
.
setPeriod
(
request
.
getPeriod
());
ipChargeRequestDto
.
setPeriod
(
request
.
getPeriod
());
ipChargeRequestDto
.
setUnit
(
request
.
getUnit
());
ipChargeRequestDto
.
setUnit
(
request
.
getUnit
());
ipChargeRequestDto
.
setPayMethod
(
0
);
ipChargeRequestDto
.
setPayMethod
(
payMethod
);
return
ipChargeRequestDto
;
return
ipChargeRequestDto
;
}
}
...
...
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