Commit 483c7105 by fsn

修改表结构,重新生成entity

parent 17d58703
...@@ -10,16 +10,16 @@ Target Server Type : MYSQL ...@@ -10,16 +10,16 @@ Target Server Type : MYSQL
Target Server Version : 50621 Target Server Version : 50621
File Encoding : 65001 File Encoding : 65001
Date: 2017-05-15 20:54:38 Date: 2017-05-16 20:50:10
*/ */
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
-- ---------------------------- -- ----------------------------
-- Table structure for _dept -- Table structure for dept
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_dept`; DROP TABLE IF EXISTS `dept`;
CREATE TABLE `_dept` ( CREATE TABLE `dept` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL, `num` int(11) DEFAULT NULL,
`pid` int(11) DEFAULT NULL, `pid` int(11) DEFAULT NULL,
...@@ -28,69 +28,48 @@ CREATE TABLE `_dept` ( ...@@ -28,69 +28,48 @@ CREATE TABLE `_dept` (
`tips` varchar(255) DEFAULT NULL, `tips` varchar(255) DEFAULT NULL,
`version` int(11) DEFAULT NULL, `version` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _dept -- Records of dept
-- ---------------------------- -- ----------------------------
INSERT INTO `_dept` VALUES ('24', '1', '0', '总公司', '总公司', '', null); INSERT INTO `dept` VALUES ('24', '1', '0', '总公司', '总公司', '', null);
INSERT INTO `_dept` VALUES ('25', '2', '24', '开发部', '开发部', '', null); INSERT INTO `dept` VALUES ('25', '2', '24', '开发部', '开发部', '', null);
INSERT INTO `_dept` VALUES ('26', '3', '24', '运营部', '运营部', '', null); INSERT INTO `dept` VALUES ('26', '3', '24', '运营部', '运营部', '', null);
INSERT INTO `_dept` VALUES ('27', '4', '24', '战略部', '战略部', '', null); INSERT INTO `dept` VALUES ('27', '4', '24', '战略部', '战略部', '', null);
-- ---------------------------- -- ----------------------------
-- Table structure for _dict -- Table structure for dict
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_dict`; DROP TABLE IF EXISTS `dict`;
CREATE TABLE `_dict` ( CREATE TABLE `dict` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL, `num` int(11) DEFAULT NULL,
`pid` int(11) DEFAULT NULL, `pid` int(11) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
`tips` varchar(255) DEFAULT NULL, `tips` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _dict -- Records of dict
-- ---------------------------- -- ----------------------------
INSERT INTO `_dict` VALUES ('16', '0', '0', '状态', null); INSERT INTO `dict` VALUES ('16', '0', '0', '状态', null);
INSERT INTO `_dict` VALUES ('17', '1', '16', '启用', null); INSERT INTO `dict` VALUES ('17', '1', '16', '启用', null);
INSERT INTO `_dict` VALUES ('18', '2', '16', '禁用', null); INSERT INTO `dict` VALUES ('18', '2', '16', '禁用', null);
INSERT INTO `_dict` VALUES ('19', '0', '0', '性别', null); INSERT INTO `dict` VALUES ('22', '0', '0', '账号状态', null);
INSERT INTO `_dict` VALUES ('20', '1', '19', '男', null); INSERT INTO `dict` VALUES ('23', '1', '22', '启用', null);
INSERT INTO `_dict` VALUES ('21', '2', '19', '女', null); INSERT INTO `dict` VALUES ('24', '2', '22', '冻结', null);
INSERT INTO `_dict` VALUES ('22', '0', '0', '账号状态', null); INSERT INTO `dict` VALUES ('25', '3', '22', '已删除', null);
INSERT INTO `_dict` VALUES ('23', '1', '22', '启用', null); INSERT INTO `dict` VALUES ('29', '0', '0', '性别', null);
INSERT INTO `_dict` VALUES ('24', '2', '22', '冻结', null); INSERT INTO `dict` VALUES ('30', '1', '29', '男', null);
INSERT INTO `_dict` VALUES ('25', '3', '22', '已删除', null); INSERT INTO `dict` VALUES ('31', '2', '29', '女', null);
-- ---------------------------- -- ----------------------------
-- Table structure for _generate -- Table structure for login_log
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_generate`; DROP TABLE IF EXISTS `login_log`;
CREATE TABLE `_generate` ( CREATE TABLE `login_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`realpath` varchar(255) DEFAULT NULL,
`packagename` varchar(255) DEFAULT NULL,
`modelname` varchar(255) DEFAULT NULL,
`tablename` varchar(255) DEFAULT NULL,
`pkname` varchar(255) DEFAULT NULL,
`tips` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of _generate
-- ----------------------------
INSERT INTO `_generate` VALUES ('1', '测试', 'E:\\Workspaces\\blade\\SpringBlade', 'com.smallchill.gen', 'Notice', '_notice', 'id', null);
-- ----------------------------
-- Table structure for _login_log
-- ----------------------------
DROP TABLE IF EXISTS `_login_log`;
CREATE TABLE `_login_log` (
`id` int(65) NOT NULL AUTO_INCREMENT, `id` int(65) NOT NULL AUTO_INCREMENT,
`logname` varchar(255) DEFAULT NULL, `logname` varchar(255) DEFAULT NULL,
`userid` int(65) DEFAULT NULL, `userid` int(65) DEFAULT NULL,
...@@ -99,24 +78,17 @@ CREATE TABLE `_login_log` ( ...@@ -99,24 +78,17 @@ CREATE TABLE `_login_log` (
`message` text, `message` text,
`ip` varchar(255) DEFAULT NULL, `ip` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _login_log -- Records of login_log
-- ---------------------------- -- ----------------------------
INSERT INTO `_login_log` VALUES ('102', '登录日志', '1', '2017-05-10 21:31:48', '成功', null, '127.0.0.1');
INSERT INTO `_login_log` VALUES ('103', '退出日志', '1', '2017-05-10 22:41:37', '成功', null, '127.0.0.1');
INSERT INTO `_login_log` VALUES ('104', '登录日志', '1', '2017-05-10 22:42:32', '成功', null, '127.0.0.1');
INSERT INTO `_login_log` VALUES ('105', '退出日志', '1', '2017-05-10 23:20:02', '成功', null, '127.0.0.1');
INSERT INTO `_login_log` VALUES ('106', '登录失败日志', null, '2017-05-10 23:20:09', '成功', '账号:admin,账号密码错误', '127.0.0.1');
INSERT INTO `_login_log` VALUES ('107', '登录日志', '1', '2017-05-10 23:20:22', '成功', null, '127.0.0.1');
INSERT INTO `_login_log` VALUES ('108', '登录日志', '1', '2017-05-15 20:21:31', '成功', null, '127.0.0.1');
-- ---------------------------- -- ----------------------------
-- Table structure for _menu -- Table structure for menu
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_menu`; DROP TABLE IF EXISTS `menu`;
CREATE TABLE `_menu` ( CREATE TABLE `menu` (
`id` int(65) NOT NULL AUTO_INCREMENT, `id` int(65) NOT NULL AUTO_INCREMENT,
`code` varchar(255) DEFAULT NULL COMMENT '菜单编号', `code` varchar(255) DEFAULT NULL COMMENT '菜单编号',
`pcode` varchar(255) DEFAULT NULL COMMENT '菜单父编号', `pcode` varchar(255) DEFAULT NULL COMMENT '菜单父编号',
...@@ -129,52 +101,52 @@ CREATE TABLE `_menu` ( ...@@ -129,52 +101,52 @@ CREATE TABLE `_menu` (
`status` int(65) DEFAULT NULL COMMENT '菜单状态 : 1:启用 0:不启用', `status` int(65) DEFAULT NULL COMMENT '菜单状态 : 1:启用 0:不启用',
`isopen` int(11) DEFAULT NULL COMMENT '是否打开: 1:打开 0:不打开', `isopen` int(11) DEFAULT NULL COMMENT '是否打开: 1:打开 0:不打开',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _menu -- Records of menu
-- ---------------------------- -- ----------------------------
INSERT INTO `_menu` VALUES ('105', 'system', '0', '系统管理', 'fa-user', '', '2', '1', null, '1', '1'); INSERT INTO `menu` VALUES ('105', 'system', '0', '系统管理', 'fa-user', '', '2', '1', null, '1', '1');
INSERT INTO `_menu` VALUES ('106', 'mgr', 'system', '用户管理', '', '/mgr', '1', '2', null, '1', '0'); INSERT INTO `menu` VALUES ('106', 'mgr', 'system', '用户管理', '', '/mgr', '1', '2', null, '1', '0');
INSERT INTO `_menu` VALUES ('107', 'mgr_add', 'mgr', '添加用户', null, '/mgr/add', '1', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('107', 'mgr_add', 'mgr', '添加用户', null, '/mgr/add', '1', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('108', 'mgr_edit', 'mgr', '修改用户', null, '/mgr/edit', '2', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('108', 'mgr_edit', 'mgr', '修改用户', null, '/mgr/edit', '2', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('109', 'mgr_delete', 'mgr', '删除用户', null, '/mgr/delete', '3', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('109', 'mgr_delete', 'mgr', '删除用户', null, '/mgr/delete', '3', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('110', 'mgr_reset', 'mgr', '重置密码', null, '/mgr/reset', '4', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('110', 'mgr_reset', 'mgr', '重置密码', null, '/mgr/reset', '4', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('111', 'mgr_freeze', 'mgr', '冻结用户', null, '/mgr/freeze', '5', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('111', 'mgr_freeze', 'mgr', '冻结用户', null, '/mgr/freeze', '5', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('112', 'mgr_unfreeze', 'mgr', '解除冻结用户', null, '/mgr/unfreeze', '6', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('112', 'mgr_unfreeze', 'mgr', '解除冻结用户', null, '/mgr/unfreeze', '6', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('113', 'mgr_setRole', 'mgr', '分配角色', null, '/mgr/setRole', '7', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('113', 'mgr_setRole', 'mgr', '分配角色', null, '/mgr/setRole', '7', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('114', 'role', 'system', '角色管理', null, '/role', '2', '2', null, '1', '0'); INSERT INTO `menu` VALUES ('114', 'role', 'system', '角色管理', null, '/role', '2', '2', null, '1', '0');
INSERT INTO `_menu` VALUES ('115', 'role_add', 'role', '添加角色', null, '/role/add', '1', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('115', 'role_add', 'role', '添加角色', null, '/role/add', '1', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('116', 'role_edit', 'role', '修改角色', null, '/role/edit', '2', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('116', 'role_edit', 'role', '修改角色', null, '/role/edit', '2', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('117', 'role_remove', 'role', '删除角色', null, '/role/remove', '3', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('117', 'role_remove', 'role', '删除角色', null, '/role/remove', '3', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('118', 'role_setAuthority', 'role', '配置权限', null, '/role/setAuthority', '4', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('118', 'role_setAuthority', 'role', '配置权限', null, '/role/setAuthority', '4', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('119', 'menu', 'system', '菜单管理', null, '/menu', '4', '2', null, '1', '0'); INSERT INTO `menu` VALUES ('119', 'menu', 'system', '菜单管理', null, '/menu', '4', '2', null, '1', '0');
INSERT INTO `_menu` VALUES ('120', 'menu_add', 'menu', '添加菜单', null, '/menu/add', '1', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('120', 'menu_add', 'menu', '添加菜单', null, '/menu/add', '1', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('121', 'menu_edit', 'menu', '修改菜单', null, '/menu/edit', '2', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('121', 'menu_edit', 'menu', '修改菜单', null, '/menu/edit', '2', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('122', 'menu_remove', 'menu', '删除菜单', null, '/menu/remove', '3', '3', null, '1', '0'); INSERT INTO `menu` VALUES ('122', 'menu_remove', 'menu', '删除菜单', null, '/menu/remove', '3', '3', null, '1', '0');
INSERT INTO `_menu` VALUES ('128', 'log', 'system', '业务日志', null, '/log', '6', '2', null, '1', '0'); INSERT INTO `menu` VALUES ('128', 'log', 'system', '业务日志', null, '/log', '6', '2', null, '1', '0');
INSERT INTO `_menu` VALUES ('130', 'druid', 'system', '监控管理', null, '/druid', '7', '2', null, '1', null); INSERT INTO `menu` VALUES ('130', 'druid', 'system', '监控管理', null, '/druid', '7', '2', null, '1', null);
INSERT INTO `_menu` VALUES ('131', 'dept', 'system', '部门管理', null, '/dept', '3', '2', null, '1', null); INSERT INTO `menu` VALUES ('131', 'dept', 'system', '部门管理', null, '/dept', '3', '2', null, '1', null);
INSERT INTO `_menu` VALUES ('132', 'dict', 'system', '字典管理', null, '/dict', '4', '2', null, '1', null); INSERT INTO `menu` VALUES ('132', 'dict', 'system', '字典管理', null, '/dict', '4', '2', null, '1', null);
INSERT INTO `_menu` VALUES ('133', 'loginLog', 'system', '登录日志', null, '/loginLog', '6', '2', null, '1', null); INSERT INTO `menu` VALUES ('133', 'loginLog', 'system', '登录日志', null, '/loginLog', '6', '2', null, '1', null);
INSERT INTO `_menu` VALUES ('134', 'log_clean', 'log', '清空日志', null, '/log/delLog', '3', '3', null, '1', null); INSERT INTO `menu` VALUES ('134', 'log_clean', 'log', '清空日志', null, '/log/delLog', '3', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('135', 'dept_add', 'dept', '添加部门', null, '/dept/add', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('135', 'dept_add', 'dept', '添加部门', null, '/dept/add', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('136', 'dept_update', 'dept', '修改部门', null, '/dept/update', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('136', 'dept_update', 'dept', '修改部门', null, '/dept/update', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('137', 'dept_delete', 'dept', '删除部门', null, '/dept/delete', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('137', 'dept_delete', 'dept', '删除部门', null, '/dept/delete', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('138', 'dict_add', 'dict', '添加字典', null, '/dict/add', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('138', 'dict_add', 'dict', '添加字典', null, '/dict/add', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('139', 'dict_update', 'dict', '修改字典', null, '/dict/update', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('139', 'dict_update', 'dict', '修改字典', null, '/dict/update', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('140', 'dict_delete', 'dict', '删除字典', null, '/dict/delete', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('140', 'dict_delete', 'dict', '删除字典', null, '/dict/delete', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('141', 'notice', 'system', '通知管理', null, '/notice', '9', '2', null, '1', null); INSERT INTO `menu` VALUES ('141', 'notice', 'system', '通知管理', null, '/notice', '9', '2', null, '1', null);
INSERT INTO `_menu` VALUES ('142', 'notice_add', 'notice', '添加通知', null, '/notice/add', '1', '3', null, '1', null); INSERT INTO `menu` VALUES ('142', 'notice_add', 'notice', '添加通知', null, '/notice/add', '1', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('143', 'notice_update', 'notice', '修改通知', null, '/notice/update', '2', '3', null, '1', null); INSERT INTO `menu` VALUES ('143', 'notice_update', 'notice', '修改通知', null, '/notice/update', '2', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('144', 'notice_delete', 'notice', '删除通知', null, '/notice/delete', '3', '3', null, '1', null); INSERT INTO `menu` VALUES ('144', 'notice_delete', 'notice', '删除通知', null, '/notice/delete', '3', '3', null, '1', null);
INSERT INTO `_menu` VALUES ('145', 'hello', '0', '通知', 'fa-rocket', '/notice/hello', '1', '1', null, '1', null); INSERT INTO `menu` VALUES ('145', 'hello', '0', '通知', 'fa-rocket', '/notice/hello', '1', '1', null, '1', null);
-- ---------------------------- -- ----------------------------
-- Table structure for _notice -- Table structure for notice
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_notice`; DROP TABLE IF EXISTS `notice`;
CREATE TABLE `_notice` ( CREATE TABLE `notice` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '序列', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '序列',
`title` varchar(255) DEFAULT NULL COMMENT '标题', `title` varchar(255) DEFAULT NULL COMMENT '标题',
`type` int(11) DEFAULT NULL COMMENT '类型', `type` int(11) DEFAULT NULL COMMENT '类型',
...@@ -182,19 +154,19 @@ CREATE TABLE `_notice` ( ...@@ -182,19 +154,19 @@ CREATE TABLE `_notice` (
`createtime` datetime DEFAULT NULL COMMENT '创建时间', `createtime` datetime DEFAULT NULL COMMENT '创建时间',
`creater` int(11) DEFAULT NULL COMMENT '创建人', `creater` int(11) DEFAULT NULL COMMENT '创建人',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _notice -- Records of notice
-- ---------------------------- -- ----------------------------
INSERT INTO `_notice` VALUES ('6', '你好', '10', '欢迎使用Guns管理系统!', '2017-01-11 08:53:20', '1'); INSERT INTO `notice` VALUES ('6', '你好', '10', '欢迎使用Guns管理系统!', '2017-01-11 08:53:20', '1');
INSERT INTO `_notice` VALUES ('8', '世界', null, '欢迎使用Guns管护系统!', '2017-05-10 19:28:57', '1'); INSERT INTO `notice` VALUES ('8', '世界', null, '欢迎使用Guns管护系统!', '2017-05-10 19:28:57', '1');
-- ---------------------------- -- ----------------------------
-- Table structure for _operation_log -- Table structure for operation_log
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_operation_log`; DROP TABLE IF EXISTS `operation_log`;
CREATE TABLE `_operation_log` ( CREATE TABLE `operation_log` (
`id` int(65) NOT NULL AUTO_INCREMENT, `id` int(65) NOT NULL AUTO_INCREMENT,
`logtype` varchar(255) DEFAULT NULL, `logtype` varchar(255) DEFAULT NULL,
`logname` varchar(255) DEFAULT NULL, `logname` varchar(255) DEFAULT NULL,
...@@ -205,103 +177,69 @@ CREATE TABLE `_operation_log` ( ...@@ -205,103 +177,69 @@ CREATE TABLE `_operation_log` (
`succeed` varchar(255) DEFAULT NULL, `succeed` varchar(255) DEFAULT NULL,
`message` text, `message` text,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=376 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=423 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of _operation_log
-- ----------------------------
INSERT INTO `_operation_log` VALUES ('361', '业务日志', '清空业务日志', '1', 'com.stylefeng.guns.modular.system.controller.LogController', 'delLog', '2017-05-09 23:54:30', '成功', '无');
INSERT INTO `_operation_log` VALUES ('362', '业务日志', '修改菜单', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'edit', '2017-05-10 22:06:02', '成功', '菜单id=105;;;字段名称:菜单排序号,旧值:1,新值:2');
INSERT INTO `_operation_log` VALUES ('363', '业务日志', '修改菜单', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'edit', '2017-05-10 22:15:31', '成功', '菜单id=145;;;字段名称:url地址,旧值:/hello,新值:/notice/hello');
INSERT INTO `_operation_log` VALUES ('364', '业务日志', '修改菜单', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'edit', '2017-05-10 22:38:01', '成功', '菜单id=106;;;');
INSERT INTO `_operation_log` VALUES ('365', '业务日志', '修改菜单', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'edit', '2017-05-10 22:38:16', '成功', '菜单id=106;;;字段名称:菜单图标,旧值:fa-user,新值:');
INSERT INTO `_operation_log` VALUES ('366', '业务日志', '菜单新增', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'add', '2017-05-10 22:38:27', '成功', '菜单名称:test');
INSERT INTO `_operation_log` VALUES ('367', '业务日志', '删除菜单', '1', 'com.stylefeng.guns.modular.system.controller.MenuController', 'remove', '2017-05-10 22:38:37', '成功', '菜单id:146');
INSERT INTO `_operation_log` VALUES ('368', '业务日志', '重置管理员密码', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'reset', '2017-05-10 22:40:42', '成功', '用户id:1');
INSERT INTO `_operation_log` VALUES ('369', '业务日志', '删除管理员', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'delete', '2017-05-10 22:40:43', '成功', '用户id:1');
INSERT INTO `_operation_log` VALUES ('370', '业务日志', '修改字典', '1', 'com.stylefeng.guns.modular.system.controller.DictController', 'update', '2017-05-10 22:42:59', '成功', '字典名称=性别;;;');
INSERT INTO `_operation_log` VALUES ('371', '业务日志', '修改字典', '1', 'com.stylefeng.guns.modular.system.controller.DictController', 'update', '2017-05-10 22:44:12', '成功', '字典名称=账号状态;;;');
INSERT INTO `_operation_log` VALUES ('372', '业务日志', '删除管理员', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'delete', '2017-05-10 22:45:27', '成功', '用户id:1');
INSERT INTO `_operation_log` VALUES ('373', '业务日志', '冻结用户', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'freeze', '2017-05-10 22:49:44', '成功', '用户id:1');
INSERT INTO `_operation_log` VALUES ('374', '业务日志', '解除冻结用户', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'unfreeze', '2017-05-10 22:49:45', '成功', '用户id:1');
INSERT INTO `_operation_log` VALUES ('375', '业务日志', '删除管理员', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'delete', '2017-05-10 22:49:47', '成功', '用户id:1');
-- ----------------------------
-- Table structure for _parameter
-- ----------------------------
DROP TABLE IF EXISTS `_parameter`;
CREATE TABLE `_parameter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(255) DEFAULT NULL,
`num` int(11) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`para` text,
`tips` varchar(255) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`version` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _parameter -- Records of operation_log
-- ---------------------------- -- ----------------------------
INSERT INTO `_parameter` VALUES ('1', '101', '100', '是否开启记录日志', '2', '1:是 2:否', '1', '7'); INSERT INTO `operation_log` VALUES ('421', '业务日志', '清空业务日志', '1', 'com.stylefeng.guns.modular.system.controller.LogController', 'delLog', '2017-05-16 20:48:11', '成功', '无');
INSERT INTO `operation_log` VALUES ('422', '业务日志', '修改管理员', '1', 'com.stylefeng.guns.modular.system.controller.UserMgrController', 'edit', '2017-05-16 20:48:46', '成功', '用户id=1;;;字段名称:null,旧值:94683344-e862-40cd-a2af-83b468a0ed3a.jpg,新值:000be33d-06ae-431d-b8ef-0f39e55743fb.jpg');
-- ---------------------------- -- ----------------------------
-- Table structure for _relation -- Table structure for relation
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_relation`; DROP TABLE IF EXISTS `relation`;
CREATE TABLE `_relation` ( CREATE TABLE `relation` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`menuid` int(11) DEFAULT NULL, `menuid` int(11) DEFAULT NULL,
`roleid` int(11) DEFAULT NULL, `roleid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3193 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=3227 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _relation -- Records of relation
-- ---------------------------- -- ----------------------------
INSERT INTO `_relation` VALUES ('3158', '105', '1'); INSERT INTO `relation` VALUES ('3158', '105', '1');
INSERT INTO `_relation` VALUES ('3159', '106', '1'); INSERT INTO `relation` VALUES ('3159', '106', '1');
INSERT INTO `_relation` VALUES ('3160', '107', '1'); INSERT INTO `relation` VALUES ('3160', '107', '1');
INSERT INTO `_relation` VALUES ('3161', '108', '1'); INSERT INTO `relation` VALUES ('3161', '108', '1');
INSERT INTO `_relation` VALUES ('3162', '109', '1'); INSERT INTO `relation` VALUES ('3162', '109', '1');
INSERT INTO `_relation` VALUES ('3163', '110', '1'); INSERT INTO `relation` VALUES ('3163', '110', '1');
INSERT INTO `_relation` VALUES ('3164', '111', '1'); INSERT INTO `relation` VALUES ('3164', '111', '1');
INSERT INTO `_relation` VALUES ('3165', '112', '1'); INSERT INTO `relation` VALUES ('3165', '112', '1');
INSERT INTO `_relation` VALUES ('3166', '113', '1'); INSERT INTO `relation` VALUES ('3166', '113', '1');
INSERT INTO `_relation` VALUES ('3167', '114', '1'); INSERT INTO `relation` VALUES ('3167', '114', '1');
INSERT INTO `_relation` VALUES ('3168', '115', '1'); INSERT INTO `relation` VALUES ('3168', '115', '1');
INSERT INTO `_relation` VALUES ('3169', '116', '1'); INSERT INTO `relation` VALUES ('3169', '116', '1');
INSERT INTO `_relation` VALUES ('3170', '117', '1'); INSERT INTO `relation` VALUES ('3170', '117', '1');
INSERT INTO `_relation` VALUES ('3171', '118', '1'); INSERT INTO `relation` VALUES ('3171', '118', '1');
INSERT INTO `_relation` VALUES ('3172', '119', '1'); INSERT INTO `relation` VALUES ('3172', '119', '1');
INSERT INTO `_relation` VALUES ('3173', '120', '1'); INSERT INTO `relation` VALUES ('3173', '120', '1');
INSERT INTO `_relation` VALUES ('3174', '121', '1'); INSERT INTO `relation` VALUES ('3174', '121', '1');
INSERT INTO `_relation` VALUES ('3175', '122', '1'); INSERT INTO `relation` VALUES ('3175', '122', '1');
INSERT INTO `_relation` VALUES ('3176', '128', '1'); INSERT INTO `relation` VALUES ('3176', '128', '1');
INSERT INTO `_relation` VALUES ('3177', '134', '1'); INSERT INTO `relation` VALUES ('3177', '134', '1');
INSERT INTO `_relation` VALUES ('3178', '130', '1'); INSERT INTO `relation` VALUES ('3178', '130', '1');
INSERT INTO `_relation` VALUES ('3179', '131', '1'); INSERT INTO `relation` VALUES ('3179', '131', '1');
INSERT INTO `_relation` VALUES ('3180', '135', '1'); INSERT INTO `relation` VALUES ('3180', '135', '1');
INSERT INTO `_relation` VALUES ('3181', '136', '1'); INSERT INTO `relation` VALUES ('3181', '136', '1');
INSERT INTO `_relation` VALUES ('3182', '137', '1'); INSERT INTO `relation` VALUES ('3182', '137', '1');
INSERT INTO `_relation` VALUES ('3183', '132', '1'); INSERT INTO `relation` VALUES ('3183', '132', '1');
INSERT INTO `_relation` VALUES ('3184', '138', '1'); INSERT INTO `relation` VALUES ('3184', '138', '1');
INSERT INTO `_relation` VALUES ('3185', '139', '1'); INSERT INTO `relation` VALUES ('3185', '139', '1');
INSERT INTO `_relation` VALUES ('3186', '140', '1'); INSERT INTO `relation` VALUES ('3186', '140', '1');
INSERT INTO `_relation` VALUES ('3187', '133', '1'); INSERT INTO `relation` VALUES ('3187', '133', '1');
INSERT INTO `_relation` VALUES ('3188', '141', '1'); INSERT INTO `relation` VALUES ('3188', '141', '1');
INSERT INTO `_relation` VALUES ('3189', '142', '1'); INSERT INTO `relation` VALUES ('3189', '142', '1');
INSERT INTO `_relation` VALUES ('3190', '143', '1'); INSERT INTO `relation` VALUES ('3190', '143', '1');
INSERT INTO `_relation` VALUES ('3191', '144', '1'); INSERT INTO `relation` VALUES ('3191', '144', '1');
INSERT INTO `_relation` VALUES ('3192', '145', '1'); INSERT INTO `relation` VALUES ('3192', '145', '1');
-- ---------------------------- -- ----------------------------
-- Table structure for _role -- Table structure for role
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_role`; DROP TABLE IF EXISTS `role`;
CREATE TABLE `_role` ( CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL, `num` int(11) DEFAULT NULL,
`pid` int(11) DEFAULT NULL, `pid` int(11) DEFAULT NULL,
...@@ -310,35 +248,18 @@ CREATE TABLE `_role` ( ...@@ -310,35 +248,18 @@ CREATE TABLE `_role` (
`tips` varchar(255) DEFAULT NULL, `tips` varchar(255) DEFAULT NULL,
`version` int(11) DEFAULT NULL, `version` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of _role
-- ----------------------------
INSERT INTO `_role` VALUES ('1', '1', '0', '超级管理员', '24', 'administrator', '1');
-- ----------------------------
-- Table structure for _role_ext
-- ----------------------------
DROP TABLE IF EXISTS `_role_ext`;
CREATE TABLE `_role_ext` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` varchar(255) DEFAULT NULL,
`rolein` text,
`roleout` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _role_ext -- Records of role
-- ---------------------------- -- ----------------------------
INSERT INTO `_role_ext` VALUES ('27', '66', '1,44,49', '45'); INSERT INTO `role` VALUES ('1', '1', '0', '超级管理员', '24', 'administrator', '1');
-- ---------------------------- -- ----------------------------
-- Table structure for _user -- Table structure for user
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `_user`; DROP TABLE IF EXISTS `user`;
CREATE TABLE `_user` ( CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`avatar` varchar(255) DEFAULT NULL, `avatar` varchar(255) DEFAULT NULL,
`account` varchar(45) DEFAULT NULL, `account` varchar(45) DEFAULT NULL,
...@@ -355,9 +276,10 @@ CREATE TABLE `_user` ( ...@@ -355,9 +276,10 @@ CREATE TABLE `_user` (
`createtime` datetime DEFAULT NULL, `createtime` datetime DEFAULT NULL,
`version` int(11) DEFAULT NULL, `version` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------
-- Records of _user -- Records of user
-- ---------------------------- -- ----------------------------
INSERT INTO `_user` VALUES ('1', 'boy.gif', 'admin', 'ecfadcde9305f8891bcfe5a1e28c253e', '8pgby', '张三', '2017-05-05 00:00:00', '1', 'sn93@qq.com', '18200000000', '1', '24', '1', '2016-01-29 08:49:53', '25'); INSERT INTO `user` VALUES ('1', '000be33d-06ae-431d-b8ef-0f39e55743fb.jpg', 'admin', 'ecfadcde9305f8891bcfe5a1e28c253e', '8pgby', '张三', '2017-05-05 00:00:00', '2', 'sn93@qq.com', '18200000000', '1', '27', '1', '2016-01-29 08:49:53', '25');
INSERT INTO `user` VALUES ('44', null, ' test', 'a5421443274a4d1f9eb938f7adc4478d', '4g4bn', 'test', '2017-05-01 00:00:00', '1', 'abc@123.com', '', '1', '26', '3', '2017-05-16 20:33:37', null);
...@@ -45,7 +45,7 @@ public class GlobalExceptionHandler { ...@@ -45,7 +45,7 @@ public class GlobalExceptionHandler {
public ErrorTip notFount(BussinessException e) { public ErrorTip notFount(BussinessException e) {
LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e)); LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e));
getRequest().setAttribute("tip", e.getMessage()); getRequest().setAttribute("tip", e.getMessage());
log.error("业务异常:",e); log.error("业务异常:", e);
return new ErrorTip(e.getCode(), e.getMessage()); return new ErrorTip(e.getCode(), e.getMessage());
} }
...@@ -113,6 +113,7 @@ public class GlobalExceptionHandler { ...@@ -113,6 +113,7 @@ public class GlobalExceptionHandler {
@ResponseBody @ResponseBody
public ErrorTip credentials(UndeclaredThrowableException e) { public ErrorTip credentials(UndeclaredThrowableException e) {
getRequest().setAttribute("tip", "权限异常"); getRequest().setAttribute("tip", "权限异常");
log.error("权限异常!", e);
return new ErrorTip(BizExceptionEnum.NO_PERMITION); return new ErrorTip(BizExceptionEnum.NO_PERMITION);
} }
...@@ -127,7 +128,7 @@ public class GlobalExceptionHandler { ...@@ -127,7 +128,7 @@ public class GlobalExceptionHandler {
public ErrorTip notFount(RuntimeException e) { public ErrorTip notFount(RuntimeException e) {
LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e)); LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e));
getRequest().setAttribute("tip", "服务器未知运行时异常"); getRequest().setAttribute("tip", "服务器未知运行时异常");
log.error("运行时异常:",e); log.error("运行时异常:", e);
return new ErrorTip(BizExceptionEnum.SERVER_ERROR); return new ErrorTip(BizExceptionEnum.SERVER_ERROR);
} }
......
...@@ -80,7 +80,7 @@ public class LogController extends BaseController { ...@@ -80,7 +80,7 @@ public class LogController extends BaseController {
@Permission(Const.ADMIN_NAME) @Permission(Const.ADMIN_NAME)
@ResponseBody @ResponseBody
public Object delLog() { public Object delLog() {
SqlRunner.db().delete("delete from _operation_log"); SqlRunner.db().delete("delete from operation_log");
return super.SUCCESS_TIP; return super.SUCCESS_TIP;
} }
} }
...@@ -59,7 +59,7 @@ public class LoginLogController extends BaseController { ...@@ -59,7 +59,7 @@ public class LoginLogController extends BaseController {
@RequestMapping("/delLoginLog") @RequestMapping("/delLoginLog")
@ResponseBody @ResponseBody
public Object delLog() { public Object delLog() {
SqlRunner.db().delete("delete from _login_log"); SqlRunner.db().delete("delete from login_log");
return super.SUCCESS_TIP; return super.SUCCESS_TIP;
} }
} }
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
ELSE ELSE
'false' 'false'
END END
) as open from _dept ) as open from dept
</select> </select>
<select id="list" resultType="map"> <select id="list" resultType="map">
select * from _dept select * from dept
<if test="condition != null and condition != ''"> <if test="condition != null and condition != ''">
where simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%') where simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%')
</if> </if>
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<select id="selectByCode" resultType="dict"> <select id="selectByCode" resultType="dict">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from _dict from dict
where code = #{code} where code = #{code}
</select> </select>
<select id="list" resultType="map"> <select id="list" resultType="map">
select * from _dict select * from dict
where num = 0 where num = 0
<if test="condition != null and condition != ''"> <if test="condition != null and condition != ''">
AND name like CONCAT('%',#{condition},'%') AND name like CONCAT('%',#{condition},'%')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.stylefeng.guns.modular.system.dao.LogDao"> <mapper namespace="com.stylefeng.guns.modular.system.dao.LogDao">
<select id="getOperationLogs" resultType="map"> <select id="getOperationLogs" resultType="map">
select * from _operation_log where 1 = 1 select * from operation_log where 1 = 1
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if> </if>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</select> </select>
<select id="getLoginLogs" resultType="map"> <select id="getLoginLogs" resultType="map">
select * from _login_log where 1 = 1 select * from login_log where 1 = 1
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if> </if>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<select id="selectMenus" resultType="map"> <select id="selectMenus" resultType="map">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from _menu from menu
where status = 1 where status = 1
<if test="condition != null and condition != ''"> <if test="condition != null and condition != ''">
and (name like CONCAT('%',#{condition},'%') or code like CONCAT('%',#{condition},'%')) and (name like CONCAT('%',#{condition},'%') or code like CONCAT('%',#{condition},'%'))
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<select id="getMenuIdsByRoleId" resultType="int"> <select id="getMenuIdsByRoleId" resultType="int">
select menuid from select menuid from
_relation where roleid = #{roleId} relation where roleid = #{roleId}
</select> </select>
<select id="menuTreeList" resultType="com.stylefeng.guns.common.node.ZTreeNode"> <select id="menuTreeList" resultType="com.stylefeng.guns.common.node.ZTreeNode">
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
END END
) as open ) as open
FROM FROM
_menu m1 menu m1
LEFT JOIN _menu m2 ON m1.pcode = m2. CODE LEFT JOIN menu m2 ON m1.pcode = m2. CODE
ORDER BY ORDER BY
m1.id ASC m1.id ASC
</select> </select>
...@@ -85,15 +85,15 @@ ...@@ -85,15 +85,15 @@
END END
) "checked" ) "checked"
FROM FROM
_menu m1 menu m1
LEFT JOIN LEFT JOIN
_menu m2 menu m2
ON m1.pcode = m2. CODE ON m1.pcode = m2. CODE
left join ( left join (
SELECT SELECT
ID ID
FROM FROM
_menu menu
WHERE WHERE
ID IN ID IN
<foreach collection="list" index="index" item="i" open="(" <foreach collection="list" index="index" item="i" open="("
...@@ -106,13 +106,13 @@ ...@@ -106,13 +106,13 @@
</select> </select>
<delete id="deleteRelationByMenu"> <delete id="deleteRelationByMenu">
delete from _relation where menuid = #{menuId} delete from relation where menuid = #{menuId}
</delete> </delete>
<select id="getResUrlsByRoleId" resultType="string"> <select id="getResUrlsByRoleId" resultType="string">
select url from select url from
_relation rel relation rel
inner join _menu m on rel.menuid = m.id inner join menu m on rel.menuid = m.id
where rel.roleid = #{roleId} where rel.roleid = #{roleId}
</select> </select>
...@@ -133,19 +133,19 @@ ...@@ -133,19 +133,19 @@
m1.levels as levels, m1.levels as levels,
m1.num as num m1.num as num
FROM FROM
_menu m1 menu m1
LEFT JOIN _menu m2 ON m1.pcode = m2. CODE LEFT JOIN menu m2 ON m1.pcode = m2. CODE
INNER JOIN ( INNER JOIN (
SELECT SELECT
ID ID
FROM FROM
_menu menu
WHERE WHERE
ID IN ( ID IN (
SELECT SELECT
menuid menuid
FROM FROM
_relation rela relation rela
WHERE WHERE
rela.roleid IN ( rela.roleid IN (
<foreach collection="list" index="index" item="i" open="(" separator="," close=")"> <foreach collection="list" index="index" item="i" open="(" separator="," close=")">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.stylefeng.guns.modular.system.dao.NoticeDao"> <mapper namespace="com.stylefeng.guns.modular.system.dao.NoticeDao">
<select id="list" resultType="map"> <select id="list" resultType="map">
select * from _notice select * from notice
<if test="condition != null and condition != ''"> <if test="condition != null and condition != ''">
where title like CONCAT('%',#{condition},'%') or content like CONCAT('%',#{condition},'%') where title like CONCAT('%',#{condition},'%') or content like CONCAT('%',#{condition},'%')
</if> </if>
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
<select id="selectRoles" resultType="map"> <select id="selectRoles" resultType="map">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from _role from role
<if test="condition != null"> <if test="condition != null">
where name like CONCAT('%',#{condition},'%') where name like CONCAT('%',#{condition},'%')
</if> </if>
</select> </select>
<delete id="deleteRolesById"> <delete id="deleteRolesById">
delete from _relation where roleid = #{roleId} delete from relation where roleid = #{roleId}
</delete> </delete>
<select id="roleTreeList" resultType="com.stylefeng.guns.common.node.ZTreeNode"> <select id="roleTreeList" resultType="com.stylefeng.guns.common.node.ZTreeNode">
select id "id",pId select id "id",pId
"pId",name as "name",(case when (pId=0 or pId is null) then 'true' "pId",name as "name",(case when (pId=0 or pId is null) then 'true'
else 'false' end) "open" from _role else 'false' end) "open" from role
</select> </select>
<select id="roleTreeListByRoleId" resultType="com.stylefeng.guns.common.node.ZTreeNode"> <select id="roleTreeListByRoleId" resultType="com.stylefeng.guns.common.node.ZTreeNode">
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
END END
) "checked" ) "checked"
FROM FROM
_role r role r
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
ID ID
FROM FROM
_role role
WHERE WHERE
ID IN ID IN
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<select id="selectUsers" resultType="map"> <select id="selectUsers" resultType="map">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from _user from user
where status != 3 where status != 3
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and (phone like CONCAT('%',#{name},'%') and (phone like CONCAT('%',#{name},'%')
...@@ -32,24 +32,24 @@ ...@@ -32,24 +32,24 @@
</select> </select>
<update id="setStatus"> <update id="setStatus">
update _user set status = #{status} where id = update user set status = #{status} where id =
#{userId} #{userId}
</update> </update>
<update id="changePwd"> <update id="changePwd">
update _user set password = #{pwd} where id = update user set password = #{pwd} where id =
#{userId} #{userId}
</update> </update>
<update id="setRoles"> <update id="setRoles">
update _user set roleid = #{roleIds} where id = update user set roleid = #{roleIds} where id =
#{userId} #{userId}
</update> </update>
<select id="getByAccount" resultType="user"> <select id="getByAccount" resultType="user">
select select
<include refid="Base_Column_List_With_Pwd" /> <include refid="Base_Column_List_With_Pwd" />
from _user where account = #{account} and status != 3 from user where account = #{account} and status != 3
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface DeptMapper extends BaseMapper<Dept> { public interface DeptMapper extends BaseMapper<Dept> {
......
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface DictMapper extends BaseMapper<Dict> { public interface DictMapper extends BaseMapper<Dict> {
......
package com.stylefeng.guns.persistence.dao;
import com.stylefeng.guns.persistence.model.Generate;
import com.baomidou.mybatisplus.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
public interface GenerateMapper extends BaseMapper<Generate> {
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface LoginLogMapper extends BaseMapper<LoginLog> { public interface LoginLogMapper extends BaseMapper<LoginLog> {
......
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface MenuMapper extends BaseMapper<Menu> { public interface MenuMapper extends BaseMapper<Menu> {
......
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface NoticeMapper extends BaseMapper<Notice> { public interface NoticeMapper extends BaseMapper<Notice> {
......
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface OperationLogMapper extends BaseMapper<OperationLog> { public interface OperationLogMapper extends BaseMapper<OperationLog> {
......
package com.stylefeng.guns.persistence.dao;
import com.stylefeng.guns.persistence.model.Parameter;
import com.baomidou.mybatisplus.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
public interface ParameterMapper extends BaseMapper<Parameter> {
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface RelationMapper extends BaseMapper<Relation> { public interface RelationMapper extends BaseMapper<Relation> {
......
package com.stylefeng.guns.persistence.dao;
import com.stylefeng.guns.persistence.model.RoleExt;
import com.baomidou.mybatisplus.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
public interface RoleExtMapper extends BaseMapper<RoleExt> {
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface RoleMapper extends BaseMapper<Role> { public interface RoleMapper extends BaseMapper<Role> {
......
...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; ...@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
public interface UserMapper extends BaseMapper<User> { public interface UserMapper extends BaseMapper<User> {
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stylefeng.guns.persistence.dao.GenerateMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.stylefeng.guns.persistence.model.Generate">
<id column="id" property="id" />
<result column="name" property="name" />
<result column="realpath" property="realpath" />
<result column="packagename" property="packagename" />
<result column="modelname" property="modelname" />
<result column="tablename" property="tablename" />
<result column="pkname" property="pkname" />
<result column="tips" property="tips" />
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stylefeng.guns.persistence.dao.ParameterMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.stylefeng.guns.persistence.model.Parameter">
<id column="id" property="id" />
<result column="code" property="code" />
<result column="num" property="num" />
<result column="name" property="name" />
<result column="para" property="para" />
<result column="tips" property="tips" />
<result column="status" property="status" />
<result column="version" property="version" />
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stylefeng.guns.persistence.dao.RoleExtMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.stylefeng.guns.persistence.model.RoleExt">
<id column="id" property="id" />
<result column="userid" property="userid" />
<result column="rolein" property="rolein" />
<result column="roleout" property="roleout" />
</resultMap>
</mapper>
...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model; ...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -12,9 +11,8 @@ import java.io.Serializable; ...@@ -12,9 +11,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_dept")
public class Dept extends Model<Dept> { public class Dept extends Model<Dept> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model; ...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -12,9 +11,8 @@ import java.io.Serializable; ...@@ -12,9 +11,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_dict")
public class Dict extends Model<Dict> { public class Dict extends Model<Dict> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
@TableName("_generate")
public class Generate extends Model<Generate> {
private static final long serialVersionUID = 1L;
@TableId(value="id", type= IdType.AUTO)
private Integer id;
private String name;
private String realpath;
private String packagename;
private String modelname;
private String tablename;
private String pkname;
private String tips;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRealpath() {
return realpath;
}
public void setRealpath(String realpath) {
this.realpath = realpath;
}
public String getPackagename() {
return packagename;
}
public void setPackagename(String packagename) {
this.packagename = packagename;
}
public String getModelname() {
return modelname;
}
public void setModelname(String modelname) {
this.modelname = modelname;
}
public String getTablename() {
return tablename;
}
public void setTablename(String tablename) {
this.tablename = tablename;
}
public String getPkname() {
return pkname;
}
public void setPkname(String pkname) {
this.pkname = pkname;
}
public String getTips() {
return tips;
}
public void setTips(String tips) {
this.tips = tips;
}
@Override
protected Serializable pkVal() {
return this.id;
}
}
package com.stylefeng.guns.persistence.model; package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* <p> * <p>
...@@ -13,9 +14,9 @@ import java.io.Serializable; ...@@ -13,9 +14,9 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_login_log") @TableName("login_log")
public class LoginLog extends Model<LoginLog> { public class LoginLog extends Model<LoginLog> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model; ...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -12,9 +11,8 @@ import java.io.Serializable; ...@@ -12,9 +11,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_menu")
public class Menu extends Model<Menu> { public class Menu extends Model<Menu> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.enums.IdType; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -13,9 +12,8 @@ import java.io.Serializable; ...@@ -13,9 +12,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_notice")
public class Notice extends Model<Notice> { public class Notice extends Model<Notice> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -13,9 +13,9 @@ import java.io.Serializable; ...@@ -13,9 +13,9 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_operation_log") @TableName("operation_log")
public class OperationLog extends Model<OperationLog> { public class OperationLog extends Model<OperationLog> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
@TableName("_parameter")
public class Parameter extends Model<Parameter> {
private static final long serialVersionUID = 1L;
@TableId(value="id", type= IdType.AUTO)
private Integer id;
private String code;
private Integer num;
private String name;
private String para;
private String tips;
private Integer status;
private Integer version;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPara() {
return para;
}
public void setPara(String para) {
this.para = para;
}
public String getTips() {
return tips;
}
public void setTips(String tips) {
this.tips = tips;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
@Override
protected Serializable pkVal() {
return this.id;
}
}
...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model; ...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -12,9 +11,8 @@ import java.io.Serializable; ...@@ -12,9 +11,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_relation")
public class Relation extends Model<Relation> { public class Relation extends Model<Relation> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model; ...@@ -3,7 +3,6 @@ package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -12,9 +11,8 @@ import java.io.Serializable; ...@@ -12,9 +11,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_role")
public class Role extends Model<Role> { public class Role extends Model<Role> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.stylefeng.guns.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author stylefeng
* @since 2017-05-15
*/
@TableName("_role_ext")
public class RoleExt extends Model<RoleExt> {
private static final long serialVersionUID = 1L;
@TableId(value="id", type= IdType.AUTO)
private Integer id;
private String userid;
private String rolein;
private String roleout;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getRolein() {
return rolein;
}
public void setRolein(String rolein) {
this.rolein = rolein;
}
public String getRoleout() {
return roleout;
}
public void setRoleout(String roleout) {
this.roleout = roleout;
}
@Override
protected Serializable pkVal() {
return this.id;
}
}
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.enums.IdType; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -13,9 +12,8 @@ import java.io.Serializable; ...@@ -13,9 +12,8 @@ import java.io.Serializable;
* </p> * </p>
* *
* @author stylefeng * @author stylefeng
* @since 2017-05-15 * @since 2017-05-16
*/ */
@TableName("_user")
public class User extends Model<User> { public class User extends Model<User> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -59,7 +59,7 @@ public class MpGenerator { ...@@ -59,7 +59,7 @@ public class MpGenerator {
// 策略配置 // 策略配置
StrategyConfig strategy = new StrategyConfig(); StrategyConfig strategy = new StrategyConfig();
strategy.setTablePrefix(new String[]{"_"});// 此处可以修改为您的表前缀 //strategy.setTablePrefix(new String[]{"_"});// 此处可以修改为您的表前缀
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略 strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
mpg.setStrategy(strategy); mpg.setStrategy(strategy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment