Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
fb37e524
Commit
fb37e524
authored
Nov 27, 2020
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步流量+不限量套餐判断
parent
b51b89b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+8
-8
No files found.
src/main/java/track/task/TrackingFlowTask.java
View file @
fb37e524
...
...
@@ -14,6 +14,7 @@ import tkio.model.Account;
import
tkio.repository.AccountRepository
;
import
tkio.repository.AppRepository
;
import
tkio.service.AccountFlowRestrictService
;
import
util.Constant
;
import
util.DateUtil
;
import
util.StringUtil
;
...
...
@@ -352,14 +353,13 @@ public class TrackingFlowTask {
//查看历史总消耗流量是否超出
BigDecimal
totalFlow
=
tkioFlowRepository
.
sumFlowByEmailAndContractCode
(
contract
.
getEmail
(),
contract
.
getContractCode
());
totalFlow
=
totalFlow
==
null
?
new
BigDecimal
(
0
):
totalFlow
;
Double
contractTrackFlow
=
contract
.
getTrackFlow
()
*
10000
;
if
(
contractTrackFlow
.
longValue
()-
totalFlow
.
longValue
()-
clickNum
.
longValue
()>=
0
){
tkioFlow
.
setFlow
(
clickNum
.
longValue
());
}
else
{
tkioFlow
.
setFlow
(
contractTrackFlow
.
longValue
()
-
totalFlow
.
longValue
());
tkioFlow
.
setCostFlow
(
clickNum
.
longValue
()-
tkioFlow
.
getFlow
());
}
Double
contractTrackFlow
=
contract
.
getTrackFlow
()
*
10000
;
if
(
contractTrackFlow
.
longValue
()-
totalFlow
.
longValue
()-
clickNum
.
longValue
()>=
0
||
contract
.
getPriceLevel
()==
Constant
.
tkioPriceLevelNotLimit
){
tkioFlow
.
setFlow
(
clickNum
.
longValue
());
}
else
{
tkioFlow
.
setFlow
(
contractTrackFlow
.
longValue
()
-
totalFlow
.
longValue
());
tkioFlow
.
setCostFlow
(
clickNum
.
longValue
()-
tkioFlow
.
getFlow
());
}
}
return
tkioFlow
;
}
catch
(
ParseException
e
)
{
...
...
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