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
846eb32e
Commit
846eb32e
authored
Mar 07, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
17e7a2af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
AdminAuthServiceImpl.java
...com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
+8
-2
No files found.
src/main/java/com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
View file @
846eb32e
...
...
@@ -17,6 +17,7 @@ import com.egolm.film.bean.Fc_admin_group;
import
com.egolm.film.bean.Fc_admin_group_filmtype
;
import
com.egolm.film.bean.Fc_admin_group_menu
;
import
com.egolm.film.bean.Fc_admin_menu
;
import
com.egolm.film.config.XRException
;
import
com.egolm.film.util.Common
;
import
com.egolm.film.util.SqlWhere
;
...
...
@@ -65,8 +66,13 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
public
void
saveAdmin
(
Fc_admin
admin
)
{
jdbcTemplate
.
save
(
admin
);
jdbcTemplate
.
executeUpdate
(
"update fc_admin_group set user_num = user_num + 1 where group_id = ?"
,
admin
.
getGroup_id
());
int
count
=
jdbcTemplate
.
queryForInt
(
"select count(*) from fc_admin where username = ?"
,
admin
.
getUsername
());
if
(
count
==
0
)
{
jdbcTemplate
.
save
(
admin
);
jdbcTemplate
.
executeUpdate
(
"update fc_admin_group set user_num = user_num + 1 where group_id = ?"
,
admin
.
getGroup_id
());
}
else
{
throw
new
XRException
(
"用户名已存在"
);
}
}
@Override
...
...
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