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
a441f0ef
Commit
a441f0ef
authored
Nov 19, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理组和权限
parent
2f135272
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
AdminAuthController.java
...in/java/com/egolm/film/api/admin/AdminAuthController.java
+3
-6
AdminAuthServiceImpl.java
...olm/film/api/admin/service/impl/AdminAuthServiceImpl.java
+5
-1
Fc_admin_group.java
src/main/java/com/egolm/film/bean/Fc_admin_group.java
+19
-4
No files found.
src/main/java/com/egolm/film/api/admin/AdminAuthController.java
View file @
a441f0ef
...
@@ -164,19 +164,16 @@ public class AdminAuthController {
...
@@ -164,19 +164,16 @@ public class AdminAuthController {
@ResponseBody
@ResponseBody
@RequestMapping
(
"groupSaveOrUpdate"
)
@RequestMapping
(
"groupSaveOrUpdate"
)
@ApiOperation
(
"添加组"
)
@ApiOperation
(
"保存或更新组"
)
public
Object
groupSaveOrUpdate
(
Integer
group_id
,
String
group_name
,
Integer
state
,
String
film_type_name
,
String
group_power
)
{
public
Object
groupSaveOrUpdate
(
Integer
group_id
,
String
group_name
,
Integer
state
,
String
[]
pwoer
,
String
group_power
)
{
String
remoteIp
=
WebMvcConfig
.
getRemoteIp
();
Fc_admin_group
group
=
new
Fc_admin_group
();
Fc_admin_group
group
=
new
Fc_admin_group
();
group
.
setGroup_id
(
group_id
);
group
.
setGroup_id
(
group_id
);
group
.
setGroup_name
(
group_name
);
group
.
setGroup_name
(
group_name
);
group
.
setState
(
state
);
group
.
setState
(
state
);
group
.
setCreate_ip
(
remoteIp
);
group
.
setCreate_time
(
System
.
currentTimeMillis
());
group
.
setGroup_power
(
group_power
);
group
.
setGroup_power
(
group_power
);
group
.
setPower
(
pwoer
==
null
?
"[]"
:
JSON
.
toJSONString
(
pwoer
));
service
.
saveOrUpdateGroup
(
group
);
service
.
saveOrUpdateGroup
(
group
);
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
}
}
src/main/java/com/egolm/film/api/admin/service/impl/AdminAuthServiceImpl.java
View file @
a441f0ef
...
@@ -12,6 +12,7 @@ import com.egolm.common.jdbc.Page;
...
@@ -12,6 +12,7 @@ import com.egolm.common.jdbc.Page;
import
com.egolm.film.api.admin.service.AdminAuthService
;
import
com.egolm.film.api.admin.service.AdminAuthService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_admin_group
;
import
com.egolm.film.bean.Fc_admin_group
;
import
com.egolm.film.config.WebMvcConfig
;
import
com.egolm.film.util.SqlWhere
;
import
com.egolm.film.util.SqlWhere
;
@Service
@Service
...
@@ -23,7 +24,10 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -23,7 +24,10 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
@Override
public
void
saveOrUpdateGroup
(
Fc_admin_group
group
)
{
public
void
saveOrUpdateGroup
(
Fc_admin_group
group
)
{
if
(
group
.
getGroup_id
()
==
null
)
{
if
(
group
.
getGroup_id
()
==
null
)
{
group
.
setUser_num
(
0
);
String
remoteIp
=
WebMvcConfig
.
getRemoteIp
();
group
.
setUser_num
(
0L
);
group
.
setCreate_ip
(
remoteIp
);
group
.
setCreate_time
(
System
.
currentTimeMillis
());
}
}
jdbcTemplate
.
merge
(
group
);
jdbcTemplate
.
merge
(
group
);
}
}
...
...
src/main/java/com/egolm/film/bean/Fc_admin_group.java
View file @
a441f0ef
...
@@ -45,10 +45,15 @@ public class Fc_admin_group implements java.io.Serializable {
...
@@ -45,10 +45,15 @@ public class Fc_admin_group implements java.io.Serializable {
*/
*/
private
Integer
state
;
private
Integer
state
;
/**
* 权限
*/
private
String
power
;
/**
/**
* 成员数量
* 成员数量
*/
*/
private
Integer
user_num
;
private
Long
user_num
;
/**
/**
* 群组权限
* 群组权限
...
@@ -71,16 +76,18 @@ public class Fc_admin_group implements java.io.Serializable {
...
@@ -71,16 +76,18 @@ public class Fc_admin_group implements java.io.Serializable {
* @param create_ip 创建者ip
* @param create_ip 创建者ip
* @param adminid 创建者uid
* @param adminid 创建者uid
* @param state 小组状态
* @param state 小组状态
* @param power 权限
* @param user_num 成员数量
* @param user_num 成员数量
* @param group_power 群组权限
* @param group_power 群组权限
*/
*/
public
Fc_admin_group
(
Integer
group_id
,
String
group_name
,
Long
create_time
,
String
create_ip
,
Integer
adminid
,
Integer
state
,
Integer
user_num
,
String
group_power
)
{
public
Fc_admin_group
(
Integer
group_id
,
String
group_name
,
Long
create_time
,
String
create_ip
,
Integer
adminid
,
Integer
state
,
String
power
,
Long
user_num
,
String
group_power
)
{
this
.
group_id
=
group_id
;
this
.
group_id
=
group_id
;
this
.
group_name
=
group_name
;
this
.
group_name
=
group_name
;
this
.
create_time
=
create_time
;
this
.
create_time
=
create_time
;
this
.
create_ip
=
create_ip
;
this
.
create_ip
=
create_ip
;
this
.
adminid
=
adminid
;
this
.
adminid
=
adminid
;
this
.
state
=
state
;
this
.
state
=
state
;
this
.
power
=
power
;
this
.
user_num
=
user_num
;
this
.
user_num
=
user_num
;
this
.
group_power
=
group_power
;
this
.
group_power
=
group_power
;
}
}
...
@@ -133,11 +140,19 @@ public class Fc_admin_group implements java.io.Serializable {
...
@@ -133,11 +140,19 @@ public class Fc_admin_group implements java.io.Serializable {
return
state
;
return
state
;
}
}
public
void
setUser_num
(
Integer
user_num
)
{
public
void
setPower
(
String
power
)
{
this
.
power
=
power
;
}
public
String
getPower
()
{
return
power
;
}
public
void
setUser_num
(
Long
user_num
)
{
this
.
user_num
=
user_num
;
this
.
user_num
=
user_num
;
}
}
public
Integer
getUser_num
()
{
public
Long
getUser_num
()
{
return
user_num
;
return
user_num
;
}
}
...
...
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