Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
cf7c0c0d
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1173
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cf7c0c0d
编写于
11月 07, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加菜单上移下移操作
上级
b8a99057
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
149 addition
and
4 deletion
+149
-4
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveMenuDao.java
...src/main/java/com/skyeye/authority/dao/SysEveMenuDao.java
+12
-4
skyeye-service/src/main/java/com/skyeye/authority/service/SysEveMenuService.java
.../java/com/skyeye/authority/service/SysEveMenuService.java
+4
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveMenuServiceImpl.java
.../skyeye/authority/service/impl/SysEveMenuServiceImpl.java
+48
-0
skyeye-web/src/main/java/com/skyeye/authority/controller/SysEveMenuController.java
...com/skyeye/authority/controller/SysEveMenuController.java
+32
-0
skyeye-web/src/main/resources/dbmapper/SysEveMenuMapper.xml
skyeye-web/src/main/resources/dbmapper/SysEveMenuMapper.xml
+47
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+6
-0
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveMenuDao.java
浏览文件 @
cf7c0c0d
...
...
@@ -9,17 +9,17 @@ public interface SysEveMenuDao {
public
List
<
Map
<
String
,
Object
>>
querySysMenuList
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
public
void
insertSysMenuMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
insertSysMenuMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysMenuMationToEditById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysMenuMationBySimpleLevel
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
void
editSysMenuMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editSysMenuMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
void
deleteSysMenuChildMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteSysMenuChildMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
void
deleteSysMenuMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteSysMenuMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
queryTreeSysMenuMationBySimpleLevel
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
...
...
@@ -31,4 +31,12 @@ public interface SysEveMenuDao {
public
Map
<
String
,
Object
>
queryOldParentIdById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysEveMenuISTopByThisId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editSysEveMenuSortTopById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysEveMenuISLowerByThisId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editSysEveMenuSortLowerById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/SysEveMenuService.java
浏览文件 @
cf7c0c0d
...
...
@@ -21,4 +21,8 @@ public interface SysEveMenuService {
public
void
querySysMenuLevelList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editSysEveMenuSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editSysEveMenuSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveMenuServiceImpl.java
浏览文件 @
cf7c0c0d
...
...
@@ -238,4 +238,52 @@ public class SysEveMenuServiceImpl implements SysEveMenuService{
}
}
/**
*
* @Title: editSysEveMenuSortTopById
* @Description: 菜单展示顺序上移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editSysEveMenuSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
topBean
=
sysEveMenuDao
.
querySysEveMenuISTopByThisId
(
map
);
//根据同一级排序获取这条数据的上一条数据
if
(
topBean
==
null
){
outputObject
.
setreturnMessage
(
"已经是最靠前菜单,无法移动。"
);
}
else
{
map
.
put
(
"orderNum"
,
topBean
.
get
(
"orderNum"
));
topBean
.
put
(
"orderNum"
,
topBean
.
get
(
"thisOrderNum"
));
sysEveMenuDao
.
editSysEveMenuSortTopById
(
map
);
sysEveMenuDao
.
editSysEveMenuSortTopById
(
topBean
);
}
}
/**
*
* @Title: editSysEveMenuSortLowerById
* @Description: 菜单展示顺序下移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
editSysEveMenuSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
topBean
=
sysEveMenuDao
.
querySysEveMenuISLowerByThisId
(
map
);
//根据同一级排序获取这条数据的下一条数据
if
(
topBean
==
null
){
outputObject
.
setreturnMessage
(
"已经是最靠后菜单,无法移动。"
);
}
else
{
map
.
put
(
"orderNum"
,
topBean
.
get
(
"orderNum"
));
topBean
.
put
(
"orderNum"
,
topBean
.
get
(
"thisOrderNum"
));
sysEveMenuDao
.
editSysEveMenuSortLowerById
(
map
);
sysEveMenuDao
.
editSysEveMenuSortLowerById
(
topBean
);
}
}
}
skyeye-web/src/main/java/com/skyeye/authority/controller/SysEveMenuController.java
浏览文件 @
cf7c0c0d
...
...
@@ -143,4 +143,36 @@ public class SysEveMenuController {
sysEveMenuService
.
querySysMenuLevelList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editSysEveMenuSortTopById
* @Description: 菜单展示顺序上移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysEveMenuController/editSysEveMenuSortTopById"
)
@ResponseBody
public
void
editSysEveMenuSortTopById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysEveMenuService
.
editSysEveMenuSortTopById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: editSysEveMenuSortLowerById
* @Description: 菜单展示顺序下移
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysEveMenuController/editSysEveMenuSortLowerById"
)
@ResponseBody
public
void
editSysEveMenuSortLowerById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysEveMenuService
.
editSysEveMenuSortLowerById
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SysEveMenuMapper.xml
浏览文件 @
cf7c0c0d
...
...
@@ -15,6 +15,7 @@
a.menu_url menuUrl,
CONVERT(a.create_time, char) createTime,
b.user_name userName,
a.order_num orderNum,
IFNULL(GROUP_CONCAT(c.menu_name separator '->'), '创世菜单') menuParentName,
(SELECT COUNT(*) FROM sys_eve_role_menu d WHERE d.menu_id = a.id) roleNum
FROM
...
...
@@ -188,4 +189,50 @@
a.id = #{id}
</select>
<select
id=
"querySysEveMenuISTopByThisId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
b.id,
b.order_num orderNum,
a.order_num thisOrderNum
FROM
sys_eve_menu a,
sys_eve_menu b
WHERE
a.id = #{id}
AND b.menu_parent_id = a.menu_parent_id
AND a.order_num > b.order_num
ORDER BY b.order_num DESC LIMIT 1
</select>
<update
id=
"editSysEveMenuSortTopById"
parameterType=
"java.util.Map"
>
UPDATE sys_eve_menu
<set>
order_num = #{orderNum},
</set>
WHERE id = #{id}
</update>
<select
id=
"querySysEveMenuISLowerByThisId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
b.id,
b.order_num orderNum,
a.order_num thisOrderNum
FROM
sys_eve_menu a,
sys_eve_menu b
WHERE
a.id = #{id}
AND b.menu_parent_id = a.menu_parent_id
AND b.order_num > a.order_num
ORDER BY b.order_num DESC LIMIT 1
</select>
<update
id=
"editSysEveMenuSortLowerById"
parameterType=
"java.util.Map"
>
UPDATE sys_eve_menu
<set>
order_num = #{orderNum},
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
cf7c0c0d
...
...
@@ -128,6 +128,12 @@
</url>
<url
id=
"sys021"
path=
"/post/SysEveMenuController/querySysMenuLevelList"
val=
"获取菜单级别列表"
allUse=
"1"
>
</url>
<url
id=
"sys022"
path=
"/post/SysEveMenuController/editSysEveMenuSortTopById"
val=
"菜单展示顺序上移"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"菜单ID"
/>
</url>
<url
id=
"sys023"
path=
"/post/SysEveMenuController/editSysEveMenuSortLowerById"
val=
"菜单展示顺序下移"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"菜单ID"
/>
</url>
<url
id=
"icon001"
path=
"/post/SysEveIconController/querySysIconList"
val=
"获取ICON列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required,num"
var=
"分页参数,每页多少条数据"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录