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
8b46ccb3
Commit
8b46ccb3
authored
Dec 28, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
886b4476
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
30 deletions
+38
-30
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+25
-28
Fc_review_history.java
src/main/java/com/egolm/film/bean/Fc_review_history.java
+11
-0
Fc_review_record_ext.java
src/main/java/com/egolm/film/bean/Fc_review_record_ext.java
+2
-2
No files found.
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
8b46ccb3
...
...
@@ -123,50 +123,45 @@ public class ReviewServiceImpl implements ReviewService {
public
List
<
Map
<
String
,
Object
>>
listNewAsianList
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Integer
review_round
,
Page
page
)
{
XRException
.
assertNotBlank
(
"评选轮数不能未空"
,
review_round
);
XRException
.
assertNotBlank
(
"获奖类型不能未空"
,
ext_type
);
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
);
String
sql
=
""
+
"select "
+
"r.id, "
+
"r.film_id, "
+
"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, "
+
"r.enroll_type_id, "
+
"r.review_round, "
+
"r.allot_stte, "
+
"r.review_state, "
+
"r.opt_state, "
+
"r.push_time, "
+
"r.review_time, "
+
"rre.ext_type, "
+
"rre.ext_name, "
+
"avg(rre.ext_score) ext_score_avg "
+
"from "
+
"fc_review r, fc_member_film mf, fc_review_record rr, fc_review_record_ext rre "
+
"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 "
+
"rr.review_round = "
+
review_round
+
" "
+
"rre.ext_type = '"
+
ext_type
+
"' "
+
"and r.film_id = mf.id "
+
"and r.id = rr.review_id "
+
"and rr.id = rre.record_id "
+
"and rr.review_state = 2, "
+
"and rr.review_time is not null "
+
"and rre.id is not null "
+
"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 "
+
"r.id, "
+
"r.film_id, "
+
"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, "
+
"r.enroll_type_id, "
+
"r.review_round, "
+
"r.allot_stte, "
+
"r.review_state, "
+
"r.opt_state, "
+
"r.push_time, "
+
"r.review_time, "
+
"rre.ext_type, "
+
"rre.ext_name "
;
+
"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"
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectList
());
...
...
@@ -593,6 +588,7 @@ public class ReviewServiceImpl implements ReviewService {
}
}
}
Integer
opt_state
=
jdbcTemplate
.
queryForInt
(
"select opt_state from fc_review where id = ?"
,
review
.
getId
());
Fc_review_history
history
=
new
Fc_review_history
();
history
.
setReview_id
(
review
.
getId
());
history
.
setEnroll_type_id
(
enroll_type_id
);
...
...
@@ -600,6 +596,7 @@ public class ReviewServiceImpl implements ReviewService {
history
.
setReview_round
(
review_round
);
history
.
setReview_state
(
review_state
);
history
.
setCreate_time
(
new
Date
());
history
.
setOpt_state
(
opt_state
);
jdbcTemplate
.
save
(
history
);
}
...
...
src/main/java/com/egolm/film/bean/Fc_review_history.java
View file @
8b46ccb3
...
...
@@ -32,6 +32,9 @@ public class Fc_review_history implements java.io.Serializable {
@Column
(
columnDefinition
=
"int(11) COMMENT '审片结论 1通过 2否决 3参赛 4参赛备选 5参展'"
)
private
Integer
review_state
;
@Column
(
columnDefinition
=
"int(11)'"
)
private
Integer
opt_state
;
@Column
(
columnDefinition
=
"datetime'"
)
private
Date
create_time
;
...
...
@@ -84,6 +87,14 @@ public class Fc_review_history implements java.io.Serializable {
return
review_state
;
}
public
void
setOpt_state
(
Integer
opt_state
)
{
this
.
opt_state
=
opt_state
;
}
public
Integer
getOpt_state
()
{
return
opt_state
;
}
public
void
setCreate_time
(
Date
create_time
)
{
this
.
create_time
=
create_time
;
}
...
...
src/main/java/com/egolm/film/bean/Fc_review_record_ext.java
View file @
8b46ccb3
...
...
@@ -24,10 +24,10 @@ public class Fc_review_record_ext implements java.io.Serializable {
@Column
(
columnDefinition
=
"double(10,2) COMMENT '奖项评分'"
)
private
Double
ext_score
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '
演职员
类型'"
)
@Column
(
columnDefinition
=
"varchar(255) COMMENT '
获奖
类型'"
)
private
String
ext_type
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '
演职员
名称'"
)
@Column
(
columnDefinition
=
"varchar(255) COMMENT '
获奖主体
名称'"
)
private
String
ext_name
;
...
...
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