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
a9f15216
Commit
a9f15216
authored
Dec 24, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
77871dd2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
25 deletions
+80
-25
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+2
-0
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+5
-0
AdminReviewController.java
...a/com/egolm/film/api/web/admin/AdminReviewController.java
+63
-0
Fc_review_history.java
src/main/java/com/egolm/film/bean/Fc_review_history.java
+1
-16
Fc_review_record.java
src/main/java/com/egolm/film/bean/Fc_review_record.java
+9
-9
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
a9f15216
...
...
@@ -92,4 +92,6 @@ public interface ReviewService {
void
deleteDoubtfulById
(
Integer
id
);
Fc_review_record
queryReviewRecord
(
Integer
record_id
);
}
\ No newline at end of file
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
a9f15216
...
...
@@ -574,4 +574,9 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_doubtful where id = ?"
,
id
);
}
@Override
public
Fc_review_record
queryReviewRecord
(
Integer
record_id
)
{
return
jdbcTemplate
.
queryForBean
(
"select * from fc_review_record where id = ?"
,
Fc_review_record
.
class
,
record_id
);
}
}
\ No newline at end of file
src/main/java/com/egolm/film/api/web/admin/AdminReviewController.java
View file @
a9f15216
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -16,6 +18,10 @@ import com.egolm.film.api.service.AdminUserService;
import
com.egolm.film.api.service.FilmService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_review_record
;
import
com.egolm.film.bean.Fc_review_record_ext
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.model.LoginToken
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -145,4 +151,61 @@ public class AdminReviewController {
return
Rjx
.
jsonOk
().
setData
(
list
);
}
@ResponseBody
@Transactional
@PostMapping
(
"getReviewRecord"
)
@ApiOperation
(
"查询审片详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
false
,
name
=
"review_id"
,
value
=
"审片ID"
),
})
public
Object
saveReviewRecord
(
Integer
review_id
)
{
LoginToken
token
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
token
.
getId
();
Fc_review_record
record
=
reviewService
.
queryReviewRecord
(
user_id
,
review_id
);
List
<
Fc_review_record_ext
>
extList
=
reviewService
.
queryReviewRecordExtList
(
record
.
getId
());
return
Rjx
.
jsonOk
().
setData
(
record
).
set
(
"exts"
,
extList
);
}
@ResponseBody
@Transactional
@PostMapping
(
"saveReviewRecord"
)
@ApiOperation
(
"评委审片"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
false
,
name
=
"record_id"
,
value
=
"审片记录ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"double"
,
required
=
false
,
name
=
"review_score"
,
value
=
"评分"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"review_text"
,
value
=
"评语"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"review_text_1"
,
value
=
"评语1"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"review_text_2"
,
value
=
"评语2"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"review_text_3"
,
value
=
"评语3"
),
@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
=
"奖项得分"
),
})
public
Object
saveReviewRecord
(
Integer
record_id
,
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
,
Double
[]
ext_score
)
{
Fc_review_record
ru
=
reviewService
.
queryReviewRecord
(
record_id
);
ru
.
setReview_score
(
review_score
);
ru
.
setReview_state
(
review_state
);
ru
.
setReview_text
(
review_text
);
ru
.
setReview_text_1
(
review_text_1
);
ru
.
setReview_text_2
(
review_text_2
);
ru
.
setReview_text_3
(
review_text_3
);
ru
.
setReview_text_4
(
review_text_4
);
List
<
Fc_review_record_ext
>
exts
=
new
ArrayList
<
Fc_review_record_ext
>();
if
(
ext_title
!=
null
&&
ext_score
!=
null
)
{
if
(
ext_title
.
length
==
ext_score
.
length
)
{
for
(
int
i
=
0
;
i
<
ext_title
.
length
;
i
++)
{
Fc_review_record_ext
ext
=
new
Fc_review_record_ext
();
ext
.
setRecord_id
(
ru
.
getId
());
ext
.
setExt_title
(
ext_title
[
i
]);
ext
.
setExt_score
(
ext_score
[
i
]);
exts
.
add
(
ext
);
}
}
else
{
throw
new
XException
(
"评奖项目参数数量错误"
);
}
}
reviewService
.
saveReviewRecord
(
ru
,
exts
);
reviewService
.
tryNextRound
(
ru
.
getReview_id
());
return
Rjx
.
jsonOk
();
}
}
src/main/java/com/egolm/film/bean/Fc_review_history.java
View file @
a9f15216
...
...
@@ -39,11 +39,6 @@ public class Fc_review_history implements java.io.Serializable {
*/
private
Integer
review_state
;
/**
* 评选状态 0未评选 1有争议 2管理员分配 3审片完成
*/
private
Integer
opt_state
;
private
Date
create_time
;
...
...
@@ -62,17 +57,15 @@ public class Fc_review_history implements java.io.Serializable {
* @param enroll_type_id 影片性质
* @param review_round 审片轮数,第几轮审片
* @param review_state 审片结论 1通过 2否决 3参赛 4参赛备选 5参展
* @param opt_state 评选状态 0未评选 1有争议 2管理员分配 3审片完成
* @param create_time
*/
public
Fc_review_history
(
Integer
id
,
Integer
film_id
,
Integer
review_id
,
Integer
enroll_type_id
,
Integer
review_round
,
Integer
review_state
,
Integer
opt_state
,
Date
create_time
)
{
public
Fc_review_history
(
Integer
id
,
Integer
film_id
,
Integer
review_id
,
Integer
enroll_type_id
,
Integer
review_round
,
Integer
review_state
,
Date
create_time
)
{
this
.
id
=
id
;
this
.
film_id
=
film_id
;
this
.
review_id
=
review_id
;
this
.
enroll_type_id
=
enroll_type_id
;
this
.
review_round
=
review_round
;
this
.
review_state
=
review_state
;
this
.
opt_state
=
opt_state
;
this
.
create_time
=
create_time
;
}
...
...
@@ -124,14 +117,6 @@ 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.java
View file @
a9f15216
...
...
@@ -31,9 +31,9 @@ public class Fc_review_record implements java.io.Serializable {
private
Integer
user_id
;
/**
*
0未观看,1已观看
*
观看时长(分钟)
*/
private
Integer
view_
stat
e
;
private
Integer
view_
tim
e
;
/**
* 评选轮数
...
...
@@ -78,7 +78,7 @@ public class Fc_review_record implements java.io.Serializable {
* @param id 影片ID
* @param review_id 评选轮数
* @param user_id 评委ID
* @param view_
state 0未观看,1已观看
* @param view_
time 观看时长(分钟)
* @param review_round 评选轮数
* @param review_state 审片状态 1通过,2否决,3参赛,4参赛备选,5参展
* @param review_score 得分分数
...
...
@@ -89,11 +89,11 @@ public class Fc_review_record implements java.io.Serializable {
* @param review_text_4
* @param create_time
*/
public
Fc_review_record
(
Integer
id
,
Integer
review_id
,
Integer
user_id
,
Integer
view_
stat
e
,
Integer
review_round
,
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
,
Date
create_time
)
{
public
Fc_review_record
(
Integer
id
,
Integer
review_id
,
Integer
user_id
,
Integer
view_
tim
e
,
Integer
review_round
,
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
,
Date
create_time
)
{
this
.
id
=
id
;
this
.
review_id
=
review_id
;
this
.
user_id
=
user_id
;
this
.
view_
state
=
view_stat
e
;
this
.
view_
time
=
view_tim
e
;
this
.
review_round
=
review_round
;
this
.
review_state
=
review_state
;
this
.
review_score
=
review_score
;
...
...
@@ -129,12 +129,12 @@ public class Fc_review_record implements java.io.Serializable {
return
user_id
;
}
public
void
setView_
state
(
Integer
view_stat
e
)
{
this
.
view_
state
=
view_stat
e
;
public
void
setView_
time
(
Integer
view_tim
e
)
{
this
.
view_
time
=
view_tim
e
;
}
public
Integer
getView_
stat
e
()
{
return
view_
stat
e
;
public
Integer
getView_
tim
e
()
{
return
view_
tim
e
;
}
public
void
setReview_round
(
Integer
review_round
)
{
...
...
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