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
824426f7
Commit
824426f7
authored
Nov 30, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
a7ee36b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
AdminAuthService.java
...ain/java/com/egolm/film/api/service/AdminAuthService.java
+2
-0
AdminAuthServiceImpl.java
...com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
+6
-0
AdminAuthController.java
...ava/com/egolm/film/api/web/admin/AdminAuthController.java
+12
-0
No files found.
src/main/java/com/egolm/film/api/service/AdminAuthService.java
View file @
824426f7
...
...
@@ -30,4 +30,6 @@ public interface AdminAuthService {
void
saveOrUpdateMenu
(
Fc_admin_menu
menu
);
void
enableAdmin
(
Integer
[]
adminid
);
}
src/main/java/com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
View file @
824426f7
...
...
@@ -49,6 +49,12 @@ public class AdminAuthServiceImpl implements AdminAuthService {
String
sql
=
"update fc_admin set state = 2 where admin in ("
+
StringUtil
.
join
(
"?"
,
", "
,
adminid
.
length
)
+
")"
;
jdbcTemplate
.
executeUpdate
(
sql
,
(
Object
[])
adminid
);
}
@Override
public
void
enableAdmin
(
Integer
[]
adminid
)
{
String
sql
=
"update fc_admin set state = 1 where admin in ("
+
StringUtil
.
join
(
"?"
,
", "
,
adminid
.
length
)
+
")"
;
jdbcTemplate
.
executeUpdate
(
sql
,
(
Object
[])
adminid
);
}
@Override
public
void
saveAdmin
(
Fc_admin
admin
)
{
...
...
src/main/java/com/egolm/film/api/web/admin/AdminAuthController.java
View file @
824426f7
...
...
@@ -126,6 +126,18 @@ public class AdminAuthController {
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"adminEnabled"
)
@ApiOperation
(
"禁用管理员"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"adminid"
,
value
=
"管理员ID"
,
allowMultiple
=
true
),
})
public
Object
adminEnabled
(
Integer
[]
adminid
)
{
XException
.
assertNotBlank
(
"管理员ID不能为空"
,
(
Object
[])
adminid
);
service
.
enableAdmin
(
adminid
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"groupList"
)
@ApiOperation
(
"管理组分页查询"
)
...
...
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