Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
013fb11f
Commit
013fb11f
authored
Dec 17, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
42259c4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+14
-0
No files found.
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
013fb11f
...
@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.config.XRException
;
import
com.egolm.film.config.XRException
;
...
@@ -28,10 +30,14 @@ public class WebUtilController {
...
@@ -28,10 +30,14 @@ public class WebUtilController {
@Autowired
@Autowired
ReviewService
service
;
ReviewService
service
;
@Autowired
AdminTokenService
tokenService
;
@ResponseBody
@ResponseBody
@PostMapping
(
"tryNextRound"
)
@PostMapping
(
"tryNextRound"
)
@ApiOperation
(
"尝试进入下一轮评选"
)
@ApiOperation
(
"尝试进入下一轮评选"
)
public
Object
tryNextRound
(
Integer
review_id
)
{
public
Object
tryNextRound
(
Integer
review_id
)
{
this
.
verifyAuth
();
service
.
tryNextRound
(
review_id
);
service
.
tryNextRound
(
review_id
);
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
...
@@ -40,6 +46,7 @@ public class WebUtilController {
...
@@ -40,6 +46,7 @@ public class WebUtilController {
@PostMapping
(
"initAllReview"
)
@PostMapping
(
"initAllReview"
)
@ApiOperation
(
"初始化所有审片流程"
)
@ApiOperation
(
"初始化所有审片流程"
)
public
Object
initAllReview
()
{
public
Object
initAllReview
()
{
this
.
verifyAuth
();
jdbcTemplate
.
executeUpdate
(
"delete from fc_review"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record_ext"
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_review_record_ext"
);
...
@@ -68,4 +75,11 @@ public class WebUtilController {
...
@@ -68,4 +75,11 @@ public class WebUtilController {
}
}
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
private
void
verifyAuth
()
{
Fc_admin
admin
=
(
Fc_admin
)
tokenService
.
getTokenObj
();
if
(!
admin
.
getUsername
().
equals
(
"admin"
))
{
throw
new
XRException
(
"权限错误"
);
}
}
}
}
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