Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_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
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
maliang
lwby_copyright_book_data
Commits
e23ac692
Commit
e23ac692
authored
Apr 29, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限控制
parent
8a2b5b76
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
392 additions
and
4 deletions
+392
-4
AdvertiserController.java
...boot/security/server/controller/AdvertiserController.java
+2
-3
CopyrightBookController.java
...t/security/server/controller/CopyrightBookController.java
+10
-0
CopyrightDao.java
src/main/java/com/boot/security/server/dao/CopyrightDao.java
+8
-0
CopyrightBookService.java
...om/boot/security/server/service/CopyrightBookService.java
+4
-0
CopyrightBookServiceImpl.java
...ecurity/server/service/impl/CopyrightBookServiceImpl.java
+4
-0
application.yml
src/main/resources/application.yml
+1
-1
copyrightMonthSettlement.html
...tic/pages/copyrightBookData/copyrightMonthSettlement.html
+363
-0
No files found.
src/main/java/com/boot/security/server/controller/AdvertiserController.java
View file @
e23ac692
package
com
.
boot
.
security
.
server
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.boot.security.server.dao.AdvertDao
;
import
com.boot.security.server.model.AdvertiserData
;
...
...
@@ -14,9 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/advertiserController"
)
...
...
src/main/java/com/boot/security/server/controller/CopyrightBookController.java
0 → 100644
View file @
e23ac692
package
com
.
boot
.
security
.
server
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/copyrightBookController"
)
public
class
CopyrightBookController
{
}
src/main/java/com/boot/security/server/dao/CopyrightDao.java
0 → 100644
View file @
e23ac692
package
com
.
boot
.
security
.
server
.
dao
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
CopyrightDao
{
}
src/main/java/com/boot/security/server/service/CopyrightBookService.java
0 → 100644
View file @
e23ac692
package
com
.
boot
.
security
.
server
.
service
;
public
interface
CopyrightBookService
{
}
src/main/java/com/boot/security/server/service/impl/CopyrightBookServiceImpl.java
0 → 100644
View file @
e23ac692
package
com
.
boot
.
security
.
server
.
service
.
impl
;
public
class
CopyrightBookServiceImpl
{
}
src/main/resources/application.yml
View file @
e23ac692
...
...
@@ -71,4 +71,4 @@ token:
seconds
:
7200
jwtSecret
:
(XIAO:)_$^11244^%$_(WEI:)_@@++--(LAO:)_++++_.sds_(SHI:)
server
:
port
:
8089
\ No newline at end of file
port
:
8091
\ No newline at end of file
src/main/resources/static/pages/copyrightBookData/copyrightMonthSettlement.html
0 → 100644
View file @
e23ac692
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
广告主数据汇总
</title>
</head>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.css"
/>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.theme.default.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"../../layui/css/layui.css"
>
<body>
<div
class=
"layui-container"
>
<div
class=
"layui-form"
>
<div
class=
"layui-row"
>
<div
style=
"width: 160px"
>
<select
name=
""
style=
""
id=
"advertiser"
lay-filter=
"copyright"
>
</select>
</div>
<span>
未结算金额:
</span>
</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>
<th>
结算状态
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
name=
"advertiserTable"
id=
"schema"
>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
<script
type=
"text/javascript"
src=
"../../js/libs/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/jq.js"
></script>
<script
type=
"text/javascript"
src=
"../../layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/my/permission.js"
></script>
<script
src=
"../../js/libs/jquery.treetable.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/echarts.min.js"
></script>
<script>
var
startTime
;
var
endTime
;
var
advertiserId
;
var
advertId
;
var
day
=
new
Date
();
startTime
=
day
.
format
(
"yyyy-MM-dd"
);
endTime
=
day
.
format
(
"yyyy-MM-dd"
);
var
advertiser
=
$
(
"#advertiser"
);
var
advert
=
$
(
"#advertId"
);
var
table
=
$
(
"#schema"
);
var
dataTime
;
var
click
;
var
exposure
;
advertiserId
=
$
(
"#advertiser"
).
val
();
advertId
=
$
(
"#advertId"
).
val
();
function
init
(){
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
)
{
var
jsonObj
=
JSON
.
parse
(
result
);
setOption
(
jsonObj
.
advertiser
,
jsonObj
.
advert
);
setTable
(
jsonObj
.
schema
);
dataTime
=
jsonObj
.
dataTime
;
exposure
=
jsonObj
.
exposure
;
click
=
jsonObj
.
click
;
}
});
}
function
setOption
(
advertiserData
,
advertData
){
for
(
j
=
0
,
len
=
advertiserData
.
length
;
j
<
len
;
j
++
)
{
advertiser
.
append
(
"<option value="
+
advertiserData
[
j
].
advertiserId
+
">"
+
advertiserData
[
j
].
advertiserName
+
"</option>"
);
}
for
(
j
=
0
,
len
=
advertData
.
length
;
j
<
len
;
j
++
)
{
advert
.
append
(
"<option value="
+
advertData
[
j
].
codeId
+
">"
+
advertData
[
j
].
codeId
+
"</option>"
);
}
}
function
setOptionRm
(
advertData
){
advert
.
empty
();
advert
.
append
(
"<option value="
+
"all"
+
">全部</option>"
);
for
(
j
=
0
,
len
=
advertData
.
length
;
j
<
len
;
j
++
)
{
advert
.
append
(
"<option value="
+
advertData
[
j
].
codeId
+
">"
+
advertData
[
j
].
codeId
+
"</option>"
);
}
}
function
setTable
(
data
)
{
table
.
append
(
"<tr><td>"
+
data
.
balance
+
"</td><td>"
+
data
.
income
+
"</td><td>"
+
data
.
exposure
+
"</td><td>"
+
data
.
click
+
"</td><td>"
+
data
.
incomeSeven
+
"</td><td>"
+
data
.
incomeThirty
+
"</td></tr>"
);
}
function
setTableRm
(
data
)
{
table
.
empty
();
table
.
append
(
"<tr><td>"
+
data
.
balance
+
"</td><td>"
+
data
.
income
+
"</td><td>"
+
data
.
exposure
+
"</td><td>"
+
data
.
click
+
"</td><td>"
+
data
.
incomeSeven
+
"</td><td>"
+
data
.
incomeThirty
+
"</td></tr>"
);
}
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
laydate
.
render
({
elem
:
'#date1'
,
range
:
true
,
value
:
startTime
+
' - '
+
endTime
,
done
:
function
(
value
,
date
,
endDate
)
{
var
sday
=
date
.
date
;
var
smonth
=
date
.
month
;
var
eday
=
endDate
.
date
;
var
emonth
=
endDate
.
month
;
var
snumberd
=
parseInt
(
sday
);
var
snumberm
=
parseInt
(
smonth
);
var
enumberd
=
parseInt
(
eday
);
var
enumberm
=
parseInt
(
emonth
);
if
(
snumberd
<
10
){
sday
=
'0'
+
sday
;
}
if
(
snumberm
<
10
){
smonth
=
'0'
+
smonth
}
if
(
enumberd
<
10
){
eday
=
'0'
+
eday
;
}
if
(
enumberm
<
10
){
emonth
=
'0'
+
emonth
}
startTime
=
date
.
year
+
'-'
+
smonth
+
'-'
+
sday
;
endTime
=
endDate
.
year
+
'-'
+
emonth
+
'-'
+
eday
;
advertiserId
=
$
(
"#advertiser"
).
val
();
advertId
=
$
(
"#advertId"
).
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
)
{
var
jsonObj
=
JSON
.
parse
(
result
);
setOptionRm
(
jsonObj
.
advert
);
setTableRm
(
jsonObj
.
schema
);
dataTime
=
jsonObj
.
dataTime
;
exposure
=
jsonObj
.
exposure
;
click
=
jsonObj
.
click
;
option
.
xAxis
.
data
=
dataTime
;
option
.
series
[
0
].
data
=
exposure
;
option
.
series
[
1
].
data
=
click
;
myChart
.
setOption
(
option
,
true
);
}
});
}
});
});
layui
.
use
(
'form'
,
function
(){
var
form
=
layui
.
form
;
form
.
on
(
'select(advertiser)'
,
function
(
data
){
advertiserId
=
data
.
value
;
advertId
=
$
(
"#advertId"
).
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
)
{
console
.
log
(
result
);
var
jsonObj
=
JSON
.
parse
(
result
);
setOptionRm
(
jsonObj
.
advert
);
setTableRm
(
jsonObj
.
schema
);
dataTime
=
jsonObj
.
dataTime
;
exposure
=
jsonObj
.
exposure
;
click
=
jsonObj
.
click
;
option
.
xAxis
.
data
=
dataTime
;
option
.
series
[
0
].
data
=
exposure
;
option
.
series
[
1
].
data
=
click
;
myChart
.
setOption
(
option
,
true
);
form
.
render
(
'select'
);
}
});
});
form
.
on
(
'select(advert)'
,
function
(
data
){
advertId
=
data
.
value
;
advertiserId
=
$
(
"#advertiser"
).
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
)
{
var
jsonObj
=
JSON
.
parse
(
result
);
setOptionRm
(
jsonObj
.
advert
);
setTableRm
(
jsonObj
.
schema
);
dataTime
=
jsonObj
.
dataTime
;
exposure
=
jsonObj
.
exposure
;
click
=
jsonObj
.
click
;
option
.
xAxis
.
data
=
dataTime
;
option
.
series
[
0
].
data
=
exposure
;
option
.
series
[
1
].
data
=
click
;
myChart
.
setOption
(
option
,
true
);
}
});
});
});
init
();
// 基于准备好的dom,初始化echarts实例
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'main'
));
// 指定图表的配置项和数据
var
option
=
{
title
:
{
text
:
'广告数据'
},
tooltip
:
{
trigger
:
'axis'
// axis item none三个值
},
legend
:
{
type
:
'scroll'
,
bottom
:
'0%'
,
data
:[
'曝光'
,
'点击'
]
},
xAxis
:
{
type
:
'category'
,
name
:
'时间'
,
// data: ["2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23"]
data
:
dataTime
},
yAxis
:
{
name
:
'曝光/点击量'
},
series
:
[{
name
:
'曝光'
,
type
:
'line'
,
smooth
:
true
,
//true 为平滑曲线
itemStyle
:
{
// 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0.4
,
x2
:
0.7
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgb(198,226,255)'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'rgb(58,95,205)'
// 100% 处的颜色
},{
offset
:
0.4
,
color
:
'rgb(67,110,238)'
// 40% 处的颜色
}],
global
:
false
// 缺省为 false
}
},
//线条样式
areaStyle
:{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgb(67,110,238,0.7)'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'rgb(198,226,255,0.4)'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
},
// data: [551, 2002, 3651, 1007, 1989, 2014,2789,455]
data
:
exposure
},{
name
:
'点击'
,
type
:
'line'
,
smooth
:
true
,
//true 为平滑曲线
itemStyle
:
{
// 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0.4
,
x2
:
0.7
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgb(255,99,71)'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'rgb(205,55,0)'
// 100% 处的颜色
},{
offset
:
0.4
,
color
:
'rgb(255,69,0)'
// 40% 处的颜色
}],
global
:
false
// 缺省为 false
}
},
//线条样式
areaStyle
:{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgb(255,48,48,0.7)'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'rgb(255,106,106,0.4)'
// 100% 处的颜色
}],
global
:
false
// 缺省为 false
}
},
// data: [402, 1001, 2347, 771, 1110, 1556,2554,277]
data
:
click
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart
.
setOption
(
option
);
</script>
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