Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_ad_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
maliang
lwby_ad_data
Commits
b26b0c24
Commit
b26b0c24
authored
Apr 24, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限控制
parent
c8f7d317
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
38 deletions
+158
-38
AdvertiserController.java
...boot/security/server/controller/AdvertiserController.java
+2
-1
AdvertiserData.java
...n/java/com/boot/security/server/model/AdvertiserData.java
+54
-0
PageTableRequest.java
...com/boot/security/server/page/table/PageTableRequest.java
+18
-0
advertiserData.html
...ources/static/pages/advertiserManager/advertiserData.html
+83
-36
advertiserDataCount.html
...s/static/pages/advertiserManager/advertiserDataCount.html
+1
-1
No files found.
src/main/java/com/boot/security/server/controller/AdvertiserController.java
View file @
b26b0c24
...
...
@@ -48,7 +48,7 @@ public class AdvertiserController {
//返回根据日期返回所有广告汇总数据
@PreAuthorize
(
"hasAuthority('advert:data:count')"
)
@PostMapping
(
"/advertCount"
)
@ApiOperation
(
value
=
"获取广告
汇总数据
"
)
@ApiOperation
(
value
=
"获取广告
数据汇总
"
)
@ResponseBody
public
String
getAdvertiserDataCount
(
@RequestBody
PageTableRequest
request
)
{
List
<
AdvertiserData
>
advertDataList
=
advertDao
.
getAdvertData
(
request
.
getStartTime
(),
request
.
getEndTime
());
...
...
@@ -62,6 +62,7 @@ public class AdvertiserController {
@ApiOperation
(
value
=
"获取广告主数据"
)
@ResponseBody
public
String
getAdvertiserData
(
@RequestBody
PageTableRequest
request
)
{
System
.
out
.
println
(
request
.
getAdvertiserId
()+
"....."
+
request
.
getAdvertId
());
List
<
AdvertiserData
>
advertDataList
=
advertDao
.
getAdvertData
(
request
.
getStartTime
(),
request
.
getEndTime
());
Integer
count
=
advertDao
.
getAdvertDataCount
(
request
.
getStartTime
(),
request
.
getEndTime
());
return
PageTableHandler
.
getJSONObject
(
advertDataList
,
count
);
...
...
src/main/java/com/boot/security/server/model/AdvertiserData.java
View file @
b26b0c24
...
...
@@ -10,6 +10,60 @@ public class AdvertiserData {
public
Long
exposure
;
public
Long
click
;
public
Double
income
;
public
Double
balance
;
public
Double
totalIncome
;
public
Double
incomeSeven
;
public
Double
incomeThirty
;
public
Integer
exposureView
;
public
Integer
clickView
;
public
Double
getBalance
()
{
return
balance
;
}
public
void
setBalance
(
Double
balance
)
{
this
.
balance
=
balance
;
}
public
Double
getTotalIncome
()
{
return
totalIncome
;
}
public
void
setTotalIncome
(
Double
totalIncome
)
{
this
.
totalIncome
=
totalIncome
;
}
public
Double
getIncomeSeven
()
{
return
incomeSeven
;
}
public
void
setIncomeSeven
(
Double
incomeSeven
)
{
this
.
incomeSeven
=
incomeSeven
;
}
public
Double
getIncomeThirty
()
{
return
incomeThirty
;
}
public
void
setIncomeThirty
(
Double
incomeThirty
)
{
this
.
incomeThirty
=
incomeThirty
;
}
public
Integer
getExposureView
()
{
return
exposureView
;
}
public
void
setExposureView
(
Integer
exposureView
)
{
this
.
exposureView
=
exposureView
;
}
public
Integer
getClickView
()
{
return
clickView
;
}
public
void
setClickView
(
Integer
clickView
)
{
this
.
clickView
=
clickView
;
}
public
String
getReportDate
()
{
return
reportDate
;
...
...
src/main/java/com/boot/security/server/page/table/PageTableRequest.java
View file @
b26b0c24
...
...
@@ -18,6 +18,24 @@ public class PageTableRequest implements Serializable {
private
Map
<
String
,
Object
>
params
;
private
String
startTime
;
private
String
endTime
;
private
Integer
advertiserId
;
private
String
advertId
;
public
Integer
getAdvertiserId
()
{
return
advertiserId
;
}
public
void
setAdvertiserId
(
Integer
advertiserId
)
{
this
.
advertiserId
=
advertiserId
;
}
public
String
getAdvertId
()
{
return
advertId
;
}
public
void
setAdvertId
(
String
advertId
)
{
this
.
advertId
=
advertId
;
}
public
String
getStartTime
()
{
return
startTime
;
...
...
src/main/resources/static/pages/advertiserManager/advertiserData.html
View file @
b26b0c24
...
...
@@ -10,16 +10,56 @@
<body>
<div
class=
"layui-container"
>
<div
class=
"layui-inline"
>
<input
type=
"text"
class=
"layui-input"
id=
"date1"
>
</div>
<table
class=
"layui-table"
><tr><td
style=
"font-size:16px;font-weight:bold"
>
投放概要
</td></tr><tr><td><table
id=
"demo"
lay-filter=
"adveriserManagerTable"
></table></td></tr></table>
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
<div
id=
"main"
style=
"width: 100%;height:800px;"
></div>
<div
class=
"layui-form"
>
<div
style=
"width: 160px"
>
<select
name=
""
style=
""
id=
"advertiser"
>
<!--<option value="12">请选择一个广告商</option>-->
<!--<option value="010">北京</option>-->
<!--<option value="021">上海</option>-->
<!--<option value="0571">杭州</option>-->
</select>
</div>
<div
class=
"layui-row"
>
<table
class=
"layui-table"
>
<tr><td
style=
"font-size:16px;font-weight:bold"
>
投放概要
</td></tr>
<tr>
<td>
<table
class=
"layui-table"
>
<thead>
<tr>
<th>
余额
</th>
<th>
昨日消耗
</th>
<th>
今日曝光
</th>
<th>
今日点击
</th>
<th>
七日消耗
</th>
<th>
本月消耗
</th>
</tr>
</thead>
<tbody
id=
"advertiserTable"
>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<div
style=
"width: 1140px"
>
<div
class=
""
style=
"width: 180px;float: right"
>
<input
type=
"text"
class=
"layui-input"
id=
"date1"
>
</div>
<div
class=
""
style=
"width: 160px;float: right"
>
<select
name=
""
style=
""
id=
"advert"
>
<!--<option value="101">请选择一个广告id</option>-->
<!--<option value="010">912</option>-->
<!--<option value="021">917</option>-->
<!--<option value="0571">967</option>-->
</select>
</div>
</div>
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
<div
class=
"layui-row"
>
<div
id=
"main"
style=
"width: 100%;height:400px;"
></div>
</div>
</div>
</div>
</body>
</html>
...
...
@@ -31,13 +71,41 @@
<script
src=
"../../js/libs/jquery.treetable.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/echarts.min.js"
></script>
<script>
var
tableIns
;
var
startTime
;
var
endTime
;
var
advertiserId
;
var
advertId
;
var
day
=
new
Date
();
startTime
=
day
.
format
(
"yyyy-MM-dd"
);
endTime
=
day
.
format
(
"yyyy-MM-dd"
);
function
init
(){
advertiserId
=
$
(
"#advertiser"
).
val
();
advertId
=
$
(
"#advert"
).
val
();
var
list
=
{
advertiserId
:
advertiserId
,
advertId
:
advertId
,
startTime
:
startTime
,
endTime
:
endTime
};
$
.
ajax
({
//请求方式
type
:
"post"
,
//请求的媒体类型
contentType
:
"application/json;charset=UTF-8"
,
//请求地址
url
:
"/advertiserController/advertiserData"
,
async
:
false
,
//数据,json字符串
data
:
JSON
.
stringify
(
list
),
//请求成功
success
:
function
(
result
)
{
//setTable(result.data);
},
//请求失败,包含具体的错误信息
error
:
function
(
e
){
console
.
log
(
e
.
status
);
console
.
log
(
e
.
responseText
);
}
});
}
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
laydate
.
render
({
...
...
@@ -52,32 +120,11 @@
});
});
layui
.
use
(
'table'
,
function
(){
var
table
=
layui
.
table
;
//第一个实例
tableIns
=
table
.
render
({
elem
:
'#demo'
,
url
:
'/advertiserController/advertiserData'
//数据接口
,
contentType
:
'application/json'
,
method
:
'post'
//,toolbar:'true'
,
where
:{
startTime
:
startTime
,
endTime
:
endTime
}
,
page
:
false
//开启分页
,
cols
:
[[
//表头
{
field
:
'reportDate'
,
title
:
'日期'
}
,{
field
:
'advertiserId'
,
title
:
'广告主id'
,
hide
:
"true"
}
,{
field
:
'codeId'
,
title
:
'广告id'
}
,{
field
:
'ecpm'
,
title
:
'ecpm'
}
,{
field
:
'cpc'
,
title
:
'cpc'
}
,{
field
:
'exposure'
,
title
:
'曝光'
}
,{
field
:
'click'
,
title
:
'点击'
}
,{
field
:
'income'
,
title
:
'收入'
}
,{
field
:
'advertiserName'
,
title
:
'广告主名称'
}
]]
});
layui
.
use
(
'form'
,
function
(){
var
form
=
layui
.
form
;
});
});
// 基于准备好的dom,初始化echarts实例
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'main'
));
...
...
@@ -183,7 +230,7 @@
// 使用刚指定的配置项和数据显示图表。
myChart
.
setOption
(
option
);
init
();
</script>
src/main/resources/static/pages/advertiserManager/advertiserDataCount.html
View file @
b26b0c24
...
...
@@ -50,7 +50,7 @@
//第一个实例
tableIns
=
table
.
render
({
elem
:
'#demo'
,
url
:
'/advertiser
Manager
Controller/advertCount'
//数据接口
,
url
:
'/advertiserController/advertCount'
//数据接口
,
contentType
:
'application/json'
,
method
:
'post'
,
toolbar
:
'true'
...
...
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