Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
f8a67011
Commit
f8a67011
authored
Apr 14, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/lee/chnmuseum-party
into master
parents
c6267fa1
68acefa0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
49 deletions
+89
-49
TBoardStatisticServiceImpl.java
...museum/party/service/impl/TBoardStatisticServiceImpl.java
+78
-46
TBoardStatisticController.java
...useum/party/web/controller/TBoardStatisticController.java
+11
-3
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/TBoardStatisticServiceImpl.java
View file @
f8a67011
This diff is collapsed.
Click to expand it.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoardStatisticController.java
View file @
f8a67011
...
...
@@ -22,6 +22,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -29,6 +30,8 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotNull
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
...
...
@@ -232,7 +235,7 @@ public class TBoardStatisticController extends BaseController {
// @RequiresAuthentication //@RequiresPermissions("t:board:statistic:Page")
@ApiOperation
(
value
=
"获取展板播放趋势Pc"
,
notes
=
"获取展板播放趋势Pc"
)
// @MethodLog(operModule = OperModule.TEND, operType = OperType.SELECT)
public
Map
<
String
,
Object
>
getBoardPageList
(
TBoardPlayTrend
trend
)
{
public
Map
<
String
,
Object
>
getBoardPageList
(
TBoardPlayTrend
trend
)
throws
ParseException
{
TUser
user
=
null
;
try
{
user
=
getcurUser
();
...
...
@@ -247,17 +250,22 @@ public class TBoardStatisticController extends BaseController {
trend
.
setBeginDate
(
DateUtil
.
getCurrentDate
(
"yyyy"
)+
"01"
);
trend
.
setEndDate
(
DateUtil
.
getCurrentDate
(
"yyyyMM"
));
}
Page
<
TBoardPlayTrend
>
page
=
this
.
tBoardStatisticService
.
getBoardPageList
(
getPage
(),
trend
);
// 处理数据为展板趋势图
Map
map
=
new
HashMap
();
List
dateList
=
new
ArrayList
();
List
cntList
=
new
ArrayList
();
for
(
TBoardPlayTrend
t
:
page
.
getRecords
())
{
dateList
.
add
(
t
.
getPlayDate
());
cntList
.
add
(
t
.
getPlayNumber
());
}
page
.
getRecords
().
sort
(
Comparator
.
comparing
(
TBoardPlayTrend:
:
getPlayNumber
).
reversed
());
List
<
TBoardPlayTrend
>
list
=
page
.
getRecords
();
list
.
sort
(
Comparator
.
comparing
(
TBoardPlayTrend:
:
getPlayNumber
,
Comparator
.
reverseOrder
()).
thenComparing
(
TBoardPlayTrend:
:
getPlayDate
,
Comparator
.
reverseOrder
()));
if
(
list
.
size
()>=
10
)
{
list
=
list
.
subList
(
0
,
10
);
}
page
.
setRecords
(
list
);
map
.
put
(
"dateList"
,
dateList
);
map
.
put
(
"cntList"
,
cntList
);
map
.
put
(
"page"
,
page
);
...
...
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