diff --git a/pom.xml b/pom.xml index 13b13c9..e4bb22b 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,6 @@ org.springframework.boot spring-boot-starter-cache - diff --git a/sql/aurora.sql b/sql/aurora.sql index 89c32ac..441bf2f 100644 --- a/sql/aurora.sql +++ b/sql/aurora.sql @@ -11,7 +11,7 @@ Target Server Version : 50559 File Encoding : 65001 - Date: 25/09/2018 13:28:03 + Date: 27/09/2018 13:26:26 */ SET NAMES utf8mb4; @@ -32,31 +32,33 @@ CREATE TABLE `zj_menu` ( `createTime` datetime NULL DEFAULT NULL, `updateTime` datetime NULL DEFAULT NULL, `level_number` int(11) NOT NULL, + `iframe` bit(1) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `UK_cbhg0bi3f1emxkhqqtvca9btx`(`soft`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of zj_menu -- ---------------------------- -INSERT INTO `zj_menu` VALUES (1, 'layui-icon-unlink', 0, 1, '异常页', 60, '', '2018-08-29 11:40:17', '2018-09-24 23:45:17', 3); -INSERT INTO `zj_menu` VALUES (2, 'layui-icon-tree', 1, 2, '403', 61, '/exception/403', '2018-08-29 11:40:17', '2018-09-24 23:45:39', 0); -INSERT INTO `zj_menu` VALUES (3, 'layui-icon-tree', 1, 2, '404', 62, '/exception/404', '2018-08-29 11:40:17', '2018-09-24 23:45:33', 0); -INSERT INTO `zj_menu` VALUES (4, 'layui-icon-tree', 1, 2, '500', 63, '/exception/500', '2018-08-29 11:40:17', '2018-09-24 23:45:26', 0); -INSERT INTO `zj_menu` VALUES (5, 'layui-icon-chart', 0, 1, '系统监控', 10, '', '2018-08-29 11:40:17', '2018-09-23 17:00:57', 7); -INSERT INTO `zj_menu` VALUES (6, 'layui-icon-tree', 7, 2, '用户管理', 2, '/user/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (7, 'layui-icon-util', 0, 1, '系统管理', 1, '', '2018-08-29 11:40:17', '2018-09-23 09:16:17', 5); -INSERT INTO `zj_menu` VALUES (8, 'layui-icon-tree', 7, 2, '菜单管理', 6, '/menu/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (9, 'layui-icon-tree', 5, 2, '系统日志', 11, '/sysLog/index', '2018-08-29 11:40:17', '2018-09-22 10:17:02', 0); -INSERT INTO `zj_menu` VALUES (10, 'layui-icon-tree', 7, 2, '权限管理', 4, '/permission/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (11, 'layui-icon-tree', 7, 2, '角色管理', 3, '/role/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (12, 'layui-icon-website', 0, 1, '网络资源', 30, '', '2018-09-20 11:35:56', '2018-09-20 11:40:53', 1); -INSERT INTO `zj_menu` VALUES (13, 'layui-icon-tree', 12, 2, '图床管理', 31, '/picture/index', '2018-09-20 11:40:53', '2018-09-20 11:40:53', 0); -INSERT INTO `zj_menu` VALUES (14, 'layui-icon-tree', 5, 2, '在线用户', 12, '/online/index', '2018-09-21 16:09:38', '2018-09-22 10:17:09', 0); -INSERT INTO `zj_menu` VALUES (16, 'layui-icon-tree', 5, 2, 'Redis终端', 14, '/redis/terminal', '2018-09-22 11:18:21', '2018-09-22 11:37:28', 0); -INSERT INTO `zj_menu` VALUES (17, 'layui-icon-tree', 7, 2, '接口文档', 7, '/swagger/index', '2018-09-23 09:16:17', '2018-09-23 10:01:06', 0); -INSERT INTO `zj_menu` VALUES (18, 'layui-icon-util', 0, 1, '工具管理', 40, '', '2018-09-24 23:46:02', '2018-09-24 23:46:47', 1); -INSERT INTO `zj_menu` VALUES (19, 'layui-icon-tree', 18, 2, '富文本编辑', 41, '/ueditor/index', '2018-09-24 23:46:47', '2018-09-24 23:46:47', 0); +INSERT INTO `zj_menu` VALUES (1, 'layui-icon-unlink', 0, 1, '异常页', 60, '', '2018-08-29 11:40:17', '2018-09-27 12:57:14', 4, b'0'); +INSERT INTO `zj_menu` VALUES (2, 'layui-icon-tree', 1, 2, '403', 61, '/exception/403', '2018-08-29 11:40:17', '2018-09-24 23:45:39', 0, b'0'); +INSERT INTO `zj_menu` VALUES (3, 'layui-icon-tree', 1, 2, '404', 62, '/exception/404', '2018-08-29 11:40:17', '2018-09-24 23:45:33', 0, b'0'); +INSERT INTO `zj_menu` VALUES (4, 'layui-icon-tree', 1, 2, '500', 63, '/exception/500', '2018-08-29 11:40:17', '2018-09-24 23:45:26', 0, b'0'); +INSERT INTO `zj_menu` VALUES (5, 'layui-icon-chart', 0, 1, '系统监控', 10, '', '2018-08-29 11:40:17', '2018-09-27 13:24:25', 8, b'0'); +INSERT INTO `zj_menu` VALUES (6, 'layui-icon-tree', 7, 2, '用户管理', 2, '/user/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (7, 'layui-icon-util', 0, 1, '系统管理', 1, '', '2018-08-29 11:40:17', '2018-09-23 09:16:17', 5, b'0'); +INSERT INTO `zj_menu` VALUES (8, 'layui-icon-tree', 7, 2, '菜单管理', 6, '/menu/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (9, 'layui-icon-tree', 5, 2, '系统日志', 13, '/sysLog/index', '2018-08-29 11:40:17', '2018-09-27 12:56:27', 0, b'0'); +INSERT INTO `zj_menu` VALUES (10, 'layui-icon-tree', 7, 2, '权限管理', 4, '/permission/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (11, 'layui-icon-tree', 7, 2, '角色管理', 3, '/role/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (12, 'layui-icon-website', 0, 1, '网络资源', 30, '', '2018-09-20 11:35:56', '2018-09-20 11:40:53', 1, b'0'); +INSERT INTO `zj_menu` VALUES (13, 'layui-icon-tree', 12, 2, '图床管理', 31, '/picture/index', '2018-09-20 11:40:53', '2018-09-20 11:40:53', 0, b'0'); +INSERT INTO `zj_menu` VALUES (14, 'layui-icon-tree', 5, 2, '在线用户', 12, '/online/index', '2018-09-21 16:09:38', '2018-09-22 10:17:09', 0, b'0'); +INSERT INTO `zj_menu` VALUES (16, 'layui-icon-tree', 5, 2, 'Redis终端', 16, '/redis/terminal', '2018-09-22 11:18:21', '2018-09-27 13:25:09', 0, b'0'); +INSERT INTO `zj_menu` VALUES (17, 'layui-icon-tree', 7, 2, '接口文档', 7, '/swagger/index', '2018-09-23 09:16:17', '2018-09-23 10:01:06', 0, b'0'); +INSERT INTO `zj_menu` VALUES (18, 'layui-icon-util', 0, 1, '工具管理', 40, '', '2018-09-24 23:46:02', '2018-09-24 23:46:47', 1, b'0'); +INSERT INTO `zj_menu` VALUES (19, 'layui-icon-tree', 18, 2, '富文本编辑', 41, '/ueditor/index', '2018-09-24 23:46:47', '2018-09-24 23:46:47', 0, b'0'); +INSERT INTO `zj_menu` VALUES (21, 'layui-icon-tree', 5, 2, 'SQL监控', 15, '/druid/index.html', '2018-09-27 13:24:25', '2018-09-27 13:24:25', 0, b'1'); -- ---------------------------- -- Table structure for zj_menus_roles @@ -92,6 +94,7 @@ INSERT INTO `zj_menus_roles` VALUES (16, 1); INSERT INTO `zj_menus_roles` VALUES (17, 1); INSERT INTO `zj_menus_roles` VALUES (18, 1); INSERT INTO `zj_menus_roles` VALUES (19, 1); +INSERT INTO `zj_menus_roles` VALUES (21, 1); INSERT INTO `zj_menus_roles` VALUES (1, 2); INSERT INTO `zj_menus_roles` VALUES (2, 2); INSERT INTO `zj_menus_roles` VALUES (3, 2); @@ -198,7 +201,7 @@ CREATE TABLE `zj_picture` ( PRIMARY KEY (`id`) USING BTREE, INDEX `FK5qtt7wql9517j0e2read2pdus`(`user_id`) USING BTREE, CONSTRAINT `FK5qtt7wql9517j0e2read2pdus` FOREIGN KEY (`user_id`) REFERENCES `zj_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of zj_picture @@ -245,7 +248,7 @@ CREATE TABLE `zj_user` ( -- ---------------------------- -- Records of zj_user -- ---------------------------- -INSERT INTO `zj_user` VALUES (1, 'https://www.zhengjie.me/images/avatar.jpg', '2018-08-23 09:11:56', 'zhengjie@tom.com', 1, '2018-09-25 12:50:50', '65a674ce6632479005ea7a9071234cfb', 'aurora'); +INSERT INTO `zj_user` VALUES (1, 'https://www.zhengjie.me/images/avatar.jpg', '2018-08-23 09:11:56', 'zhengjie@tom.com', 1, '2018-09-27 13:07:26', '65a674ce6632479005ea7a9071234cfb', 'aurora'); -- ---------------------------- -- Table structure for zj_user_pictures diff --git a/src/main/java/me/aurora/app/rest/system/MenuController.java b/src/main/java/me/aurora/app/rest/system/MenuController.java index bb6dcf8..06c64f9 100644 --- a/src/main/java/me/aurora/app/rest/system/MenuController.java +++ b/src/main/java/me/aurora/app/rest/system/MenuController.java @@ -82,10 +82,10 @@ public class MenuController { @RequiresPermissions(value={"admin", "menu:all","menu:select"}, logical= Logical.OR) @GetMapping(value = "/getMenusInfo") public Map getMenusInfo(@RequestParam(value = "id",required = false) Long id, - @RequestParam(value = "name",required = false) String name, - @RequestParam(value = "page",defaultValue = "1")Integer page, - @RequestParam(value = "limit",defaultValue = "10")Integer limit){ - log.warn("REST request to findAll Permission"); + @RequestParam(value = "name",required = false) String name, + @RequestParam(value = "page",defaultValue = "1")Integer page, + @RequestParam(value = "limit",defaultValue = "10")Integer limit){ + log.warn("REST request to findAll MenusInfo"); Sort sort = new Sort(Sort.Direction.DESC,"id"); Pageable pageable = PageRequest.of(page-1,2000,sort); return menuService.getMenuInfo(new MenuSpec(id,name),pageable); diff --git a/src/main/java/me/aurora/domain/Menu.java b/src/main/java/me/aurora/domain/Menu.java index d3bb2e6..8021024 100644 --- a/src/main/java/me/aurora/domain/Menu.java +++ b/src/main/java/me/aurora/domain/Menu.java @@ -57,6 +57,11 @@ public class Menu implements Serializable { @NotBlank(groups = {New.class,Update.class}) private Integer levelNum = 0; + /** + * 是否为外链 true/false + */ + private Boolean iframe = false; + @ManyToMany @JoinTable(name = "zj_menus_roles", joinColumns = {@JoinColumn(name = "menu_id",referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}) private Set roles; diff --git a/src/main/java/me/aurora/domain/vo/MenuVo.java b/src/main/java/me/aurora/domain/vo/MenuVo.java index 5c70055..4d29979 100644 --- a/src/main/java/me/aurora/domain/vo/MenuVo.java +++ b/src/main/java/me/aurora/domain/vo/MenuVo.java @@ -15,5 +15,7 @@ public class MenuVo { private String path; private String component; + + private String iframe; } diff --git a/src/main/java/me/aurora/service/dto/MenuDTO.java b/src/main/java/me/aurora/service/dto/MenuDTO.java index 50d9673..0b14b81 100644 --- a/src/main/java/me/aurora/service/dto/MenuDTO.java +++ b/src/main/java/me/aurora/service/dto/MenuDTO.java @@ -26,6 +26,8 @@ public class MenuDTO implements Serializable { private Integer pid; + private Boolean iframe; + private Integer level; private String rolesSelect; diff --git a/src/main/java/me/aurora/service/impl/MenuServiceImpl.java b/src/main/java/me/aurora/service/impl/MenuServiceImpl.java index 500f9aa..18e8010 100644 --- a/src/main/java/me/aurora/service/impl/MenuServiceImpl.java +++ b/src/main/java/me/aurora/service/impl/MenuServiceImpl.java @@ -37,13 +37,16 @@ public class MenuServiceImpl implements MenuService { @Override public List buildMenuUrl(List menuList) { - List menuVoList = new ArrayList<>(); + List menuVoList = new ArrayList<>(10); for (MenuDTO menu: menuList) { if(menu.getLevel()!=1){ MenuVo menuVo = new MenuVo(); + menuVo.setName(menu.getName()); + if(menu.getIframe()){ + menuVo.setIframe("true"); + } menuVo.setPath(menu.getUrl()); menuVo.setComponent(menu.getUrl()); - menuVo.setName(menu.getName()); menuVoList.add(menuVo); } } diff --git a/src/main/java/me/aurora/service/mapper/PictureMapper.java b/src/main/java/me/aurora/service/mapper/PictureMapper.java index 8f4664a..9e43910 100644 --- a/src/main/java/me/aurora/service/mapper/PictureMapper.java +++ b/src/main/java/me/aurora/service/mapper/PictureMapper.java @@ -14,5 +14,6 @@ import org.mapstruct.ReportingPolicy; public interface PictureMapper extends EntityMapper{ @Mapping(target = "userName",source = "picture.user.username") + @Override PictureDto toDto(Picture picture); } diff --git a/src/main/java/me/aurora/util/IPUtils.java b/src/main/java/me/aurora/util/IPUtils.java index 17dde8d..cadc036 100644 --- a/src/main/java/me/aurora/util/IPUtils.java +++ b/src/main/java/me/aurora/util/IPUtils.java @@ -10,7 +10,6 @@ public class IPUtils { /** * 获取IP地址 - * * 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址 * 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址 */ diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b103d24..1a109e9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -8,7 +8,6 @@ spring: # 数据库访问配置, 使用druid数据源 type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy -# url: jdbc:log4jdbc:mysql://118.25.192.171:3306/aurora?useUnicode=true&characterEncoding=utf8 url: jdbc:log4jdbc:mysql://localhost:3306/aurora?useUnicode=true&characterEncoding=utf8 username: root password: 123456 diff --git a/src/main/resources/sql/aurora.sql b/src/main/resources/sql/aurora.sql index 89c32ac..441bf2f 100644 --- a/src/main/resources/sql/aurora.sql +++ b/src/main/resources/sql/aurora.sql @@ -11,7 +11,7 @@ Target Server Version : 50559 File Encoding : 65001 - Date: 25/09/2018 13:28:03 + Date: 27/09/2018 13:26:26 */ SET NAMES utf8mb4; @@ -32,31 +32,33 @@ CREATE TABLE `zj_menu` ( `createTime` datetime NULL DEFAULT NULL, `updateTime` datetime NULL DEFAULT NULL, `level_number` int(11) NOT NULL, + `iframe` bit(1) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `UK_cbhg0bi3f1emxkhqqtvca9btx`(`soft`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of zj_menu -- ---------------------------- -INSERT INTO `zj_menu` VALUES (1, 'layui-icon-unlink', 0, 1, '异常页', 60, '', '2018-08-29 11:40:17', '2018-09-24 23:45:17', 3); -INSERT INTO `zj_menu` VALUES (2, 'layui-icon-tree', 1, 2, '403', 61, '/exception/403', '2018-08-29 11:40:17', '2018-09-24 23:45:39', 0); -INSERT INTO `zj_menu` VALUES (3, 'layui-icon-tree', 1, 2, '404', 62, '/exception/404', '2018-08-29 11:40:17', '2018-09-24 23:45:33', 0); -INSERT INTO `zj_menu` VALUES (4, 'layui-icon-tree', 1, 2, '500', 63, '/exception/500', '2018-08-29 11:40:17', '2018-09-24 23:45:26', 0); -INSERT INTO `zj_menu` VALUES (5, 'layui-icon-chart', 0, 1, '系统监控', 10, '', '2018-08-29 11:40:17', '2018-09-23 17:00:57', 7); -INSERT INTO `zj_menu` VALUES (6, 'layui-icon-tree', 7, 2, '用户管理', 2, '/user/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (7, 'layui-icon-util', 0, 1, '系统管理', 1, '', '2018-08-29 11:40:17', '2018-09-23 09:16:17', 5); -INSERT INTO `zj_menu` VALUES (8, 'layui-icon-tree', 7, 2, '菜单管理', 6, '/menu/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (9, 'layui-icon-tree', 5, 2, '系统日志', 11, '/sysLog/index', '2018-08-29 11:40:17', '2018-09-22 10:17:02', 0); -INSERT INTO `zj_menu` VALUES (10, 'layui-icon-tree', 7, 2, '权限管理', 4, '/permission/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (11, 'layui-icon-tree', 7, 2, '角色管理', 3, '/role/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0); -INSERT INTO `zj_menu` VALUES (12, 'layui-icon-website', 0, 1, '网络资源', 30, '', '2018-09-20 11:35:56', '2018-09-20 11:40:53', 1); -INSERT INTO `zj_menu` VALUES (13, 'layui-icon-tree', 12, 2, '图床管理', 31, '/picture/index', '2018-09-20 11:40:53', '2018-09-20 11:40:53', 0); -INSERT INTO `zj_menu` VALUES (14, 'layui-icon-tree', 5, 2, '在线用户', 12, '/online/index', '2018-09-21 16:09:38', '2018-09-22 10:17:09', 0); -INSERT INTO `zj_menu` VALUES (16, 'layui-icon-tree', 5, 2, 'Redis终端', 14, '/redis/terminal', '2018-09-22 11:18:21', '2018-09-22 11:37:28', 0); -INSERT INTO `zj_menu` VALUES (17, 'layui-icon-tree', 7, 2, '接口文档', 7, '/swagger/index', '2018-09-23 09:16:17', '2018-09-23 10:01:06', 0); -INSERT INTO `zj_menu` VALUES (18, 'layui-icon-util', 0, 1, '工具管理', 40, '', '2018-09-24 23:46:02', '2018-09-24 23:46:47', 1); -INSERT INTO `zj_menu` VALUES (19, 'layui-icon-tree', 18, 2, '富文本编辑', 41, '/ueditor/index', '2018-09-24 23:46:47', '2018-09-24 23:46:47', 0); +INSERT INTO `zj_menu` VALUES (1, 'layui-icon-unlink', 0, 1, '异常页', 60, '', '2018-08-29 11:40:17', '2018-09-27 12:57:14', 4, b'0'); +INSERT INTO `zj_menu` VALUES (2, 'layui-icon-tree', 1, 2, '403', 61, '/exception/403', '2018-08-29 11:40:17', '2018-09-24 23:45:39', 0, b'0'); +INSERT INTO `zj_menu` VALUES (3, 'layui-icon-tree', 1, 2, '404', 62, '/exception/404', '2018-08-29 11:40:17', '2018-09-24 23:45:33', 0, b'0'); +INSERT INTO `zj_menu` VALUES (4, 'layui-icon-tree', 1, 2, '500', 63, '/exception/500', '2018-08-29 11:40:17', '2018-09-24 23:45:26', 0, b'0'); +INSERT INTO `zj_menu` VALUES (5, 'layui-icon-chart', 0, 1, '系统监控', 10, '', '2018-08-29 11:40:17', '2018-09-27 13:24:25', 8, b'0'); +INSERT INTO `zj_menu` VALUES (6, 'layui-icon-tree', 7, 2, '用户管理', 2, '/user/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (7, 'layui-icon-util', 0, 1, '系统管理', 1, '', '2018-08-29 11:40:17', '2018-09-23 09:16:17', 5, b'0'); +INSERT INTO `zj_menu` VALUES (8, 'layui-icon-tree', 7, 2, '菜单管理', 6, '/menu/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (9, 'layui-icon-tree', 5, 2, '系统日志', 13, '/sysLog/index', '2018-08-29 11:40:17', '2018-09-27 12:56:27', 0, b'0'); +INSERT INTO `zj_menu` VALUES (10, 'layui-icon-tree', 7, 2, '权限管理', 4, '/permission/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (11, 'layui-icon-tree', 7, 2, '角色管理', 3, '/role/index', '2018-08-29 11:40:17', '2018-09-04 07:40:25', 0, b'0'); +INSERT INTO `zj_menu` VALUES (12, 'layui-icon-website', 0, 1, '网络资源', 30, '', '2018-09-20 11:35:56', '2018-09-20 11:40:53', 1, b'0'); +INSERT INTO `zj_menu` VALUES (13, 'layui-icon-tree', 12, 2, '图床管理', 31, '/picture/index', '2018-09-20 11:40:53', '2018-09-20 11:40:53', 0, b'0'); +INSERT INTO `zj_menu` VALUES (14, 'layui-icon-tree', 5, 2, '在线用户', 12, '/online/index', '2018-09-21 16:09:38', '2018-09-22 10:17:09', 0, b'0'); +INSERT INTO `zj_menu` VALUES (16, 'layui-icon-tree', 5, 2, 'Redis终端', 16, '/redis/terminal', '2018-09-22 11:18:21', '2018-09-27 13:25:09', 0, b'0'); +INSERT INTO `zj_menu` VALUES (17, 'layui-icon-tree', 7, 2, '接口文档', 7, '/swagger/index', '2018-09-23 09:16:17', '2018-09-23 10:01:06', 0, b'0'); +INSERT INTO `zj_menu` VALUES (18, 'layui-icon-util', 0, 1, '工具管理', 40, '', '2018-09-24 23:46:02', '2018-09-24 23:46:47', 1, b'0'); +INSERT INTO `zj_menu` VALUES (19, 'layui-icon-tree', 18, 2, '富文本编辑', 41, '/ueditor/index', '2018-09-24 23:46:47', '2018-09-24 23:46:47', 0, b'0'); +INSERT INTO `zj_menu` VALUES (21, 'layui-icon-tree', 5, 2, 'SQL监控', 15, '/druid/index.html', '2018-09-27 13:24:25', '2018-09-27 13:24:25', 0, b'1'); -- ---------------------------- -- Table structure for zj_menus_roles @@ -92,6 +94,7 @@ INSERT INTO `zj_menus_roles` VALUES (16, 1); INSERT INTO `zj_menus_roles` VALUES (17, 1); INSERT INTO `zj_menus_roles` VALUES (18, 1); INSERT INTO `zj_menus_roles` VALUES (19, 1); +INSERT INTO `zj_menus_roles` VALUES (21, 1); INSERT INTO `zj_menus_roles` VALUES (1, 2); INSERT INTO `zj_menus_roles` VALUES (2, 2); INSERT INTO `zj_menus_roles` VALUES (3, 2); @@ -198,7 +201,7 @@ CREATE TABLE `zj_picture` ( PRIMARY KEY (`id`) USING BTREE, INDEX `FK5qtt7wql9517j0e2read2pdus`(`user_id`) USING BTREE, CONSTRAINT `FK5qtt7wql9517j0e2read2pdus` FOREIGN KEY (`user_id`) REFERENCES `zj_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; -- ---------------------------- -- Records of zj_picture @@ -245,7 +248,7 @@ CREATE TABLE `zj_user` ( -- ---------------------------- -- Records of zj_user -- ---------------------------- -INSERT INTO `zj_user` VALUES (1, 'https://www.zhengjie.me/images/avatar.jpg', '2018-08-23 09:11:56', 'zhengjie@tom.com', 1, '2018-09-25 12:50:50', '65a674ce6632479005ea7a9071234cfb', 'aurora'); +INSERT INTO `zj_user` VALUES (1, 'https://www.zhengjie.me/images/avatar.jpg', '2018-08-23 09:11:56', 'zhengjie@tom.com', 1, '2018-09-27 13:07:26', '65a674ce6632479005ea7a9071234cfb', 'aurora'); -- ---------------------------- -- Table structure for zj_user_pictures diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 376fd98..f645d72 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -86,7 +86,7 @@
  • - + diff --git a/src/main/resources/templates/system/menu/add.html b/src/main/resources/templates/system/menu/add.html index 2d4e59f..047f170 100644 --- a/src/main/resources/templates/system/menu/add.html +++ b/src/main/resources/templates/system/menu/add.html @@ -37,7 +37,7 @@
    @@ -46,6 +46,13 @@
    +
    @@ -100,9 +107,11 @@ form.on('select(top)', function(data){ if(data.value == 0){ $("#action").hide(); + $("#out_link").hide(); $("#action").val(""); }else { $("#action").show(); + $("#out_link").show(); } }); }); diff --git a/src/main/resources/templates/system/menu/index.html b/src/main/resources/templates/system/menu/index.html index 8279bce..7063501 100644 --- a/src/main/resources/templates/system/menu/index.html +++ b/src/main/resources/templates/system/menu/index.html @@ -197,6 +197,7 @@ var name = body.contents().find("input[name=\"name\"]").val(); var pid = body.contents().find("select[name=\"pid\"]").val(); var url = body.contents().find("input[name=\"url\"]").val(); + var iframe = body.contents().find("input[name=\"iframe\"]:checked").val() if(pid == 0){ url = ""; } @@ -218,6 +219,7 @@ ico:ico, pid:pid, url:url, + iframe:iframe, soft:soft }), dataType: "json", @@ -252,6 +254,7 @@ var name = body.contents().find("input[name=\"name\"]").val(); var pid = body.contents().find("select[name=\"pid\"]").val(); var url = body.contents().find("input[name=\"url\"]").val(); + var iframe = body.contents().find("input[name=\"iframe\"]:checked").val() if(pid == 0){ url = ""; } @@ -274,6 +277,7 @@ ico:ico, pid:pid, url:url, + iframe:iframe, soft:soft }), dataType: "json", diff --git a/src/main/resources/templates/system/menu/update.html b/src/main/resources/templates/system/menu/update.html index 0caabb5..b38c4aa 100644 --- a/src/main/resources/templates/system/menu/update.html +++ b/src/main/resources/templates/system/menu/update.html @@ -47,6 +47,13 @@
    +
    @@ -108,9 +115,11 @@ form.on('select(top)', function(data){ if(data.value == 0){ $("#action").hide(); + $("#out_link").hide(); $("#action").val(""); }else { $("#action").show(); + $("#out_link").show(); } }); });