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
375e578d
Commit
375e578d
authored
Nov 28, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
baa19b27
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
AdminUserService.java
...ain/java/com/egolm/film/api/service/AdminUserService.java
+2
-0
AdminUserServiceImpl.java
...com/egolm/film/api/service/impl/AdminUserServiceImpl.java
+14
-0
AdminUserController.java
...ava/com/egolm/film/api/web/admin/AdminUserController.java
+2
-0
No files found.
src/main/java/com/egolm/film/api/service/AdminUserService.java
View file @
375e578d
...
...
@@ -21,4 +21,6 @@ public interface AdminUserService {
void
changePassword
(
Integer
uid
,
String
password
);
void
saveGroupFun
(
Integer
group_id
,
Integer
[]
fun_id
);
}
src/main/java/com/egolm/film/api/service/impl/AdminUserServiceImpl.java
View file @
375e578d
package
com
.
egolm
.
film
.
api
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
...
...
@@ -13,6 +15,7 @@ import com.egolm.common.jdbc.Page;
import
com.egolm.film.api.service.AdminUserService
;
import
com.egolm.film.bean.Fc_user
;
import
com.egolm.film.bean.Fc_user_group
;
import
com.egolm.film.bean.Fc_user_group_fun
;
import
com.egolm.film.util.Common
;
import
com.egolm.film.util.SqlWhere
;
...
...
@@ -59,4 +62,15 @@ public class AdminUserServiceImpl implements AdminUserService {
jdbcTemplate
.
executeUpdate
(
"update fc_user set password = ?, salt = ? where uid = ?"
,
encodePassword
,
salt
,
uid
);
}
@Override
@Transactional
public
void
saveGroupFun
(
Integer
group_id
,
Integer
[]
fun_id
)
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_user_group_fun where group_id = ?"
,
group_id
);
List
<
Fc_user_group_fun
>
list
=
new
ArrayList
<
Fc_user_group_fun
>();
for
(
Integer
i
:
fun_id
)
{
list
.
add
(
new
Fc_user_group_fun
(
group_id
,
i
));
}
jdbcTemplate
.
batchSave
(
list
);
}
}
src/main/java/com/egolm/film/api/web/admin/AdminUserController.java
View file @
375e578d
...
...
@@ -53,6 +53,7 @@ public class AdminUserController {
}
@ResponseBody
@Transactional
@PostMapping
(
"group_save"
)
@ApiOperation
(
"保存分组及分组权限"
)
@ApiImplicitParams
({
...
...
@@ -73,6 +74,7 @@ public class AdminUserController {
group
.
setState
(
1
);
}
service
.
mergeGroup
(
group
);
service
.
saveGroupFun
(
group
.
getGroup_id
(),
fun_id
);
return
Rjx
.
jsonOk
().
setData
(
group
);
}
...
...
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