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
b67eb21e
Commit
b67eb21e
authored
Jan 02, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
6815c73a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
74 deletions
+57
-74
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+1
-3
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+51
-49
AdminReviewController.java
...a/com/egolm/film/api/web/admin/AdminReviewController.java
+5
-22
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
b67eb21e
...
...
@@ -42,9 +42,7 @@ public interface ReviewService {
Integer
opt_state
,
Page
page
);
List
<
Map
<
String
,
Object
>>
queryNewAsianRound3List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Page
page
);
List
<
Map
<
String
,
Object
>>
queryNewAsianRound2List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Page
page
);
List
<
Map
<
String
,
Object
>>
queryNewAsianRoundList
(
String
keyword
,
Integer
review_state
,
Integer
review_round
,
String
ext_type
,
Page
page
);
/**
* 查询评委审片列表
...
...
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
b67eb21e
...
...
@@ -119,56 +119,58 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryNewAsianRound2List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Page
page
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryNewAsianRound3List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
queryNewAsianRoundList
(
String
keyword
,
Integer
review_state
,
Integer
review_round
,
String
ext_type
,
Page
page
)
{
XRException
.
assertNotBlank
(
"获奖类型不能未空"
,
ext_type
);
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 = 3 "
+
"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"
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectList
());
XRException
.
assertNotBlank
(
"选片轮数不能为空"
,
review_round
);
if
(
review_round
.
intValue
()
==
3
)
{
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 = 3 "
+
"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"
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectList
());
}
else
if
(
review_round
.
intValue
()
==
2
)
{
throw
new
XRException
(
"亚新二选榜单没有没有准备好"
);
}
else
{
throw
new
XRException
(
"只能查询亚新2,3选榜单"
);
}
}
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/egolm/film/api/web/admin/AdminReviewController.java
View file @
b67eb21e
...
...
@@ -93,38 +93,21 @@ public class AdminReviewController {
}
@ResponseBody
@PostMapping
(
"getNewAsianRound
2
List"
)
@ApiOperation
(
"查询亚新
2选
榜单"
)
@PostMapping
(
"getNewAsianRoundList"
)
@ApiOperation
(
"查询亚新榜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
name
=
"keyword"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"review_state"
,
value
=
"评委意见(3参赛 4参赛备选 5参展)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"ext_type"
,
value
=
"获奖类型(前端根据审片时保存到数据库的对应字段进行检索)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"review_round"
,
value
=
"第2或3选(2,3)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Object
getNewAsianRound
2List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Long
index
,
Long
limit
)
{
public
Object
getNewAsianRound
3List
(
String
keyword
,
Integer
review_state
,
Integer
review_round
,
String
ext_type
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
queryNewAsianRound2List
(
keyword
,
review_state
,
ext_type
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
@ResponseBody
@PostMapping
(
"getNewAsianRound3List"
)
@ApiOperation
(
"查询亚新3选榜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
name
=
"keyword"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"review_state"
,
value
=
"评委意见(3参赛 4参赛备选 5参展)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"ext_type"
,
value
=
"获奖类型(前端根据审片时保存到数据库的对应字段进行检索)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Object
getNewAsianRound3List
(
String
keyword
,
Integer
review_state
,
String
ext_type
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
queryNewAsianRound3List
(
keyword
,
review_state
,
ext_type
,
page
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
queryNewAsianRoundList
(
keyword
,
review_state
,
review_round
,
ext_type
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
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