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
b8abf012
Commit
b8abf012
authored
Apr 25, 2018
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
833eff93
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
12 deletions
+25
-12
workspace.xml
.idea/workspace.xml
+0
-0
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+12
-1
UserServiceImpl.java
src/main/java/common/service/impl/UserServiceImpl.java
+1
-1
AccountFlowRestrictServiceImpl.java
...ava/tkio/service/impl/AccountFlowRestrictServiceImpl.java
+10
-8
AccountTask.java
src/main/java/tkio/task/AccountTask.java
+1
-1
applicationContext-schedule.xml
src/main/resources/spring/applicationContext-schedule.xml
+1
-1
No files found.
.idea/workspace.xml
View file @
b8abf012
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
b8abf012
...
...
@@ -440,9 +440,20 @@ public class ContractServiceImpl implements ContractService{
typeMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
List
<
ContractIncrement
>
incrementList
=
contractIncrementRepository
.
findAll
();
Map
<
Long
,
String
>
incremenMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
incrementList
)){
for
(
ContractIncrement
s:
incrementList
){
incremenMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
Contract
contract
=
contractRepository
.
findByCode
(
code
);
contract
.
setSaleName
(
saleMap
.
containsKey
(
contract
.
getSale
())
?
saleMap
.
get
(
contract
.
getSale
())
:
""
);
contract
.
setPriceLevelName
(
typeMap
.
containsKey
(
contract
.
getPriceLevel
())
?
typeMap
.
get
(
contract
.
getPriceLevel
())
:
""
);
if
(
contract
.
getType
().
equals
(
ContractTypeEnum
.
MAIN
.
getKey
())){
contract
.
setPriceLevelName
(
typeMap
.
containsKey
(
contract
.
getPriceLevel
())
?
typeMap
.
get
(
contract
.
getPriceLevel
())
:
""
);
}
else
{
contract
.
setPriceLevelName
(
incremenMap
.
containsKey
(
contract
.
getPriceLevel
())
?
incremenMap
.
get
(
contract
.
getPriceLevel
())
:
""
);
}
contract
.
setCreateName
(
saleMap
.
containsKey
(
contract
.
getCreateAccount
())
?
saleMap
.
get
(
contract
.
getCreateAccount
())
:
""
);
Boolean
flag
=
null
;
...
...
src/main/java/common/service/impl/UserServiceImpl.java
View file @
b8abf012
...
...
@@ -110,7 +110,7 @@ public class UserServiceImpl implements UserService {
auth
.
setUser
(
save
.
getId
());
Auth
authSave
=
authRepository
.
save
(
auth
);
if
(
save
.
getRoleType
().
equals
(
RoleTypeEnum
.
COMMON
.
getKey
())){
if
(
null
!=
save
.
getRoleType
()
&&
save
.
getRoleType
().
equals
(
RoleTypeEnum
.
COMMON
.
getKey
())){
JSONArray
rootArr
=
JSONArray
.
fromObject
(
authSave
.
getAuth
());
List
<
String
>
authList
=
new
ArrayList
<>();
if
(
ValidateUtil
.
isValid
(
rootArr
)){
...
...
src/main/java/tkio/service/impl/AccountFlowRestrictServiceImpl.java
View file @
b8abf012
...
...
@@ -132,16 +132,18 @@ public class AccountFlowRestrictServiceImpl implements AccountFlowRestrictServic
//String ioRemainPercent1 = decimalFormat.format(ioRemainPercent);
BigInteger
num
=
incrementFlowRepository
.
listByRootAccount
(
accountId
,
DateUtil
.
getBeforeDays
(
0
));
if
(
null
==
num
){
num
=
new
BigInteger
(
"0"
);
BigInteger
trackNum
=
packageType
.
getTrackFlow
();
if
(
trackNum
.
doubleValue
()
!=
-
1
&&
null
!=
num
){
trackNum
=
trackNum
.
add
(
num
);
}
num
.
add
(
packageType
.
getTrackFlow
());
accountRestrict4Web
.
setPastDate
(
pastDate
);
accountRestrict4Web
.
setPackageName
(
packageType
.
getPackageName
());
accountRestrict4Web
.
setOriginalName
(
packageType
.
getOriginalName
());
accountRestrict4Web
.
setIOLimit
(
packageType
.
getIoFlow
());
accountRestrict4Web
.
setTrackLimit
(
n
um
);
accountRestrict4Web
.
setTrackLimit
(
trackN
um
);
accountRestrict4Web
.
setThisMonthIOFlow
(
thisMonthEventNum
);
accountRestrict4Web
.
setTrackTotalFlow
(
clickNum
);
accountRestrict4Web
.
setAccountId
(
rootParent
);
...
...
@@ -156,7 +158,7 @@ public class AccountFlowRestrictServiceImpl implements AccountFlowRestrictServic
accountRestrict4Web
.
setAllowBehavior
(
isIOProduct
);
if
(
(
packageType
.
getId
()
==
7
||
packageType
.
getId
()
==
8
||
packageType
.
getId
()
==
5
)
)
{
if
(
packageType
.
getTrackFlow
().
doubleValue
()
<
0
)
{
accountRestrict4Web
.
setPackageName
(
"包年套餐"
);
}
...
...
@@ -165,13 +167,13 @@ public class AccountFlowRestrictServiceImpl implements AccountFlowRestrictServic
boolean
trackFlag
=
true
;
boolean
trackStatus
=
true
;
if
(
rootParent
.
equals
(
accountId
))
{
if
(!(
packageType
.
get
Id
()
==
7
||
packageType
.
getId
()
==
8
||
packageType
.
getId
()
==
5
)
&&
flowRestrict
)
{
if
(!(
packageType
.
get
TrackFlow
().
doubleValue
()
<
0
)
&&
flowRestrict
)
{
/**
* 不是超级用户,是包流量的用户
*/
if
(
isTrackProduct
)
{
boolean
tenPercent
=
(
packageType
.
getTrackFlow
().
doubleValue
()
*
0.9
<=
clickNum
.
doubleValue
())
&&
(
packageType
.
getTrackFlow
()
.
doubleValue
()
*
0.95
>
clickNum
.
doubleValue
());
boolean
exPercent
=
packageType
.
getTrackFlow
()
.
doubleValue
()
<=
clickNum
.
doubleValue
();
boolean
tenPercent
=
(
trackNum
.
doubleValue
()
*
0.9
<=
clickNum
.
doubleValue
())
&&
(
trackNum
.
doubleValue
()
*
0.95
>
clickNum
.
doubleValue
());
boolean
exPercent
=
trackNum
.
doubleValue
()
<=
clickNum
.
doubleValue
();
if
(
exPercent
)
{
ioFlag
=
false
;
ioStatus
=
false
;
...
...
src/main/java/tkio/task/AccountTask.java
View file @
b8abf012
...
...
@@ -106,7 +106,7 @@ public class AccountTask {
// account4Web.setStatus("已激活");
//
// }
if
(
account4Web
.
getTrackLimit
().
doubleValue
()
==
-
1
){
if
(
account4Web
.
getTrackLimit
().
doubleValue
()
<=
0
){
account4Web
.
setTrackStatus
(
true
);
account4Web
.
setStatus
(
"已激活"
);
...
...
src/main/resources/spring/applicationContext-schedule.xml
View file @
b8abf012
...
...
@@ -12,7 +12,7 @@
<bean
id=
"tkioAccountTask"
class=
"tkio.task.AccountTask"
></bean>
<task:scheduled-tasks>
<!--//定时同步短链数据(每5分钟执行一次)-->
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0
16 17
* * ?"
/>
<task:scheduled
ref=
"tkioAccountTask"
method=
"task"
cron=
"0
34 12
* * ?"
/>
</task:scheduled-tasks>
<bean
id=
"tkioNoticeTask"
class=
"tkio.task.NoticeTask"
></bean>
...
...
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