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
5dc5cf7c
Commit
5dc5cf7c
authored
Nov 29, 2020
by
xioa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月流量报表
parent
cdd316b0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
2 deletions
+61
-2
TkioFlow.java
src/main/java/common/model/TkioFlow.java
+9
-0
TkioFlowHistory.java
src/main/java/common/model/TkioFlowHistory.java
+42
-0
TkioFlowHistoryRepository.java
...ain/java/common/repository/TkioFlowHistoryRepository.java
+10
-2
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+0
-0
No files found.
src/main/java/common/model/TkioFlow.java
View file @
5dc5cf7c
...
...
@@ -19,6 +19,7 @@ public class TkioFlow {
private
String
contractCode
;
private
Long
flow
;
private
Long
costFlow
;
private
Integer
contractCount
;
public
String
getDs
()
{
return
ds
;
...
...
@@ -67,4 +68,12 @@ public class TkioFlow {
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Integer
getContractCount
()
{
return
contractCount
;
}
public
void
setContractCount
(
Integer
contractCount
)
{
this
.
contractCount
=
contractCount
;
}
}
src/main/java/common/model/TkioFlowHistory.java
View file @
5dc5cf7c
...
...
@@ -18,6 +18,24 @@ public class TkioFlowHistory {
private
String
contractCode
;
private
Long
flow
;
private
Long
costFlow
;
private
String
yMonth
;
private
String
yMonthNext
;
private
String
nextCode
;
public
TkioFlowHistory
()
{
}
public
TkioFlowHistory
(
TkioFlow
flow
)
{
this
.
ds
=
flow
.
getDs
();
this
.
email
=
flow
.
getEmail
();
this
.
contractCode
=
flow
.
getContractCode
();
this
.
flow
=
flow
.
getFlow
();
this
.
costFlow
=
flow
.
getCostFlow
();
}
public
String
getDs
()
{
return
ds
;
...
...
@@ -66,4 +84,28 @@ public class TkioFlowHistory {
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getyMonth
()
{
return
yMonth
;
}
public
void
setyMonth
(
String
yMonth
)
{
this
.
yMonth
=
yMonth
;
}
public
String
getyMonthNext
()
{
return
yMonthNext
;
}
public
void
setyMonthNext
(
String
yMonthNext
)
{
this
.
yMonthNext
=
yMonthNext
;
}
public
String
getNextCode
()
{
return
nextCode
;
}
public
void
setNextCode
(
String
nextCode
)
{
this
.
nextCode
=
nextCode
;
}
}
src/main/java/common/repository/TkioFlowHistoryRepository.java
View file @
5dc5cf7c
...
...
@@ -10,8 +10,16 @@ import java.math.BigDecimal;
public
interface
TkioFlowHistoryRepository
extends
JpaRepository
<
TkioFlowHistory
,
Long
>
{
@Query
(
value
=
"select contract_code from tkio_flow_history where email = ?1 order by ds limit 1"
,
nativeQuery
=
true
)
String
findLastRecodeContract
(
String
email
);
@Query
(
value
=
"select sum(flow) from tkio_flow_history where email = ?1 and contract_code = ?2"
,
nativeQuery
=
true
)
BigDecimal
sumAllFowByEmailAndCode
(
String
email
,
String
contractCode
);
@Transactional
@Modifying
@Query
(
value
=
"
insert into tkio_flow_history select * from tkio_flow where email = ?1 and cost_flow > 0
"
,
nativeQuery
=
true
)
BigDecimal
backDatas
ByEmail
(
String
email
);
@Query
(
value
=
"
delete from tkio_flow where email = ?1
"
,
nativeQuery
=
true
)
void
delete
ByEmail
(
String
email
);
}
src/main/java/track/task/TrackingFlowTask.java
View file @
5dc5cf7c
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