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
8764dee7
Commit
8764dee7
authored
Mar 28, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
f5364cb1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+4
-2
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+9
-3
UserReviewController.java
...ava/com/egolm/film/api/web/user/UserReviewController.java
+2
-4
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
8764dee7
...
...
@@ -78,7 +78,9 @@ public interface ReviewService {
List
<
Map
<
String
,
Object
>>
queryDoubtfulListByFilmIdId
(
Integer
film_id
);
Fc_review_record
queryReviewRecord
(
Integer
user_id
,
Integer
review_id
);
Fc_review_record
queryCurrentReviewRecord
(
Integer
user_id
,
Integer
review_id
);
Fc_review_record
queryCurrentReviewRecord
(
Integer
review_id
);
void
saveReviewRecord
(
Fc_review_record
ru
,
List
<
Fc_review_record_ext
>
exts
);
...
...
@@ -137,5 +139,5 @@ public interface ReviewService {
Map
<
String
,
Object
>
queryFilmReport
(
Integer
user_id
);
Fc_review_record
queryReviewRecord
(
Integer
record_id
);
Fc_review_record
queryReviewRecord
ById
(
Integer
record_id
);
}
\ No newline at end of file
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
8764dee7
...
...
@@ -252,16 +252,22 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public
Fc_review_record
queryReviewRecord
(
Integer
user_id
,
Integer
review_id
)
{
public
Fc_review_record
query
Current
ReviewRecord
(
Integer
user_id
,
Integer
review_id
)
{
String
sql
=
"select rr.* from fc_review_record rr, fc_review r where rr.user_id = ? and rr.review_id = ? and rr.review_id = r.id and rr.review_round = r.review_round"
;
return
jdbcTemplate
.
queryForBean
(
sql
,
Fc_review_record
.
class
,
user_id
,
review_id
);
}
@Override
public
Fc_review_record
queryCurrentReviewRecord
(
Integer
review_id
)
{
String
sql
=
"select rr.* from fc_review_record rr, fc_review r where rr.review_id = ? and rr.review_id = r.id and rr.review_round = r.review_round"
;
return
jdbcTemplate
.
queryForBean
(
sql
,
Fc_review_record
.
class
,
review_id
);
}
@Override
@Transactional
public
void
saveReviewRecord
(
Fc_review_record
ru
,
List
<
Fc_review_record_ext
>
exts
)
{
Fc_review
review
=
this
.
queryReviewById
(
ru
.
getReview_id
());
Fc_review_record
record
=
this
.
queryReviewRecord
(
ru
.
getId
());
Fc_review_record
record
=
this
.
queryReviewRecord
ById
(
ru
.
getId
());
if
(!
ru
.
getReview_state
().
equals
(
record
.
getReview_state
())
&&
review
.
getReview_round
().
intValue
()
!=
ru
.
getReview_round
().
intValue
())
{
throw
new
XRException
(
"不能修改历史审片结论"
);
}
...
...
@@ -274,7 +280,7 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public
Fc_review_record
queryReviewRecord
(
Integer
record_id
)
{
public
Fc_review_record
queryReviewRecord
ById
(
Integer
record_id
)
{
return
jdbcTemplate
.
queryForBean
(
"select * from fc_review_record where id = ?"
,
Fc_review_record
.
class
,
record_id
);
}
...
...
src/main/java/com/egolm/film/api/web/user/UserReviewController.java
View file @
8764dee7
...
...
@@ -176,7 +176,7 @@ public class UserReviewController {
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
();
Integer
user_id
=
(
Integer
)
token
.
getId
();
Fc_review_record
ru
=
service
.
queryReviewRecord
(
user_id
,
review_id
);
Fc_review_record
ru
=
service
.
query
Current
ReviewRecord
(
user_id
,
review_id
);
ru
.
setView_time
(
view_time
);
ru
.
setReview_score
(
review_score
);
ru
.
setReview_state
(
review_state
);
...
...
@@ -218,9 +218,7 @@ public class UserReviewController {
@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
=
service
.
queryReviewRecord
(
user_id
,
review_id
);
Fc_review_record
record
=
service
.
queryCurrentReviewRecord
(
review_id
);
List
<
Fc_review_record_ext
>
extList
=
service
.
queryReviewRecordExtList
(
record
.
getId
());
return
Rjx
.
jsonOk
().
setData
(
record
).
set
(
"exts"
,
extList
);
}
...
...
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