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
ee77bcef
Commit
ee77bcef
authored
May 07, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传bug修复
parent
621fa2c6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
164 additions
and
0 deletions
+164
-0
CopyrightBookController.java
...t/security/server/controller/CopyrightBookController.java
+7
-0
CopyrightDao.java
src/main/java/com/boot/security/server/dao/CopyrightDao.java
+4
-0
BaseSettlement.java
...n/java/com/boot/security/server/model/BaseSettlement.java
+8
-0
CopyrightBookService.java
...om/boot/security/server/service/CopyrightBookService.java
+1
-0
CopyrightBookServiceImpl.java
...ecurity/server/service/impl/CopyrightBookServiceImpl.java
+10
-0
CopyrightMapper.xml
src/main/resources/mybatis-mappers/CopyrightMapper.xml
+16
-0
bookInfo.html
...in/resources/static/pages/copyrightBookData/bookInfo.html
+118
-0
No files found.
src/main/java/com/boot/security/server/controller/CopyrightBookController.java
View file @
ee77bcef
...
...
@@ -36,4 +36,11 @@ public class CopyrightBookController {
BaseSettlement
baseSettlement
=
request
.
getBaseSettlement
();
copyrightDao
.
updateSettlementStatus
(
baseSettlement
.
getCopyrightId
(),
baseSettlement
.
getReportDate
(),
baseSettlement
.
getStatus
(),
baseSettlement
.
getStatusName
());
}
@PostMapping
(
"/bookInfo"
)
@ApiOperation
(
value
=
"获取书籍上架信息"
)
@ResponseBody
public
String
getBookInfo
(
@RequestBody
PageTableRequest
request
)
{
return
copyrightBookService
.
selectBookInfo
(
request
.
getCopyrightIds
());
}
}
src/main/java/com/boot/security/server/dao/CopyrightDao.java
View file @
ee77bcef
...
...
@@ -13,6 +13,10 @@ public interface CopyrightDao {
Integer
selectTableListMonthCount
(
@Param
(
"copyrightId"
)
Integer
copyrightId
);
List
<
BaseSettlement
>
selectBookInfo
(
@Param
(
"copyrightId"
)
Integer
copyrightId
);
Integer
selectBookInfoCount
(
@Param
(
"copyrightId"
)
Integer
copyrightId
);
List
<
BaseSettlement
>
selectCopyrightAll
();
List
<
BaseSettlement
>
selectBookDetail
(
@Param
(
"copyrightIdList"
)
List
<
BaseSettlement
>
copyrightIdList
,
@Param
(
"bookId"
)
Long
bookId
,
@Param
(
"bookName"
)
String
bookName
);
...
...
src/main/java/com/boot/security/server/model/BaseSettlement.java
View file @
ee77bcef
...
...
@@ -13,6 +13,7 @@ public class BaseSettlement extends BaseEntity<Long>{
public
String
kouliang_ratio
;
public
String
batch_id
;
public
String
batch_name
;
public
Integer
cpId
;
public
String
bookId
;
public
String
bookName
;
public
String
authors
;
...
...
@@ -27,6 +28,13 @@ public class BaseSettlement extends BaseEntity<Long>{
public
Integer
status
;
public
String
statusName
;
public
Integer
getCpId
()
{
return
cpId
;
}
public
void
setCpId
(
Integer
cpId
)
{
this
.
cpId
=
cpId
;
}
public
Double
getCountSettlement
()
{
return
countSettlement
;
...
...
src/main/java/com/boot/security/server/service/CopyrightBookService.java
View file @
ee77bcef
...
...
@@ -5,4 +5,5 @@ import com.boot.security.server.model.BaseSettlement;
public
interface
CopyrightBookService
{
String
selectSettlement
(
Integer
copyrightId
,
Integer
page
,
Integer
limit
);
String
getAllCopyright
();
String
selectBookInfo
(
Integer
copyrightId
);
}
src/main/java/com/boot/security/server/service/impl/CopyrightBookServiceImpl.java
View file @
ee77bcef
...
...
@@ -112,4 +112,14 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
jsonObject
.
put
(
"data"
,
baseSettlements
);
return
jsonObject
.
toJSONString
();
}
@Override
public
String
selectBookInfo
(
Integer
copyrightId
)
{
if
(
copyrightId
==
null
||
copyrightId
==
0
){
copyrightId
=
null
;
}
List
<
BaseSettlement
>
baseSettlements
=
copyrightDao
.
selectBookInfo
(
copyrightId
);
Integer
count
=
copyrightDao
.
selectBookInfoCount
(
copyrightId
);
return
PageTableHandler
.
getJSONObject
(
baseSettlements
,
count
);
}
}
src/main/resources/mybatis-mappers/CopyrightMapper.xml
View file @
ee77bcef
...
...
@@ -37,6 +37,22 @@
FROM bi_report.book_banquanweihu a group by a.copyright_id,a.copyright_name;
</select>
<select
id=
"selectBookInfo"
resultType=
"com.boot.security.server.model.BaseSettlement"
>
SELECT book_id bookId,cp_id cpId,book_name bookName,authors
FROM bi_report.books_api
<if
test=
"copyrightId != null"
>
where copyright_id=#{copyrightId}
</if>
</select>
<select
id=
"selectBookInfoCount"
resultType=
"Integer"
>
SELECT count(*)
FROM bi_report.books_api
<if
test=
"copyrightId != null"
>
where copyright_id=#{copyrightId}
</if>
</select>
<select
id=
"selectBookDetail"
resultType=
"com.boot.security.server.model.BaseSettlement"
parameterType=
"java.util.List"
>
select reportDate,copyright_id copyrightId,copyright_name copyrightName,book_id bookId,book_name bookName,authors,sum(total_amount) totalAmount,sum(total_ad_amount) totalAdvertAmount
from
...
...
src/main/resources/static/pages/copyrightBookData/bookInfo.html
0 → 100644
View file @
ee77bcef
<!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"
class=
"layui-col-md3"
>
<select
id=
"copyrightId"
lay-filter=
"copyright"
>
<option
value=
"0"
>
全部
</option>
</select>
</div>
</div>
<div
class=
"layui-row"
>
<table
class=
"layui-table"
id=
"bookInfo"
lay-filter=
"test"
>
</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
copyrightId
;
copyrightId
=
$
(
"#copyrightId"
);
var
form
;
var
copyrights
;
var
tableIns
;
layui
.
use
(
'table'
,
function
()
{
var
table
=
layui
.
table
;
tableIns
=
table
.
render
({
elem
:
'#bookInfo'
,
method
:
'post'
,
contentType
:
'application/json'
,
url
:
'/copyrightBookController/bookInfo'
,
page
:
true
,
toolbar
:
'true'
,
defaultToolbar
:
[
'exports'
]
,
cols
:
[[
{
field
:
'bookId'
,
title
:
'必看bookId'
,
fixed
:
'left'
}
,{
field
:
'cpId'
,
title
:
'CPookId'
}
,{
field
:
'bookName'
,
title
:
'书名'
}
,{
field
:
'authors'
,
title
:
'作者'
,
fixed
:
'right'
}
]]
//设置表头
});
});
layui
.
use
(
'form'
,
function
()
{
form
=
layui
.
form
;
form
.
on
(
'select(copyright)'
,
function
(
data
){
copyrights
=
data
.
value
;
reload
(
copyrights
)
});
});
function
reload
(
data
)
{
//执行重载
tableIns
.
reload
({
page
:
{
curr
:
1
//重新从第 1 页开始
}
,
where
:
{
copyrightIds
:
data
}
});
}
function
init
(){
//var list={copyrightId:copyrightId};
$
.
ajax
({
//请求方式
type
:
"post"
,
//请求的媒体类型
contentType
:
"application/json;charset=UTF-8"
,
//请求地址
url
:
"/copyrightBookController/getAllCopyright"
,
async
:
false
,
//数据,json字符串
//data : JSON.stringify(list),ajax controller有请求参数必须传参写data
//请求成功
success
:
function
(
result
)
{
var
jsonObj
=
JSON
.
parse
(
result
);
setOption
(
jsonObj
.
data
);
}
});
}
function
setOption
(
data
){
var
len
=
data
.
length
;
for
(
j
=
0
;
j
<
len
;
j
++
)
{
copyrightId
.
append
(
"<option value="
+
data
[
j
].
copyrightId
+
">"
+
data
[
j
].
copyrightName
+
"</option>"
);
}
}
init
();
</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