Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
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
saasio
Commits
78e3fc33
Commit
78e3fc33
authored
7 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add flow
parent
4476f8d0
master
…
20180326_events4track
30921_bugfix
No related merge requests found
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
524 additions
and
2 deletions
+524
-2
LoginController.java
src/main/java/com/reyun/controller/LoginController.java
+21
-0
MngAccountFlowController.java
...com/reyun/controller/manage/MngAccountFlowController.java
+58
-0
AccountRestrict4Web.java
src/main/java/com/reyun/model/AccountRestrict4Web.java
+65
-0
IsNotified.java
src/main/java/com/reyun/model/IsNotified.java
+250
-0
PackageType.java
src/main/java/com/reyun/model/PackageType.java
+9
-0
AccountRepository.java
src/main/java/com/reyun/repository/AccountRepository.java
+2
-0
AccountRestrict4WebRepository.java
...a/com/reyun/repository/AccountRestrict4WebRepository.java
+15
-0
IsNotifiedRepository.java
src/main/java/com/reyun/repository/IsNotifiedRepository.java
+20
-0
AccountFlowRestrictService.java
...in/java/com/reyun/service/AccountFlowRestrictService.java
+16
-0
AccountFlowRestrictServiceImpl.java
...om/reyun/service/impl/AccountFlowRestrictServiceImpl.java
+0
-0
AutoCalculateFlow.java
src/main/java/com/reyun/task/AutoCalculateFlow.java
+39
-0
Constant.java
src/main/java/com/reyun/util/Constant.java
+10
-0
HttpClientUtil.java
src/main/java/com/reyun/util/HttpClientUtil.java
+0
-0
applicationContext-schedule.xml
src/main/resources/applicationContext-schedule.xml
+5
-0
common.properties
src/main/resources/common.properties
+14
-2
No files found.
src/main/java/com/reyun/controller/LoginController.java
View file @
78e3fc33
...
@@ -70,6 +70,9 @@ public class LoginController
...
@@ -70,6 +70,9 @@ public class LoginController
@Autowired
@Autowired
AuthService
authService
;
AuthService
authService
;
@Autowired
AccountFlowRestrictService
accountFlowRestrictService
;
@Autowired
@Autowired
PackageTypeRepository
packageTypeRepository
;
PackageTypeRepository
packageTypeRepository
;
...
@@ -85,6 +88,24 @@ public class LoginController
...
@@ -85,6 +88,24 @@ public class LoginController
Account
account
=
loginService
.
login
(
email
,
password
);
Account
account
=
loginService
.
login
(
email
,
password
);
if
(
account
!=
null
)
{
if
(
account
!=
null
)
{
if
(!
account
.
getRoleCategory
().
equals
(
5L
))
{
Boolean
trackAndIoBothExhaust
=
accountFlowRestrictService
.
isTrackAndIoBothExhaust
(
account
.
getId
());
Long
rootParent
=
accountRepository
.
findRootParentByAccountId
(
account
.
getId
()).
longValue
();
Account
rootAccount
=
accountRepository
.
findOne
(
rootParent
);
if
(
trackAndIoBothExhaust
)
{
if
(
rootAccount
.
getAllowBehavior
())
{
rtnMap
.
put
(
"msg"
,
"广告效果监控流量和行为分析流量均用尽!"
);
rtnMap
.
put
(
"code"
,
211
);
return
ResultModel
.
OK
(
rtnMap
);
}
else
{
rtnMap
.
put
(
"msg"
,
"广告效果监控流量已经用尽!"
);
rtnMap
.
put
(
"code"
,
211
);
return
ResultModel
.
OK
(
rtnMap
);
}
}
}
if
(!
account
.
getIsSuperUser
())
{
if
(!
account
.
getIsSuperUser
())
{
//子账号
//子账号
if
(
account
.
getStatus
()
==
0
)
{
if
(
account
.
getStatus
()
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/controller/manage/MngAccountFlowController.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
controller
.
manage
;
import
com.reyun.model.AccountRestrict4Web
;
import
com.reyun.repository.AccountRepository
;
import
com.reyun.repository.AccountRestrict4WebRepository
;
import
com.reyun.service.AccountFlowRestrictService
;
import
com.reyun.util.ResultModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
/**
* Created by song on 2017/10/19.
*/
@Controller
@RequestMapping
(
"/mng/accountRestrict"
)
public
class
MngAccountFlowController
{
@Autowired
private
AccountRestrict4WebRepository
accountRestrict4WebRepository
;
@Autowired
private
AccountRepository
accountRepository
;
@Autowired
private
AccountFlowRestrictService
accountFlowRestrictService
;
@RequestMapping
(
value
=
"find/{accountId}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
list
(
@PathVariable
Long
accountId
)
{
long
superAccountId
=
accountRepository
.
findRootParentByAccountId
(
accountId
).
longValue
();
AccountRestrict4Web
byAccountId
=
accountRestrict4WebRepository
.
findByAccountId
(
superAccountId
);
if
(
byAccountId
==
null
){
byAccountId
=
accountFlowRestrictService
.
RestrictFlowByAccountTask
(
accountId
);
}
return
ResultModel
.
OK
(
byAccountId
);
}
@RequestMapping
(
value
=
"confirm"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ResultModel
confirm
(
@RequestBody
AccountRestrict4Web
resource
)
{
long
superAccountId
=
accountRepository
.
findRootParentByAccountId
(
resource
.
getAccountId
()).
longValue
();
AccountRestrict4Web
byAccountId1
=
accountRestrict4WebRepository
.
findByAccountId
(
superAccountId
);
if
(
resource
.
getTrackPastTime
()!=
null
&&
resource
.
getTrackPastTime
()){
byAccountId1
.
setTrackPastTimeNotified
(
false
);
}
if
(
resource
.
getIoPastTime
()!=
null
&&
resource
.
getIoPastTime
()){
byAccountId1
.
setIOPastTimeNotified
(
false
);
}
if
(
resource
.
getTrackFlow
()!=
null
&&
resource
.
getTrackFlow
()){
byAccountId1
.
setTrackFlowNotified
(
false
);
}
if
(
resource
.
getIoFlow
()!=
null
&&
resource
.
getIoFlow
()
){
byAccountId1
.
setIOFlowNotified
(
false
);
}
accountRestrict4WebRepository
.
save
(
byAccountId1
);
return
ResultModel
.
OK
();
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/model/AccountRestrict4Web.java
View file @
78e3fc33
package
com
.
reyun
.
model
;
package
com
.
reyun
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Transient
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
@Entity
public
class
AccountRestrict4Web
{
public
class
AccountRestrict4Web
{
private
Long
id
;
private
String
packageName
;
private
String
packageName
;
private
String
originalName
;
private
String
originalName
;
private
BigInteger
IOLimit
;
private
BigInteger
IOLimit
;
...
@@ -24,6 +30,21 @@ public class AccountRestrict4Web {
...
@@ -24,6 +30,21 @@ public class AccountRestrict4Web {
private
Boolean
isTrackFlowNotified
;
private
Boolean
isTrackFlowNotified
;
private
Boolean
isIOFlowNotified
;
private
Boolean
isIOFlowNotified
;
private
Boolean
allowBehavior
;
private
Boolean
allowBehavior
;
private
Boolean
superLevel
;
private
Boolean
ioPastTime
;
private
Boolean
trackPastTime
;
private
Boolean
ioFlow
;
private
Boolean
trackFlow
;
@Id
@GeneratedValue
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getPackLevel
()
{
public
Long
getPackLevel
()
{
return
packLevel
;
return
packLevel
;
...
@@ -192,4 +213,48 @@ public class AccountRestrict4Web {
...
@@ -192,4 +213,48 @@ public class AccountRestrict4Web {
public
void
setAllowBehavior
(
Boolean
allowBehavior
)
{
public
void
setAllowBehavior
(
Boolean
allowBehavior
)
{
this
.
allowBehavior
=
allowBehavior
;
this
.
allowBehavior
=
allowBehavior
;
}
}
public
Boolean
getSuperLevel
()
{
return
superLevel
;
}
public
void
setSuperLevel
(
Boolean
superLevel
)
{
this
.
superLevel
=
superLevel
;
}
@Transient
public
Boolean
getIoPastTime
()
{
return
ioPastTime
;
}
public
void
setIoPastTime
(
Boolean
ioPastTime
)
{
this
.
ioPastTime
=
ioPastTime
;
}
@Transient
public
Boolean
getTrackPastTime
()
{
return
trackPastTime
;
}
public
void
setTrackPastTime
(
Boolean
trackPastTime
)
{
this
.
trackPastTime
=
trackPastTime
;
}
@Transient
public
Boolean
getIoFlow
()
{
return
ioFlow
;
}
public
void
setIoFlow
(
Boolean
ioFlow
)
{
this
.
ioFlow
=
ioFlow
;
}
@Transient
public
Boolean
getTrackFlow
()
{
return
trackFlow
;
}
public
void
setTrackFlow
(
Boolean
trackFlow
)
{
this
.
trackFlow
=
trackFlow
;
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/model/IsNotified.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
@Entity
public
class
IsNotified
{
private
Long
id
;
private
String
type
;
private
Long
accountId
;
private
Boolean
isTrackTwoMonthNotified
;
private
Boolean
isTrackOneMonthNotified
;
private
Boolean
isTrackTenDaysNotified
;
private
Boolean
isTrackOneDaysNotified
;
private
Boolean
isTrackExpireNotified
;
private
Boolean
isIoTwoMonthNotified
;
private
Boolean
isIoOneMonthNotified
;
private
Boolean
isIoTenDaysNotified
;
private
Boolean
isIoOneDaysNotified
;
private
Boolean
isIoExpireNotified
;
private
Boolean
isTrackThirtyPercentNotified
;
private
Boolean
isTrackTwentyPercentNotified
;
private
Boolean
isTrackTenPercentNotified
;
private
Boolean
isTrackFivePercentNotified
;
private
Boolean
isTrackExhaustPercentNotified
;
private
Boolean
isIoThirtyPercentNotified
;
private
Boolean
isIoTwentyPercentNotified
;
private
Boolean
isIoTenPercentNotified
;
private
Boolean
isIoFivePercentNotified
;
private
Boolean
isIoExhaustPercentNotified
;
private
Long
previousPackageLevel
;
private
String
firstDayOfThisMonth
;
private
Boolean
thisMonthUpgradeLevel
;
@Id
@GeneratedValue
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
Long
getAccountId
()
{
return
accountId
;
}
public
void
setAccountId
(
Long
accountId
)
{
this
.
accountId
=
accountId
;
}
public
Boolean
getTrackOneMonthNotified
()
{
return
isTrackOneMonthNotified
;
}
public
void
setTrackOneMonthNotified
(
Boolean
trackOneMonthNotified
)
{
isTrackOneMonthNotified
=
trackOneMonthNotified
;
}
public
Boolean
getTrackTenDaysNotified
()
{
return
isTrackTenDaysNotified
;
}
public
void
setTrackTenDaysNotified
(
Boolean
trackTenDaysNotified
)
{
isTrackTenDaysNotified
=
trackTenDaysNotified
;
}
public
Boolean
getTrackOneDaysNotified
()
{
return
isTrackOneDaysNotified
;
}
public
void
setTrackOneDaysNotified
(
Boolean
trackOneDaysNotified
)
{
isTrackOneDaysNotified
=
trackOneDaysNotified
;
}
public
Boolean
getTrackExpireNotified
()
{
return
isTrackExpireNotified
;
}
public
void
setTrackExpireNotified
(
Boolean
trackExpireNotified
)
{
isTrackExpireNotified
=
trackExpireNotified
;
}
public
Boolean
getIoOneMonthNotified
()
{
return
isIoOneMonthNotified
;
}
public
void
setIoOneMonthNotified
(
Boolean
ioOneMonthNotified
)
{
isIoOneMonthNotified
=
ioOneMonthNotified
;
}
public
Boolean
getIoTenDaysNotified
()
{
return
isIoTenDaysNotified
;
}
public
void
setIoTenDaysNotified
(
Boolean
ioTenDaysNotified
)
{
isIoTenDaysNotified
=
ioTenDaysNotified
;
}
public
Boolean
getIoOneDaysNotified
()
{
return
isIoOneDaysNotified
;
}
public
void
setIoOneDaysNotified
(
Boolean
ioOneDaysNotified
)
{
isIoOneDaysNotified
=
ioOneDaysNotified
;
}
public
Boolean
getIoExpireNotified
()
{
return
isIoExpireNotified
;
}
public
void
setIoExpireNotified
(
Boolean
ioExpireNotified
)
{
isIoExpireNotified
=
ioExpireNotified
;
}
public
Boolean
getTrackThirtyPercentNotified
()
{
return
isTrackThirtyPercentNotified
;
}
public
void
setTrackThirtyPercentNotified
(
Boolean
trackThirtyPercentNotified
)
{
isTrackThirtyPercentNotified
=
trackThirtyPercentNotified
;
}
public
Boolean
getTrackTwentyPercentNotified
()
{
return
isTrackTwentyPercentNotified
;
}
public
void
setTrackTwentyPercentNotified
(
Boolean
trackTwentyPercentNotified
)
{
isTrackTwentyPercentNotified
=
trackTwentyPercentNotified
;
}
public
Boolean
getTrackTenPercentNotified
()
{
return
isTrackTenPercentNotified
;
}
public
void
setTrackTenPercentNotified
(
Boolean
trackTenPercentNotified
)
{
isTrackTenPercentNotified
=
trackTenPercentNotified
;
}
public
Boolean
getTrackFivePercentNotified
()
{
return
isTrackFivePercentNotified
;
}
public
void
setTrackFivePercentNotified
(
Boolean
trackFivePercentNotified
)
{
isTrackFivePercentNotified
=
trackFivePercentNotified
;
}
public
Boolean
getTrackExhaustPercentNotified
()
{
return
isTrackExhaustPercentNotified
;
}
public
void
setTrackExhaustPercentNotified
(
Boolean
trackExhaustPercentNotified
)
{
isTrackExhaustPercentNotified
=
trackExhaustPercentNotified
;
}
public
Boolean
getIoThirtyPercentNotified
()
{
return
isIoThirtyPercentNotified
;
}
public
void
setIoThirtyPercentNotified
(
Boolean
ioThirtyPercentNotified
)
{
isIoThirtyPercentNotified
=
ioThirtyPercentNotified
;
}
public
Boolean
getIoTwentyPercentNotified
()
{
return
isIoTwentyPercentNotified
;
}
public
void
setIoTwentyPercentNotified
(
Boolean
ioTwentyPercentNotified
)
{
isIoTwentyPercentNotified
=
ioTwentyPercentNotified
;
}
public
Boolean
getIoTenPercentNotified
()
{
return
isIoTenPercentNotified
;
}
public
void
setIoTenPercentNotified
(
Boolean
ioTenPercentNotified
)
{
isIoTenPercentNotified
=
ioTenPercentNotified
;
}
public
Boolean
getIoFivePercentNotified
()
{
return
isIoFivePercentNotified
;
}
public
void
setIoFivePercentNotified
(
Boolean
ioFivePercentNotified
)
{
isIoFivePercentNotified
=
ioFivePercentNotified
;
}
public
Boolean
getIoExhaustPercentNotified
()
{
return
isIoExhaustPercentNotified
;
}
public
void
setIoExhaustPercentNotified
(
Boolean
ioExhaustPercentNotified
)
{
isIoExhaustPercentNotified
=
ioExhaustPercentNotified
;
}
public
Boolean
getTrackTwoMonthNotified
()
{
return
isTrackTwoMonthNotified
;
}
public
void
setTrackTwoMonthNotified
(
Boolean
trackTwoMonthNotified
)
{
isTrackTwoMonthNotified
=
trackTwoMonthNotified
;
}
public
Boolean
getIoTwoMonthNotified
()
{
return
isIoTwoMonthNotified
;
}
public
void
setIoTwoMonthNotified
(
Boolean
ioTwoMonthNotified
)
{
isIoTwoMonthNotified
=
ioTwoMonthNotified
;
}
public
Long
getPreviousPackageLevel
()
{
return
previousPackageLevel
;
}
public
void
setPreviousPackageLevel
(
Long
previousPackageLevel
)
{
this
.
previousPackageLevel
=
previousPackageLevel
;
}
public
String
getFirstDayOfThisMonth
()
{
return
firstDayOfThisMonth
;
}
public
void
setFirstDayOfThisMonth
(
String
firstDayOfThisMonth
)
{
this
.
firstDayOfThisMonth
=
firstDayOfThisMonth
;
}
public
Boolean
getThisMonthUpgradeLevel
()
{
return
thisMonthUpgradeLevel
;
}
public
void
setThisMonthUpgradeLevel
(
Boolean
thisMonthUpgradeLevel
)
{
this
.
thisMonthUpgradeLevel
=
thisMonthUpgradeLevel
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/model/PackageType.java
View file @
78e3fc33
...
@@ -17,6 +17,7 @@ public class PackageType {
...
@@ -17,6 +17,7 @@ public class PackageType {
private
BigInteger
trackFlow
;
private
BigInteger
trackFlow
;
private
BigInteger
ioFlow
;
private
BigInteger
ioFlow
;
private
Integer
appNum
;
private
Integer
appNum
;
private
Boolean
superLevel
;
/**
/**
* 价格
* 价格
...
@@ -375,4 +376,12 @@ public class PackageType {
...
@@ -375,4 +376,12 @@ public class PackageType {
public
void
setPlatformCustomDataAnalysis
(
Boolean
platformCustomDataAnalysis
)
{
public
void
setPlatformCustomDataAnalysis
(
Boolean
platformCustomDataAnalysis
)
{
this
.
platformCustomDataAnalysis
=
platformCustomDataAnalysis
;
this
.
platformCustomDataAnalysis
=
platformCustomDataAnalysis
;
}
}
public
Boolean
getSuperLevel
()
{
return
superLevel
;
}
public
void
setSuperLevel
(
Boolean
superLevel
)
{
this
.
superLevel
=
superLevel
;
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/repository/AccountRepository.java
View file @
78e3fc33
...
@@ -72,6 +72,8 @@ public interface AccountRepository extends JpaRepository<Account, Long> {
...
@@ -72,6 +72,8 @@ public interface AccountRepository extends JpaRepository<Account, Long> {
@Query
(
value
=
"select root_parent from account where id=?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select root_parent from account where id=?1"
,
nativeQuery
=
true
)
BigInteger
findRootParentByAccountId
(
Long
accountId
);
BigInteger
findRootParentByAccountId
(
Long
accountId
);
@Query
(
value
=
"select * from account where status=1 and flow_restrict is TRUE and is_super_user is TRUE;"
,
nativeQuery
=
true
)
List
<
Account
>
findSuperAccount
();
@Transactional
@Transactional
@Modifying
@Modifying
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/repository/AccountRestrict4WebRepository.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
repository
;
import
com.reyun.model.AccountRestrict4Web
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* Created by song on 2018/2/12.
*/
@Transactional
public
interface
AccountRestrict4WebRepository
extends
JpaRepository
<
AccountRestrict4Web
,
Long
>
{
@Query
(
value
=
"select * from account_restrict4web where account_id=?1"
,
nativeQuery
=
true
)
AccountRestrict4Web
findByAccountId
(
Long
account
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/repository/IsNotifiedRepository.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
repository
;
import
com.reyun.model.IsNotified
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
@Transactional
public
interface
IsNotifiedRepository
extends
JpaRepository
<
IsNotified
,
Long
>
{
@Query
(
value
=
"select * from is_notified where account_id=?1"
,
nativeQuery
=
true
)
IsNotified
findIsNotifiedByAccountId
(
Long
accountId
);
@Modifying
@Transactional
@Query
(
value
=
"delete from is_notified where account_id=?1"
,
nativeQuery
=
true
)
int
deleteByAccountId
(
Long
accountId
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/service/AccountFlowRestrictService.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
service
;
import
com.reyun.model.AccountRestrict4Web
;
import
java.math.BigInteger
;
/**
* Created by song on 2017/10/19.
*/
public
interface
AccountFlowRestrictService
{
AccountRestrict4Web
findRestrictByAccount
(
Long
accountId
);
BigInteger
getTotalNum
(
String
createTime
,
String
pastDate
,
String
appids
,
String
reportName
,
String
sumType
);
Boolean
isTrackAndIoBothExhaust
(
Long
accountId
);
Boolean
isTrackExhaust
(
Long
accountId
);
AccountRestrict4Web
RestrictFlowByAccountTask
(
Long
accountId
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/service/impl/AccountFlowRestrictServiceImpl.java
0 → 100644
View file @
78e3fc33
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/task/AutoCalculateFlow.java
0 → 100644
View file @
78e3fc33
package
com
.
reyun
.
task
;
import
com.reyun.model.Account
;
import
com.reyun.repository.AccountRepository
;
import
com.reyun.service.AccountFlowRestrictService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* Created by song on 2018/2/12.
*/
@Service
public
class
AutoCalculateFlow
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
AutoCalculateFlow
.
class
);
@Autowired
AccountFlowRestrictService
accountFlowRestrictService
;
@Autowired
AccountRepository
accountRepository
;
public
void
run
(){
try
{
List
<
Account
>
superAccount
=
accountRepository
.
findSuperAccount
();
for
(
Account
account:
superAccount
){
//System.out.println("**********************************************\n\n");
accountFlowRestrictService
.
RestrictFlowByAccountTask
(
account
.
getId
());
//System.out.println("**********************************************\n\n");
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
logger
.
info
(
e
.
getMessage
());
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/util/Constant.java
View file @
78e3fc33
...
@@ -32,6 +32,16 @@ public class Constant {
...
@@ -32,6 +32,16 @@ public class Constant {
public
static
String
eventTable
=
commonBundle
.
getString
(
"event.table"
);
public
static
String
eventTable
=
commonBundle
.
getString
(
"event.table"
);
public
static
String
usergroupTable
=
commonBundle
.
getString
(
"usergroup.table"
);
public
static
String
usergroupTable
=
commonBundle
.
getString
(
"usergroup.table"
);
public
static
String
accountCheckUrl
=
commonBundle
.
getString
(
"account.check.url"
);
public
static
String
accountCheckUrl
=
commonBundle
.
getString
(
"account.check.url"
);
public
static
String
reportUrl
=
commonBundle
.
getString
(
"report.url"
);
public
static
String
adminUrl
=
commonBundle
.
getString
(
"admin.url"
);
public
static
String
iscache
=
commonBundle
.
getString
(
"iscache"
);
public
static
String
receiverHost
=
commonBundle
.
getString
(
"receiver.host"
);
public
static
String
receiverPort
=
commonBundle
.
getString
(
"receiver.port"
);
public
static
String
reportExportTask
=
commonBundle
.
getString
(
"report.export.task"
);
public
static
String
appDebugTask
=
commonBundle
.
getString
(
"app.debug.task"
);
public
static
String
tkioUrl
=
commonBundle
.
getString
(
"tkio.url"
);
public
static
String
awsAccessKey
=
commonBundle
.
getString
(
"aws.accesskey"
);
public
static
String
awsSecretKey
=
commonBundle
.
getString
(
"aws.secret"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/util/HttpClientUtil.java
0 → 100644
View file @
78e3fc33
This diff is collapsed.
Click to expand it.
src/main/resources/applicationContext-schedule.xml
View file @
78e3fc33
...
@@ -9,4 +9,9 @@
...
@@ -9,4 +9,9 @@
<description>
调度配置
</description>
<description>
调度配置
</description>
<bean
id=
"autoCalculateFlow"
class=
"com.reyun.task.AutoCalculateFlow"
></bean>
<task:scheduled-tasks>
<task:scheduled
ref=
"autoCalculateFlow"
method=
"run"
cron=
"0 */10 * * * ?"
/>
</task:scheduled-tasks>
</beans>
</beans>
This diff is collapsed.
Click to expand it.
src/main/resources/common.properties
View file @
78e3fc33
profile.table
=
${profile.table}
profile.table
=
${profile.table}
event.table
=
${event.table}
event.table
=
${event.table}
usergroup.table
=
${usergroup.table}
usergroup.table
=
${usergroup.table}
account.check.url
=
${account.check.url}
account.check.url
=
${account.check.url}
\ No newline at end of file
receiver.host
=
${receiver.host}
receiver.port
=
${receiver.port}
report.url
=
${report.url}
awsneed
=
${awsneed}
iscache
=
${iscache}
admin.url
=
${admin.url}
report.export.task
=
${report.export.task}
app.debug.task
=
${app.debug.task}
tkio.url
=
${tkio.url}
aws.accesskey
=
${aws.accesskey}
aws.secret
=
${aws.secret}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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