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
63b3ec14
Commit
63b3ec14
authored
Feb 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
78149b75
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
AdminAuthService.java
...ain/java/com/egolm/film/api/service/AdminAuthService.java
+2
-0
AdminAuthServiceImpl.java
...com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
+7
-1
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 @
63b3ec14
...
@@ -36,4 +36,6 @@ public interface AdminAuthService {
...
@@ -36,4 +36,6 @@ public interface AdminAuthService {
boolean
changePasswordByMemberId
(
Integer
id
,
String
password
,
String
newPassword
);
boolean
changePasswordByMemberId
(
Integer
id
,
String
password
,
String
newPassword
);
void
delAdmin
(
Integer
[]
adminid
);
}
}
src/main/java/com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
View file @
63b3ec14
...
@@ -40,7 +40,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -40,7 +40,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
queryAdminList
(
String
keyword
,
Integer
group_id
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
queryAdminList
(
String
keyword
,
Integer
group_id
,
Page
page
)
{
SqlWhere
argEdit
=
new
SqlWhere
().
lk
(
new
String
[]{
"realname"
,
"username"
},
keyword
).
eq
(
"group_id"
,
group_id
);
SqlWhere
argEdit
=
new
SqlWhere
().
lk
(
new
String
[]{
"realname"
,
"username"
},
keyword
).
eq
(
"group_id"
,
group_id
)
.
ne
(
"state"
,
3
)
;
String
sql
=
"select * from fc_admin"
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
argEdit
.
getStringList
());
String
sql
=
"select * from fc_admin"
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
argEdit
.
getStringList
());
return
jdbcTemplate
.
limit
(
sql
,
page
,
argEdit
.
getObjectArray
());
return
jdbcTemplate
.
limit
(
sql
,
page
,
argEdit
.
getObjectArray
());
}
}
...
@@ -51,6 +51,12 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -51,6 +51,12 @@ public class AdminAuthServiceImpl implements AdminAuthService {
jdbcTemplate
.
executeUpdate
(
sql
,
(
Object
[])
adminid
);
jdbcTemplate
.
executeUpdate
(
sql
,
(
Object
[])
adminid
);
}
}
@Override
public
void
delAdmin
(
Integer
[]
adminid
)
{
String
sql
=
"update fc_admin set state = 3 where adminid in ("
+
StringUtil
.
join
(
"?"
,
", "
,
adminid
.
length
)
+
")"
;
jdbcTemplate
.
executeUpdate
(
sql
,
(
Object
[])
adminid
);
}
@Override
@Override
public
void
enableAdmin
(
Integer
[]
adminid
)
{
public
void
enableAdmin
(
Integer
[]
adminid
)
{
String
sql
=
"update fc_admin set state = 1 where adminid in ("
+
StringUtil
.
join
(
"?"
,
", "
,
adminid
.
length
)
+
")"
;
String
sql
=
"update fc_admin set state = 1 where adminid in ("
+
StringUtil
.
join
(
"?"
,
", "
,
adminid
.
length
)
+
")"
;
...
...
src/main/java/com/egolm/film/api/web/admin/AdminAuthController.java
View file @
63b3ec14
...
@@ -148,6 +148,18 @@ public class AdminAuthController {
...
@@ -148,6 +148,18 @@ public class AdminAuthController {
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
@ResponseBody
@PostMapping
(
"adminDel"
)
@ApiOperation
(
"禁用管理员"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"adminid"
,
value
=
"管理员ID"
,
allowMultiple
=
true
),
})
public
Object
adminDel
(
Integer
[]
adminid
)
{
XException
.
assertNotBlank
(
"管理员ID不能为空"
,
(
Object
[])
adminid
);
service
.
delAdmin
(
adminid
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@ResponseBody
@PostMapping
(
"adminEnabled"
)
@PostMapping
(
"adminEnabled"
)
@ApiOperation
(
"启用管理员"
)
@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