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
7be2b9ca
Commit
7be2b9ca
authored
4 years ago
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tkio流量计算分摊报表
parent
f106616f
master
…
0727_bugfix
1990_bugfix
2578_bugfix
2580_fix
bigfix_20201028
bugfix_1608_new
bugfix_1760
bugfix_master_1760
liushaowei
master_mv
mobvista_master
month_flow
No related merge requests found
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
3 deletions
+10
-3
ContractController.java
src/main/java/common/controller/ContractController.java
+1
-0
TkioFlowRepository.java
src/main/java/common/repository/TkioFlowRepository.java
+6
-0
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+1
-1
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+0
-0
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+0
-0
applicationContext-schedule.xml
src/main/resources/spring/applicationContext-schedule.xml
+2
-2
No files found.
src/main/java/common/controller/ContractController.java
View file @
7be2b9ca
...
@@ -336,6 +336,7 @@ public class ContractController {
...
@@ -336,6 +336,7 @@ public class ContractController {
@ResponseBody
@ResponseBody
public
ResultModel
change
(
@CurrentAccount
User
loginAccount
,
public
ResultModel
change
(
@CurrentAccount
User
loginAccount
,
@RequestBody
ContractChange
contract
,
HttpServletRequest
request
,
@PathVariable
String
platform
)
{
@RequestBody
ContractChange
contract
,
HttpServletRequest
request
,
@PathVariable
String
platform
)
{
contract
.
setPlatform
(
platform
);
Contract
contract1
=
service
.
change
(
loginAccount
,
contract
,
null
);
Contract
contract1
=
service
.
change
(
loginAccount
,
contract
,
null
);
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
contract1
.
getContractCode
(),
"修改套餐"
,
""
,
contract1
.
toString
(),
request
,
platform
);
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
contract1
.
getContractCode
(),
"修改套餐"
,
""
,
contract1
.
toString
(),
request
,
platform
);
userlog
.
start
();
userlog
.
start
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/repository/TkioFlowRepository.java
View file @
7be2b9ca
...
@@ -6,6 +6,9 @@ import org.springframework.data.jpa.repository.Modifying;
...
@@ -6,6 +6,9 @@ import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
public
interface
TkioFlowRepository
extends
JpaRepository
<
TkioFlow
,
Long
>
{
public
interface
TkioFlowRepository
extends
JpaRepository
<
TkioFlow
,
Long
>
{
@Query
(
value
=
"select sum(flow) from tkio_flow where email = ?1 and contract_code = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select sum(flow) from tkio_flow where email = ?1 and contract_code = ?2"
,
nativeQuery
=
true
)
...
@@ -15,4 +18,7 @@ public interface TkioFlowRepository extends JpaRepository<TkioFlow, Long> {
...
@@ -15,4 +18,7 @@ public interface TkioFlowRepository extends JpaRepository<TkioFlow, Long> {
@Modifying
@Modifying
@Query
(
value
=
"delete from tkio_flow where email = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"delete from tkio_flow where email = ?1"
,
nativeQuery
=
true
)
void
deleteByEmail
(
String
email
);
void
deleteByEmail
(
String
email
);
@Query
(
value
=
"select sum(flow) from tkio_flow where contract_code = ?1 and ds >= ?2 and ds <= ?3"
,
nativeQuery
=
true
)
BigDecimal
sumFlowByContractCodeAndDs
(
String
code
,
String
startDate
,
String
endDate
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
7be2b9ca
...
@@ -1742,7 +1742,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1742,7 +1742,7 @@ public class ContractServiceImpl implements ContractService {
calculationFlow
.
setEmail
(
resource
.
getEmail
());
calculationFlow
.
setEmail
(
resource
.
getEmail
());
calculationFlow
.
setContractCode
(
resource
.
getContractCode
());
calculationFlow
.
setContractCode
(
resource
.
getContractCode
());
calculationFlow
.
setStatus
(
0
);
calculationFlow
.
setStatus
(
0
);
calculationFlow
.
setTriggerType
(
"
终
止"
);
calculationFlow
.
setTriggerType
(
"
中
止"
);
calculationFlow
.
setCreateTime
(
DateUtil
.
getCurrentDateStr
());
calculationFlow
.
setCreateTime
(
DateUtil
.
getCurrentDateStr
());
calculationFlow
.
setIsAll
(
false
);
calculationFlow
.
setIsAll
(
false
);
if
(
contracts
==
null
||
contracts
.
size
()>
0
){
if
(
contracts
==
null
||
contracts
.
size
()>
0
){
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
7be2b9ca
This diff is collapsed.
Click to expand it.
src/main/java/track/task/TrackingFlowTask.java
View file @
7be2b9ca
This diff is collapsed.
Click to expand it.
src/main/resources/spring/applicationContext-schedule.xml
View file @
7be2b9ca
...
@@ -66,13 +66,13 @@
...
@@ -66,13 +66,13 @@
<bean
id=
"syncTrackingFlowTask"
class=
"track.task.TrackingFlowTask"
></bean>
<bean
id=
"syncTrackingFlowTask"
class=
"track.task.TrackingFlowTask"
></bean>
<task:scheduled-tasks>
<task:scheduled-tasks>
<!--定时同步昨日流量(每天10点执行一次)-->
<!--定时同步昨日流量(每天10点执行一次)-->
<task:scheduled
ref=
"syncTrackingFlowTask"
method=
"task"
cron=
"
* *
10 * * ?"
/>
<task:scheduled
ref=
"syncTrackingFlowTask"
method=
"task"
cron=
"
0 0
10 * * ?"
/>
</task:scheduled-tasks>
</task:scheduled-tasks>
<bean
id=
"syncCalculationFlowTask"
class=
"track.task.TrackingFlowTask"
></bean>
<bean
id=
"syncCalculationFlowTask"
class=
"track.task.TrackingFlowTask"
></bean>
<task:scheduled-tasks>
<task:scheduled-tasks>
<!--定时同步流量(每7分钟执行一次)-->
<!--定时同步流量(每7分钟执行一次)-->
<task:scheduled
ref=
"syncCalculationFlowTask"
method=
"syncFlow"
cron=
"
*
0/7 * * * ? "
/>
<task:scheduled
ref=
"syncCalculationFlowTask"
method=
"syncFlow"
cron=
"
0
0/7 * * * ? "
/>
</task:scheduled-tasks>
</task:scheduled-tasks>
</beans>
</beans>
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