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
8b29fd89
Commit
8b29fd89
authored
Nov 23, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
dc00bb4c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
AdminAuthService.java
...ain/java/com/egolm/film/api/service/AdminAuthService.java
+3
-0
AdminAuthServiceImpl.java
...com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
+6
-0
AdminAuthController.java
...ava/com/egolm/film/api/web/admin/AdminAuthController.java
+8
-17
No files found.
src/main/java/com/egolm/film/api/service/AdminAuthService.java
View file @
8b29fd89
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_admin_group
;
import
com.egolm.film.bean.Fc_admin_menu
;
public
interface
AdminAuthService
{
...
...
@@ -27,4 +28,6 @@ public interface AdminAuthService {
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
);
void
saveOrUpdateMenu
(
Fc_admin_menu
menu
);
}
src/main/java/com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
View file @
8b29fd89
...
...
@@ -16,6 +16,7 @@ import com.egolm.film.bean.Fc_admin;
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.util.SqlWhere
;
@Service
...
...
@@ -120,4 +121,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
jdbcTemplate
.
batchSave
(
gtypeList
);
}
@Override
public
void
saveOrUpdateMenu
(
Fc_admin_menu
menu
)
{
jdbcTemplate
.
saveOrUpdate
(
menu
);
}
}
src/main/java/com/egolm/film/api/web/admin/AdminAuthController.java
View file @
8b29fd89
...
...
@@ -18,6 +18,7 @@ import com.egolm.film.api.service.AdminAuthService;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_admin_group
;
import
com.egolm.film.bean.Fc_admin_menu
;
import
com.egolm.film.config.WebMvcConfig
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.util.Common
;
...
...
@@ -154,30 +155,20 @@ public class AdminAuthController {
}
@ResponseBody
@PostMapping
(
"saveMenu"
)
@PostMapping
(
"save
OrUpdate
Menu"
)
@ApiOperation
(
"保存菜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"menu_type"
,
value
=
"菜单类型 [0 目录, 1 菜单, 2 按钮或其他功能或页面元素]"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"parent_id"
,
value
=
"状态"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"order_num"
,
value
=
"排序顺序"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"menu_id"
,
value
=
"菜单ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"menu_type"
,
value
=
"菜单类型 [0 目录, 1 菜单, 2 按钮或其他功能或页面元素]"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"parent_id"
,
value
=
"上级菜单ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
false
,
name
=
"order_num"
,
value
=
"排序顺序"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"menu_name"
,
value
=
"菜单名(显示名)"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"menu_no"
,
value
=
"菜单编号[英文的菜单标记,如果没有可以填VUE路由名]"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"menu_link"
,
value
=
"菜单连接[URI或VUE路由]"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"menu_icon"
,
value
=
"菜单图标"
),
})
public
Object
saveMenu
(
Integer
group_id
,
String
group_name
,
Integer
state
)
{
Fc_admin_group
group
=
new
Fc_admin_group
();
group
.
setGroup_id
(
group_id
);
group
.
setGroup_name
(
group_name
);
group
.
setState
(
state
);
if
(
group
.
getGroup_id
()
==
null
)
{
group
.
setAdminid
((
Integer
)
tokenService
.
getToken
().
getId
());
String
remoteIp
=
WebMvcConfig
.
getRemoteIp
();
group
.
setUser_num
(
0L
);
group
.
setCreate_ip
(
remoteIp
);
group
.
setCreate_time
(
System
.
currentTimeMillis
());
}
service
.
mergeGroup
(
group
);
public
Object
saveOrUpdateMenu
(
Fc_admin_menu
menu
)
{
service
.
saveOrUpdateMenu
(
menu
);
return
Rjx
.
jsonOk
();
}
...
...
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