Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
e5a9853b
Commit
e5a9853b
authored
Mar 18, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
077ef080
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
FilmReportService.java
...in/java/com/egolm/film/api/service/FilmReportService.java
+1
-0
FilmReportServiceImpl.java
...om/egolm/film/api/service/impl/FilmReportServiceImpl.java
+29
-0
AdminReportController.java
...a/com/egolm/film/api/web/admin/AdminReportController.java
+11
-0
No files found.
src/main/java/com/egolm/film/api/service/FilmReportService.java
View file @
e5a9853b
...
...
@@ -11,4 +11,5 @@ public interface FilmReportService {
Map
<
String
,
Object
>
applyTypeReport
();
List
<
Map
<
String
,
Object
>>
directorReport
(
String
playactor_name
,
Page
page
);
Map
<
String
,
Object
>
directorDetail
(
String
playactor_name
);
List
<
Map
<
String
,
Object
>>
queryUserViewReport
(
Page
page
);
}
src/main/java/com/egolm/film/api/service/impl/FilmReportServiceImpl.java
View file @
e5a9853b
...
...
@@ -8,6 +8,7 @@ import java.util.List;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.annotation.SynthesizedAnnotation
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.DateUtil
;
...
...
@@ -172,4 +173,32 @@ public class FilmReportServiceImpl implements FilmReportService {
return
res
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryUserViewReport
(
Page
page
)
{
String
sql
=
""
+
"select "
+
"u.uid, "
+
"u.username, "
+
"u.realname, "
+
"count(rr.id) count_all, "
+
"count(case when rr.view_time is not null then rr.id end) count_view, "
+
"count(case when rr.view_time is null then rr.id end) count_not_view, "
+
"count(case when rr.view_time is null and rr.create_time < '"
+
DateUtil
.
format
(
DateUtil
.
day
(
new
Date
(),
-
2
))
+
"' then rr.id end) count_timeout "
+
"from "
+
"fc_user u, "
+
"fc_review_record rr "
+
"where "
+
"rr.user_id = u.uid "
+
"group by "
+
"u.uid, "
+
"u.username, "
+
"u.realname "
;
System
.
out
.
println
(
sql
);
return
jdbcTemplate
.
limit
(
sql
,
page
);
}
public
static
void
main
(
String
[]
args
)
{
new
FilmReportServiceImpl
().
queryUserViewReport
(
null
);
}
}
src/main/java/com/egolm/film/api/web/admin/AdminReportController.java
View file @
e5a9853b
...
...
@@ -83,5 +83,16 @@ public class AdminReportController {
public
Object
directorDetail
(
String
playactor_name
)
{
return
Rjx
.
jsonOk
().
setData
(
filmReportService
.
directorDetail
(
playactor_name
));
}
@ResponseBody
@PostMapping
(
"user_view_report"
)
@ApiOperation
(
"评委观看统计"
)
public
Object
user_view_report
(
Long
index
,
Long
limit
,
String
[]
limitKey
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
filmReportService
.
queryUserViewReport
(
page
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
}
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