Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
0e57bf16
Commit
0e57bf16
authored
Dec 18, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善修改菜单
parent
1343d1ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
2 deletions
+74
-2
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
+9
-2
src/main/java/cn/stylefeng/guns/modular/system/model/MenuDto.java
+65
-0
No files found.
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
View file @
0e57bf16
...
...
@@ -26,6 +26,7 @@ import cn.stylefeng.guns.core.common.exception.BizExceptionEnum;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.modular.system.entity.Menu
;
import
cn.stylefeng.guns.modular.system.model.MenuDto
;
import
cn.stylefeng.guns.modular.system.service.MenuService
;
import
cn.stylefeng.guns.modular.system.warpper.MenuWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
...
...
@@ -200,11 +201,17 @@ public class MenuController extends BaseController {
*/
@RequestMapping
(
value
=
"/getMenuInfo"
)
@ResponseBody
public
Object
getMenuInfo
(
@RequestParam
Long
menuId
)
{
public
ResponseData
getMenuInfo
(
@RequestParam
Long
menuId
)
{
if
(
ToolUtil
.
isEmpty
(
menuId
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
return
this
.
menuService
.
selectById
(
menuId
);
Menu
menu
=
this
.
menuService
.
selectById
(
menuId
);
MenuDto
menuDto
=
new
MenuDto
();
BeanUtil
.
copyProperties
(
menu
,
menuDto
);
menuDto
.
setPcodeName
(
ConstantFactory
.
me
().
getMenuNameByCode
(
menuDto
.
getPcode
()));
return
ResponseData
.
success
(
menuDto
);
}
/**
...
...
src/main/java/cn/stylefeng/guns/modular/system/model/MenuDto.java
0 → 100644
View file @
0e57bf16
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
model
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* <p>
* 菜单表
* </p>
*
* @author stylefeng
* @since 2018-12-07
*/
@Data
public
class
MenuDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
private
Long
menuId
;
/**
* 菜单编号
*/
private
String
code
;
/**
* 菜单父编号
*/
private
String
pcode
;
/**
* 菜单父级名称
*/
private
String
pcodeName
;
/**
* 菜单名称
*/
private
String
name
;
/**
* 菜单图标
*/
private
String
icon
;
/**
* url地址
*/
private
String
url
;
/**
* 菜单排序号
*/
private
Integer
sort
;
/**
* 菜单层级
*/
private
Integer
levels
;
/**
* 是否是菜单(字典)
*/
private
String
menuFlag
;
/**
* 备注
*/
private
String
description
;
}
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