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
b304a3f7
Commit
b304a3f7
authored
Jan 03, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
86ac5271
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+3
-1
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+10
-0
AdminReviewController.java
...a/com/egolm/film/api/web/admin/AdminReviewController.java
+10
-5
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
b304a3f7
...
...
@@ -92,12 +92,14 @@ public interface ReviewService {
void
saveReviewRecordIfNotExists
(
Integer
review_id
,
Integer
review_round
,
Integer
[]
user_id
);
void
deleteReviewRecord
(
Integer
review_id
,
Integer
review_round
,
Integer
[]
user_id
);
void
deleteDoubtfulById
(
Integer
id
);
Map
<
String
,
Object
>
queryReviewRecordMapById
(
Integer
record_id
);
Fc_review
queryReview
(
int
film_id
);
public
List
<
Map
<
String
,
Object
>>
queryUserGroupListByReviewRecord
(
int
enroll_type_id
,
Integer
review_round
);
List
<
Map
<
String
,
Object
>>
queryUserGroupListByReviewRecord
(
int
enroll_type_id
,
Integer
review_round
);
}
\ No newline at end of file
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
b304a3f7
...
...
@@ -674,6 +674,16 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate
.
executeUpdate
(
"update fc_review set allot_state = 1, opt_state = 0 where id = ? and review_round = ?"
,
review_id
,
review_round
);
}
@Override
public
void
deleteReviewRecord
(
Integer
review_id
,
Integer
review_round
,
Integer
[]
user_id
)
{
String
sql
=
"delete from fc_review_record where review_id = ? and review_round = ? and user_id = ? and review_state is null"
;
Object
[][]
objs
=
new
Object
[
user_id
.
length
][];
for
(
int
i
=
0
;
i
<
objs
.
length
;
i
++)
{
objs
[
i
]
=
new
Object
[]{
review_id
,
review_round
,
user_id
[
i
]};
}
jdbcTemplate
.
batchUpdate
(
sql
,
objs
);
}
@Override
public
void
deleteDoubtfulById
(
Integer
id
)
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_doubtful where id = ?"
,
id
);
...
...
src/main/java/com/egolm/film/api/web/admin/AdminReviewController.java
View file @
b304a3f7
...
...
@@ -133,12 +133,17 @@ public class AdminReviewController {
@PostMapping
(
"allot"
)
@ApiOperation
(
"分配审片评委"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"boolean"
,
required
=
true
,
name
=
"is_cancel"
,
value
=
"是否取消分配"
,
defaultValue
=
"false"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"review_id"
,
value
=
"审片主表ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"review_round"
,
value
=
"分配评委的审片环节"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"user_id"
,
value
=
"审片评委ID"
,
allowMultiple
=
true
),
})
public
Object
allot
(
Integer
review_id
,
Integer
review_round
,
Integer
[]
user_id
)
{
public
Object
allot
(
Boolean
is_cancel
,
Integer
review_id
,
Integer
review_round
,
Integer
[]
user_id
)
{
if
(!
is_cancel
)
{
reviewService
.
saveReviewRecordIfNotExists
(
review_id
,
review_round
,
user_id
);
}
else
{
reviewService
.
deleteReviewRecord
(
review_id
,
review_round
,
user_id
);
}
return
Rjx
.
jsonOk
();
}
...
...
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