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
3361c471
Commit
3361c471
authored
Jan 03, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
e9ac9bf0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
60 deletions
+22
-60
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+0
-49
Fc_review_history.java
src/main/java/com/egolm/film/bean/Fc_review_history.java
+11
-11
Fc_review_record.java
src/main/java/com/egolm/film/bean/Fc_review_record.java
+11
-0
No files found.
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
3361c471
...
...
@@ -187,55 +187,6 @@ public class ReviewServiceImpl implements ReviewService {
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectArray
());
}
public
static
void
main
(
String
[]
args
)
{
String
ext_type
=
"最佳男主角"
;
Integer
review_round
=
2
;
Integer
review_state
=
null
;
String
keyword
=
null
;
String
sql
=
""
+
"select "
+
"rh.film_id, "
+
"rh.review_id, "
+
"rh.enroll_type_id, "
+
"rh.review_round, "
+
"rh.review_state, "
+
"rh.opt_state, "
+
"mf.cn_name, "
+
"mf.en_name, "
+
"mf.film_no, "
+
"rre.ext_type, "
+
"rre.ext_name, "
+
"avg(rre.ext_score) ext_score_avg "
+
"from "
+
"fc_review_record_ext rre, "
+
"fc_review_record rr, "
+
"fc_review_history rh left join fc_member_film mf on mf.id = rh.film_id "
+
"where "
+
"rre.ext_type = '"
+
ext_type
+
"' "
+
"and rh.review_round = "
+
review_round
+
" "
+
"and rre.record_id = rr.id "
+
"and rr.review_id = rh.review_id "
+
"and rh.enroll_type_id = 2 "
+
"and rh.opt_state = 2 "
+
"group by "
+
"rh.film_id, "
+
"rh.review_id, "
+
"rh.enroll_type_id, "
+
"rh.review_round, "
+
"rh.review_state, "
+
"rh.opt_state, "
+
"mf.cn_name, "
+
"mf.en_name, "
+
"mf.film_no, "
+
"rre.ext_type, "
+
"rre.ext_name "
;
SqlWhere
where
=
new
SqlWhere
().
eq
(
"t.review_state"
,
review_state
).
lk
(
new
String
[]
{
"tt.cn_name"
,
"tt.en_name"
,
"tt.film_no"
,
"tt.ext_name"
},
keyword
);
sql
=
"select @rownum:=@rownum+1 as rownum, t.* from ("
+
sql
+
") t, (select @rownum:=0) row order by t.ext_score_avg desc"
;
sql
=
"select tt.* from ("
+
sql
+
") tt "
+
StringUtil
.
join
(
" where "
,
" and "
,
""
,
""
,
where
.
getStringList
())
+
" order by tt.rownum"
;
System
.
out
.
println
(
sql
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryReviewListForUser
(
boolean
is_review
,
...
...
src/main/java/com/egolm/film/bean/Fc_review_history.java
View file @
3361c471
...
...
@@ -17,12 +17,12 @@ public class Fc_review_history implements java.io.Serializable {
@Column
(
columnDefinition
=
"int(11)'"
)
private
Integer
id
;
@Column
(
columnDefinition
=
"int(11) COMMENT '参审影片ID'"
)
private
Integer
film_id
;
@Column
(
columnDefinition
=
"int(11)'"
)
private
Integer
review_id
;
@Column
(
columnDefinition
=
"int(11) COMMENT '参审影片ID'"
)
private
Integer
film_id
;
@Column
(
columnDefinition
=
"int(11) COMMENT '影片性质'"
)
private
Integer
enroll_type_id
;
...
...
@@ -47,14 +47,6 @@ public class Fc_review_history implements java.io.Serializable {
return
id
;
}
public
void
setFilm_id
(
Integer
film_id
)
{
this
.
film_id
=
film_id
;
}
public
Integer
getFilm_id
()
{
return
film_id
;
}
public
void
setReview_id
(
Integer
review_id
)
{
this
.
review_id
=
review_id
;
}
...
...
@@ -63,6 +55,14 @@ public class Fc_review_history implements java.io.Serializable {
return
review_id
;
}
public
void
setFilm_id
(
Integer
film_id
)
{
this
.
film_id
=
film_id
;
}
public
Integer
getFilm_id
()
{
return
film_id
;
}
public
void
setEnroll_type_id
(
Integer
enroll_type_id
)
{
this
.
enroll_type_id
=
enroll_type_id
;
}
...
...
src/main/java/com/egolm/film/bean/Fc_review_record.java
View file @
3361c471
...
...
@@ -23,6 +23,9 @@ public class Fc_review_record implements java.io.Serializable {
@Column
(
columnDefinition
=
"int(11) COMMENT '评委ID'"
)
private
Integer
user_id
;
@Column
(
columnDefinition
=
"int(11) COMMENT '评委组ID(冗余,用于统计分组榜单,防止用户换组后无法统计)'"
)
private
Integer
user_group_id
;
@Column
(
columnDefinition
=
"bigint(11) COMMENT '观看时长(毫秒)'"
)
private
Long
view_time
;
...
...
@@ -81,6 +84,14 @@ public class Fc_review_record implements java.io.Serializable {
return
user_id
;
}
public
void
setUser_group_id
(
Integer
user_group_id
)
{
this
.
user_group_id
=
user_group_id
;
}
public
Integer
getUser_group_id
()
{
return
user_group_id
;
}
public
void
setView_time
(
Long
view_time
)
{
this
.
view_time
=
view_time
;
}
...
...
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