mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 12:39:05 +08:00
Merge remote-tracking branch 'origin/3.1' into 3.1
# Conflicts: # pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/MenuController.java
This commit is contained in:
commit
6abc57e486
5 files changed
+20
-9
No files matched your search
@@ -19,6 +19,7 @@ bin/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.lock
|
||||
rebel.xml
|
||||
|
||||
### NetBeans ###
|
||||
|
||||
+10
-4
@@ -8,21 +8,27 @@ package com.pig4cloud.pigx.common.core.constant;
|
||||
*/
|
||||
public interface CacheConstants {
|
||||
|
||||
/**
|
||||
* 菜单信息缓存
|
||||
*/
|
||||
String MENU_DETAILS = "menu_details";
|
||||
|
||||
/**
|
||||
* 用户信息缓存
|
||||
*/
|
||||
String USER_DETAILS = "user_details";
|
||||
|
||||
/**
|
||||
* 字典信息缓存
|
||||
*/
|
||||
String DICT_DETAILS = "dict_details";
|
||||
|
||||
|
||||
/**
|
||||
* oauth 客户端信息
|
||||
*/
|
||||
String CLIENT_DETAILS_KEY = "pigx_oauth:client:details";
|
||||
|
||||
/**
|
||||
* 菜单信息缓存
|
||||
*/
|
||||
String MENU_DETAILS = "menu_details";
|
||||
|
||||
/**
|
||||
* spring boot admin 事件key
|
||||
|
||||
+5
@@ -47,6 +47,11 @@ public interface CommonConstants {
|
||||
*/
|
||||
String MENU = "0";
|
||||
|
||||
/**
|
||||
* 菜单树根节点
|
||||
*/
|
||||
Integer MENU_TREE_ROOT_ID = -1;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
|
||||
+2
-3
@@ -82,9 +82,8 @@ public class FileController {
|
||||
*/
|
||||
@GetMapping("/{fileName}")
|
||||
public void file(@PathVariable String fileName, HttpServletResponse response) {
|
||||
String[] nameArray = StrUtil.split(fileName, StrUtil.DASHED);
|
||||
|
||||
try (InputStream inputStream = minioTemplate.getObject(nameArray[0], nameArray[1])) {
|
||||
Integer separator = fileName.lastIndexOf(StrUtil.DASHED);
|
||||
try (InputStream inputStream = minioTemplate.getObject(fileName.substring(0,separator),fileName.substring(separator+1,fileName.length()))) {
|
||||
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||
IoUtil.copy(inputStream, response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ public class MenuController {
|
||||
.map(MenuTree::new)
|
||||
.sorted(Comparator.comparingInt(MenuTree::getSort))
|
||||
.collect(Collectors.toList());
|
||||
return new R<>(TreeUtil.build(menuTreeList, -1));
|
||||
return new R<>(TreeUtil.build(menuTreeList, CommonConstants.MENU_TREE_ROOT_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ public class MenuController {
|
||||
public R getTree() {
|
||||
return new R<>(TreeUtil.buildTree(sysMenuService
|
||||
.list(Wrappers.<SysMenu>lambdaQuery()
|
||||
.orderByAsc(SysMenu::getSort)), -1));
|
||||
.orderByAsc(SysMenu::getSort)), CommonConstants.MENU_TREE_ROOT_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user