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
5109ae9e
Commit
5109ae9e
authored
Dec 28, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
8fb85982
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
23 deletions
+43
-23
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+27
-7
AdminReviewController.java
...a/com/egolm/film/api/web/admin/AdminReviewController.java
+14
-14
UserReviewController.java
...ava/com/egolm/film/api/web/user/UserReviewController.java
+2
-2
No files found.
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
5109ae9e
...
...
@@ -120,11 +120,22 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
listNewAsianList
(
String
keyword
,
Integer
review_state
,
Integer
playactor_type
,
Integer
reveiw_round
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
listNewAsianList
(
String
keyword
,
Integer
review_state
,
Integer
ext_type
,
Integer
review_round
,
Page
page
)
{
XRException
.
assertNotBlank
(
"评选轮数不能未空"
,
review_round
);
XRException
.
assertNotBlank
(
"获奖类型不能未空"
,
ext_type
);
SqlWhere
where
=
new
SqlWhere
()
.
eq
(
"rr.review_round"
,
review_round
)
.
eq
(
"rr.review_state"
,
review_state
)
.
eq
(
"rre.ext_type"
,
ext_type
)
.
lk
(
new
String
[]
{
"mf.cn_name"
,
"mf.en_name"
,
"mf.id"
,
"mf.film_no"
},
keyword
)
;
String
sql
=
""
+
"select "
+
"r.id, "
+
"r.film_id, "
+
"mf.cn_name, "
+
"mf.en_name, "
+
"mf.film_no, "
+
"r.enroll_type_id, "
+
"r.review_round, "
+
"r.allot_stte, "
...
...
@@ -132,19 +143,25 @@ public class ReviewServiceImpl implements ReviewService {
+
"r.opt_state, "
+
"r.push_time, "
+
"r.review_time, "
+
"rre.ext_title, "
+
"rre.ext_type, "
+
"rre.ext_name, "
+
"avg(rre.ext_score) ext_score_avg "
+
"from "
+
"fc_review r, fc_review_record rr, fc_review_record_ext rre "
+
"fc_review r, fc_
member_film mf, fc_
review_record rr, fc_review_record_ext rre "
+
"where "
+
"r.id = rr.review_id "
+
"r.film_id = mf.id "
+
"and r.id = rr.review_id "
+
"and rr.id = rre.record_id "
+
"and rr.review_round = "
+
reveiw_round
+
" "
+
"and rr.review_state = 2, "
+
"and rr.review_time is not null "
+
"and rre.id is not null "
+
StringUtil
.
join
(
" and "
,
"and "
,
" "
,
" "
,
where
.
getStringList
())
+
"group by "
+
"r.id, "
+
"r.film_id, "
+
"mf.cn_name, "
+
"mf.en_name, "
+
"mf.film_no, "
+
"r.enroll_type_id, "
+
"r.review_round, "
+
"r.allot_stte, "
...
...
@@ -152,8 +169,11 @@ public class ReviewServiceImpl implements ReviewService {
+
"r.opt_state, "
+
"r.push_time, "
+
"r.review_time, "
+
"rre.ext_title "
;
return
null
;
+
"rre.ext_type, "
+
"rre.ext_name "
;
sql
=
"select @rownum:=@rownum+1 as rownum, t.* from ("
+
sql
+
") t, (select @rownum:=0) row order by t.ext_score_avg "
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectList
());
}
@Override
...
...
src/main/java/com/egolm/film/api/web/admin/AdminReviewController.java
View file @
5109ae9e
...
...
@@ -92,20 +92,20 @@ public class AdminReviewController {
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
//
@ResponseBody
//
@PostMapping("listNewAsianList")
//
@ApiOperation("查询亚新榜单")
//
@ApiImplicitParams({
//
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
//
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
//
})
// public Object listNewAsian(
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.listNewAsianList(
page);
//
return Rjx.jsonOk().setData(list).setPage(page);
//
}
@ResponseBody
@PostMapping
(
"listNewAsianList"
)
@ApiOperation
(
"查询亚新榜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Object
listNewAsian
(
String
keyword
,
Integer
review_state
,
Integer
playactor_type
,
Integer
reveiw_round
,
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
.
listNewAsianList
(
keyword
,
review_state
,
playactor_type
,
reveiw_round
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
@ResponseBody
...
...
src/main/java/com/egolm/film/api/web/user/UserReviewController.java
View file @
5109ae9e
...
...
@@ -143,8 +143,8 @@ public class UserReviewController {
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"review_text_4"
,
value
=
"评语4"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_title"
,
value
=
"获奖标题 例如: 最佳男演员-张三"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"double"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_score"
,
value
=
"奖项得分"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_type"
,
value
=
"获奖类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_name"
,
value
=
"获奖人名称"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_type"
,
value
=
"获奖类型
例如 director:导演
"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
allowMultiple
=
true
,
name
=
"ext_name"
,
value
=
"获奖人名称
例如 张三
"
),
})
public
Object
saveReviewRecord
(
Integer
review_id
,
Long
view_time
,
Integer
review_state
,
Double
review_score
,
String
review_text
,
String
review_text_1
,
String
review_text_2
,
String
review_text_3
,
String
review_text_4
,
String
[]
ext_title
,
String
[]
ext_type
,
String
[]
ext_name
,
Double
[]
ext_score
)
{
LoginToken
token
=
tokenService
.
getToken
();
...
...
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