🔖 发布一个版本。 v1.4.0 新增代码生成

This commit is contained in:
冷冷 committed 2018-08-02 22:16:14 +08:00
1 parent 4e6ce28340
commit cbceb44fb4
18 files changed
+246 -99

No files matched your search

+14 -14
View File
@@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Source Server : 139.224.200.249
Source Server : 114.116.45.246
Source Server Type : MySQL
Source Server Version : 50721
Source Host : 139.224.200.249
Source Server Version : 50722
Source Host : 114.116.45.246
Source Database : pigx
Target Server Type : MySQL
Target Server Version : 50721
Target Server Version : 50722
File Encoding : utf-8
Date: 06/26/2018 21:52:22 PM
Date: 08/02/2018 22:07:34 PM
*/
SET NAMES utf8;
@@ -77,13 +77,13 @@ CREATE TABLE `sys_dict` (
KEY `sys_dict_value` (`value`),
KEY `sys_dict_label` (`label`),
KEY `sys_dict_del_flag` (`del_flag`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典表';
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典表';
-- ----------------------------
-- Records of `sys_dict`
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES ('2', '9', '异常', 'log_type', '日志异常', '1', '2017-12-28 13:06:39', '2018-01-06 10:54:41', null, '0'), ('3', '0', '正常', 'log_type', '正常', '1', '2018-05-11 23:52:57', '2018-05-11 23:52:57', '123', '0');
INSERT INTO `sys_dict` VALUES ('2', '9', '异常', 'log_type', '日志异常', '1', '2018-07-09 06:16:14', '2018-07-09 06:16:14', '4567', '0'), ('3', '0', '正常', 'log_type', '正常', '1', '2018-07-09 06:15:40', '2018-07-09 06:15:40', '1234', '0');
COMMIT;
-- ----------------------------
@@ -137,7 +137,7 @@ CREATE TABLE `sys_menu` (
-- Records of `sys_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES ('1', '系统管理', null, '/admin', '-1', 'icon-xitongguanli', 'Layout', '1', '0', '2017-11-07 20:56:00', '2018-05-14 21:53:22', '0'), ('2', '用户管理', null, 'user', '1', 'icon-yonghuguanli', 'views/admin/user/index', '2', '0', '2017-11-02 22:24:37', '2018-05-14 22:11:35', '0'), ('3', '菜单管理', null, 'menu', '1', 'icon-caidanguanli', 'views/admin/menu/index', '3', '0', '2017-11-08 09:57:27', '2018-05-14 22:11:21', '0'), ('4', '角色管理', null, 'role', '1', 'icon-jiaoseguanli', 'views/admin/role/index', '4', '0', '2017-11-08 10:13:37', '2018-05-14 22:11:19', '0'), ('5', '日志管理', null, 'log', '1', 'icon-rizhiguanli', 'views/admin/log/index', '5', '0', '2017-11-20 14:06:22', '2018-05-14 22:11:18', '0'), ('6', '字典管理', null, 'dict', '1', 'icon-zygl', 'views/admin/dict/index', '6', '0', '2017-11-29 11:30:52', '2018-05-14 22:12:48', '0'), ('7', '部门管理', null, 'dept', '1', 'icon-iconbmgl', 'views/admin/dept/index', '7', '0', '2018-01-20 13:17:19', '2018-05-14 22:11:16', '0'), ('8', '系统监控', null, '', '-1', 'icon-iconbmgl', null, '8', '0', '2018-01-22 12:30:41', '2018-06-24 17:10:11', '1'), ('9', '服务监控', null, 'http://139.224.200.249:5001', '8', 'icon-jiankong', null, '9', '0', '2018-01-23 10:53:33', '2018-06-24 17:10:12', '1'), ('10', 'zipkin监控', null, 'http://139.224.200.249:5002', '8', 'icon-jiankong', null, '11', '0', '2018-01-23 10:55:18', '2018-06-24 17:10:12', '1'), ('11', 'pinpoint监控', null, 'https://pinpoint.pig4cloud.com', '8', 'icon-xiazaihuancun', null, '10', '0', '2018-01-25 11:08:52', '2018-06-24 17:10:12', '1'), ('12', '缓存状态', null, 'http://139.224.200.249:8585', '8', 'icon-ecs-status', null, '12', '0', '2018-01-23 10:56:11', '2018-06-24 17:10:12', '1'), ('13', 'ELK状态', null, 'http://139.224.200.249:5601', '8', 'icon-ecs-status', null, '13', '0', '2018-01-23 10:55:47', '2018-06-24 17:10:12', '1'), ('14', '接口文档', null, 'http://139.224.200.249:9999/swagger-ui.html', '8', 'icon-wendangdocument72', null, '14', '0', '2018-01-23 10:56:43', '2018-06-24 17:10:12', '1'), ('15', '任务监控', null, 'http://139.224.200.249:8899', '8', 'icon-jiankong', null, '15', '0', '2018-01-23 10:55:18', '2018-06-24 17:10:12', '1'), ('22', '用户新增', 'sys_user_add', null, '2', null, null, null, '1', '2017-11-08 09:52:09', '2017-12-04 16:31:10', '0'), ('23', '用户修改', 'sys_user_edit', null, '2', null, null, null, '1', '2017-11-08 09:52:48', '2018-06-26 21:16:57', '0'), ('24', '用户删除', 'sys_user_del', null, '2', null, null, null, '1', '2017-11-08 09:54:01', '2017-12-04 16:31:18', '0'), ('32', '菜单新增', 'sys_menu_add', null, '3', null, null, null, '1', '2017-11-08 10:15:53', '2018-01-20 14:37:50', '0'), ('33', '菜单修改', 'sys_menu_edit', null, '3', null, null, null, '1', '2017-11-08 10:16:23', '2018-01-20 14:37:56', '0'), ('34', '菜单删除', 'sys_menu_del', null, '3', null, null, null, '1', '2017-11-08 10:16:43', '2018-01-20 14:38:03', '0'), ('42', '角色新增', 'sys_role_add', null, '4', null, null, null, '1', '2017-11-08 10:14:18', '2018-04-20 07:21:38', '0'), ('43', '角色修改', 'sys_role_edit', null, '4', null, null, null, '1', '2017-11-08 10:14:41', '2018-04-20 07:21:50', '0'), ('44', '角色删除', 'sys_role_del', null, '4', null, null, null, '1', '2017-11-08 10:14:59', '2018-04-20 07:22:00', '0'), ('45', '分配权限', 'sys_role_perm', null, '4', null, null, null, '1', '2018-04-20 07:22:55', '2018-04-20 07:24:40', '0'), ('52', '日志删除', 'sys_log_del', null, '5', null, null, null, '1', '2017-11-20 20:37:37', '2017-11-28 17:36:52', '0'), ('62', '字典删除', 'sys_dict_del', null, '6', null, null, null, '1', '2017-11-29 11:30:11', '2018-01-07 15:40:51', '0'), ('63', '字典新增', 'sys_dict_add', null, '6', null, null, null, '1', '2018-05-11 22:34:55', null, '0'), ('64', '字典修改', 'sys_dict_edit', null, '6', null, null, null, '1', '2018-05-11 22:36:03', '2018-06-26 21:17:36', '0'), ('72', '部门新增', 'sys_dept_add', null, '7', null, null, null, '1', '2018-01-20 14:56:16', '2018-01-20 21:17:57', '0'), ('73', '部门修改', 'sys_dept_edit', null, '7', null, null, null, '1', '2018-01-20 14:56:59', '2018-01-20 21:17:59', '0'), ('74', '部门删除', 'sys_dept_del', null, '7', null, null, null, '1', '2018-01-20 14:57:28', '2018-01-20 21:18:05', '0'), ('100', '客户端管理', '', 'client', '1', 'icon-bangzhushouji', 'views/admin/client/index', '10', '0', '2018-01-20 13:17:19', '2018-05-15 21:28:10', '0'), ('101', '客户端新增', 'sys_client_add', null, '100', '1', null, null, '1', '2018-05-15 21:35:18', '2018-05-16 10:35:26', '0'), ('102', '客户端修改', 'sys_client_edit', null, '100', null, null, null, '1', '2018-05-15 21:37:06', '2018-06-26 21:17:17', '0'), ('103', '客户端删除', 'sys_client_del', null, '100', null, null, null, '1', '2018-05-15 21:39:16', '2018-05-15 21:52:34', '0'), ('200', '服务监控', null, 'http://127.0.0.1:5001', '1', 'iLine truncated
INSERT INTO `sys_menu` VALUES ('1', '系统管理', null, '/admin', '-1', 'icon-xitongguanli', 'Layout', '1', '0', '2017-11-07 20:56:00', '2018-05-14 21:53:22', '0'), ('2', '用户管理', null, 'user', '1', 'icon-yonghuguanli', 'views/admin/user/index', '2', '0', '2017-11-02 22:24:37', '2018-05-14 22:11:35', '0'), ('3', '菜单管理', null, 'menu', '1', 'icon-caidanguanli', 'views/admin/menu/index', '3', '0', '2017-11-08 09:57:27', '2018-05-14 22:11:21', '0'), ('4', '角色管理', null, 'role', '1', 'icon-jiaoseguanli', 'views/admin/role/index', '4', '0', '2017-11-08 10:13:37', '2018-05-14 22:11:19', '0'), ('5', '日志管理', null, 'log', '1', 'icon-rizhiguanli', 'views/admin/log/index', '5', '0', '2017-11-20 14:06:22', '2018-05-14 22:11:18', '0'), ('6', '字典管理', null, 'dict', '1', 'icon-zygl', 'views/admin/dict/index', '6', '0', '2017-11-29 11:30:52', '2018-05-14 22:12:48', '0'), ('7', '部门管理', null, 'dept', '1', 'icon-iconbmgl', 'views/admin/dept/index', '7', '0', '2018-01-20 13:17:19', '2018-05-14 22:11:16', '0'), ('8', '客户端管理', '', 'client', '1', 'icon-bangzhushouji', 'views/admin/client/index', '8', '0', '2018-01-20 13:17:19', '2018-07-29 13:38:19', '0'), ('9', '代码生成', '', 'gen', '1', 'icon-weibiaoti46', 'views/admin/gen/index', '9', '0', '2018-01-20 13:17:19', '2018-08-02 08:19:59', '0'), ('22', '用户新增', 'sys_user_add', null, '2', null, null, null, '1', '2017-11-08 09:52:09', '2017-12-04 16:31:10', '0'), ('23', '用户修改', 'sys_user_edit', null, '2', null, null, null, '1', '2017-11-08 09:52:48', '2018-06-26 21:16:57', '0'), ('24', '用户删除', 'sys_user_del', null, '2', null, null, null, '1', '2017-11-08 09:54:01', '2017-12-04 16:31:18', '0'), ('32', '菜单新增', 'sys_menu_add', null, '3', null, null, null, '1', '2017-11-08 10:15:53', '2018-01-20 14:37:50', '0'), ('33', '菜单修改', 'sys_menu_edit', null, '3', null, null, null, '1', '2017-11-08 10:16:23', '2018-01-20 14:37:56', '0'), ('34', '菜单删除', 'sys_menu_del', null, '3', null, null, null, '1', '2017-11-08 10:16:43', '2018-01-20 14:38:03', '0'), ('42', '角色新增', 'sys_role_add', null, '4', null, null, null, '1', '2017-11-08 10:14:18', '2018-04-20 07:21:38', '0'), ('43', '角色修改', 'sys_role_edit', null, '4', null, null, null, '1', '2017-11-08 10:14:41', '2018-04-20 07:21:50', '0'), ('44', '角色删除', 'sys_role_del', null, '4', null, null, null, '1', '2017-11-08 10:14:59', '2018-04-20 07:22:00', '0'), ('45', '分配权限', 'sys_role_perm', null, '4', null, null, null, '1', '2018-04-20 07:22:55', '2018-04-20 07:24:40', '0'), ('52', '日志删除', 'sys_log_del', null, '5', null, null, null, '1', '2017-11-20 20:37:37', '2017-11-28 17:36:52', '0'), ('62', '字典删除', 'sys_dict_del', null, '6', null, null, null, '1', '2017-11-29 11:30:11', '2018-01-07 15:40:51', '0'), ('63', '字典新增', 'sys_dict_add', null, '6', null, null, null, '1', '2018-05-11 22:34:55', null, '0'), ('64', '字典修改', 'sys_dict_edit', null, '6', null, null, null, '1', '2018-05-11 22:36:03', '2018-06-26 21:17:36', '0'), ('72', '部门新增', 'sys_dept_add', null, '7', null, null, null, '1', '2018-01-20 14:56:16', '2018-01-20 21:17:57', '0'), ('73', '部门修改', 'sys_dept_edit', null, '7', null, null, null, '1', '2018-01-20 14:56:59', '2018-01-20 21:17:59', '0'), ('74', '部门删除', 'sys_dept_del', null, '7', null, null, null, '1', '2018-01-20 14:57:28', '2018-01-20 21:18:05', '0'), ('81', '客户端新增', 'sys_client_add', null, '8', '1', null, null, '1', '2018-05-15 21:35:18', '2018-07-29 13:38:59', '0'), ('82', '客户端修改', 'sys_client_edit', null, '8', null, null, null, '1', '2018-05-15 21:37:06', '2018-07-29 13:39:01', '0'), ('83', '客户端删除', 'sys_client_del', null, '8', null, null, null, '1', '2018-05-15 21:39:16', '2018-07-29 13:39:06', '0'), ('100', '系统监控', null, '', '-1', 'icon-iconbmgl', null, '2', '0', '2018-07-27 01:13:21', '2018-07-29 13:39:31', '0'), ('101', '服务监控', null, 'http://127.0.0.1:5001', '100', 'icon-jiankong', null, '0', '0', '2018-06-26 10:50:32', '2018-07-29 13:39:48', '0'), ('102', '接口文档', null, 'http://127.0.0.1:9999/swagger-ui.html', '100', 'icon-wendangdocument72', null, '1', '0', '2018-06-26 10:50:32', '2018-07-29 13:39:51', '0'), ('103', '任务监控', null, 'http://localhost:9999/swagger-ui.html', '100', 'icon-msnui-supervise', null, '2', '0', '2018-06-26 10:50:32', '2018-07-29 13:40:00', '0');
COMMIT;
-- ----------------------------
@@ -163,7 +163,7 @@ CREATE TABLE `sys_oauth_client_details` (
-- Records of `sys_oauth_client_details`
-- ----------------------------
BEGIN;
INSERT INTO `sys_oauth_client_details` VALUES ('app', null, 'app', 'server', 'password,refresh_token', null, null, null, null, null, 'true'), ('pig', null, 'pig', 'server', 'password,refresh_token', null, null, null, null, null, 'false');
INSERT INTO `sys_oauth_client_details` VALUES ('app', null, 'app', 'server', 'password,refresh_token', null, null, null, null, null, 'true'), ('pig', null, 'pig', 'server', 'password,refresh_token', null, null, null, null, null, 'true'), ('test', null, 'test', 'server', 'password,refresh_token', null, null, null, null, null, 'true');
COMMIT;
-- ----------------------------
@@ -186,7 +186,7 @@ CREATE TABLE `sys_role` (
-- Records of `sys_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES ('1', 'admin', 'ROLE_ADMIN', '超级管理员', '2017-10-29 15:45:51', '2018-04-22 11:40:29', '0'), ('14', 'demo', 'demo', 'demo用户', '2018-04-20 07:14:32', '2018-06-12 18:43:22', '0'), ('15', 'demo2', 'demo2', 'demo2', '2018-06-12 18:59:38', null, '0'), ('16', 'demo3', 'demo3', 'demo', '2018-06-13 07:07:25', '2018-06-24 17:16:47', '1');
INSERT INTO `sys_role` VALUES ('1', 'admin', 'ROLE_ADMIN', '超级管理员', '2017-10-29 15:45:51', '2018-04-22 11:40:29', '0'), ('2', 'demo', 'demo', 'demo用户', '2018-04-20 07:14:32', '2018-07-27 01:22:07', '0');
COMMIT;
-- ----------------------------
@@ -204,7 +204,7 @@ CREATE TABLE `sys_role_dept` (
-- Records of `sys_role_dept`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_dept` VALUES ('11', '1', '1'), ('16', '14', '6'), ('17', '15', '5'), ('18', '16', '8');
INSERT INTO `sys_role_dept` VALUES ('11', '1', '1'), ('16', '2', '6');
COMMIT;
-- ----------------------------
@@ -221,7 +221,7 @@ CREATE TABLE `sys_role_menu` (
-- Records of `sys_role_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES ('1', '1'), ('1', '2'), ('1', '3'), ('1', '4'), ('1', '5'), ('1', '6'), ('1', '7'), ('1', '22'), ('1', '23'), ('1', '24'), ('1', '32'), ('1', '33'), ('1', '34'), ('1', '42'), ('1', '43'), ('1', '44'), ('1', '45'), ('1', '52'), ('1', '62'), ('1', '63'), ('1', '64'), ('1', '72'), ('1', '73'), ('1', '74'), ('1', '100'), ('1', '101'), ('1', '102'), ('1', '103'), ('1', '200'), ('14', '1'), ('14', '2'), ('14', '3'), ('14', '4'), ('14', '5'), ('14', '6'), ('14', '7'), ('14', '21'), ('14', '22'), ('14', '23'), ('14', '24'), ('14', '31'), ('14', '32'), ('14', '33'), ('14', '34'), ('14', '41'), ('14', '42'), ('14', '43'), ('14', '44'), ('14', '45'), ('14', '51'), ('14', '52'), ('14', '61'), ('14', '62'), ('14', '63'), ('14', '64'), ('14', '71'), ('14', '72'), ('14', '73'), ('14', '74'), ('14', '100'), ('14', '101'), ('14', '102'), ('14', '103'), ('14', '104'), ('14', '110'), ('14', '111'), ('14', '112'), ('14', '113'), ('15', '1'), ('15', '2'), ('15', '3'), ('15', '5'), ('15', '21'), ('15', '22'), ('15', '23'), ('15', '24'), ('15', '31'), ('15', '32'), ('15', '33'), ('15', '34'), ('15', '51'), ('15', '52'), ('16', '1'), ('16', '2'), ('16', '21'), ('16', '22'), ('16', '23'), ('16', '24');
INSERT INTO `sys_role_menu` VALUES ('1', '1'), ('1', '2'), ('1', '3'), ('1', '4'), ('1', '5'), ('1', '6'), ('1', '7'), ('1', '8'), ('1', '9'), ('1', '22'), ('1', '23'), ('1', '24'), ('1', '32'), ('1', '33'), ('1', '34'), ('1', '42'), ('1', '43'), ('1', '44'), ('1', '45'), ('1', '52'), ('1', '62'), ('1', '63'), ('1', '64'), ('1', '72'), ('1', '73'), ('1', '74'), ('1', '81'), ('1', '82'), ('1', '83'), ('1', '100'), ('1', '101'), ('1', '102'), ('1', '103'), ('2', '200'), ('2', '201'), ('2', '202'), ('2', '203');
COMMIT;
-- ----------------------------
@@ -247,7 +247,7 @@ CREATE TABLE `sys_user` (
-- Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('1', 'admin', '$2a$10$vg5QNHhCknAqevx9vM2s5esllJEzF/pa8VZXtFYHhhOhUcCw/GWyS', null, '17034642888', null, '1', '2018-04-20 07:15:18', '2018-06-26 11:43:22', '0'), ('4', 'pig', '$2a$10$vg5QNHhCknAqevx9vM2s5esllJEzF/pa8VZXtFYHhhOhUcCw/GWyS', null, '17034642118', null, '1', '2018-04-22 11:39:07', '2018-05-10 18:01:11', '0'), ('5', '0098', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642117', null, '1', '2018-05-29 21:35:03', null, '0'), ('7', '0097', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642001', null, '1', '2018-05-29 21:35:03', null, '0'), ('8', '17034642002', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642002', null, '1', '2018-05-29 21:35:03', null, '0'), ('9', '17034642003', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642003', null, '1', '2018-05-29 21:35:03', null, '0'), ('10', '17034642004', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642004', null, '1', '2018-05-29 21:35:03', null, '0'), ('11', '17034642005', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642005', null, '1', '2018-05-29 21:35:03', null, '0'), ('14', '17034642006', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642006', null, '1', '2018-05-29 21:35:03', null, '0'), ('15', '17034642007', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642007', null, '1', '2018-05-29 21:35:03', null, '0'), ('16', '17034642008', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642008', null, '1', '2018-05-29 21:35:03', null, '0'), ('17', '17034642009', '$2a$10$Rm.6OnUqDoiPGMd60/JzlOPErBeHJzOs39uUanCR.RP7u3uW6s5Mq', null, '17034642009', null, '1', '2018-05-29 21:35:03', null, '0'), ('18', '123456', '$2a$10$P1cRSPAJqfPpKPmQIo/GiuSfrdvRnU0nNWBywqK/lBkrL/K1TOXy6', null, '17034642115', null, '6', '2018-06-12 18:28:42', null, '0'), ('19', 'demo2', '$2a$10$qaNZ/KVvq65.wRo20dDuYOR1Qocuvnj3h9CtrXTimFI3.d1PHJMhi', null, '12345678902', null, '5', '2018-06-12 19:00:02', '2018-06-26 21:36:45', '0'), ('20', 'demo3', '$2a$10$vg5QNHhCknAqevx9vM2s5esllJEzF/pa8VZXtFYHhhOhUcCw/GWyS', null, '11122233344', null, '8', '2018-06-13 07:07:56', '2018-06-13 07:09:00', '0');
INSERT INTO `sys_user` VALUES ('1', 'admin', '$2a$10$SJiz7YONcq5ATINeF3s/aOB9O3jKFXVfblHCerRntXAArPp4rKtvu', null, '17034642888', null, '1', '2018-04-20 07:15:18', '2018-07-16 02:36:47', '0'), ('2', 'demo', '$2a$10$SJiz7YONcq5ATINeF3s/aOB9O3jKFXVfblHCerRntXAArPp4rKtvu', null, '17034642118', null, '1', '2018-04-22 11:39:07', '2018-07-29 10:36:38', '0');
COMMIT;
-- ----------------------------
@@ -264,7 +264,7 @@ CREATE TABLE `sys_user_role` (
-- Records of `sys_user_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES ('1', '1'), ('4', '14'), ('5', '1'), ('7', '1'), ('8', '1'), ('9', '1'), ('10', '1'), ('11', '1'), ('12', '1'), ('13', '1'), ('14', '1'), ('15', '1'), ('16', '1'), ('17', '1'), ('18', '14'), ('19', '15');
INSERT INTO `sys_user_role` VALUES ('1', '1'), ('2', '2');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
@@ -5,4 +5,4 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
url: jdbc:mysql://114.116.45.246:13306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
@@ -5,7 +5,7 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
url: jdbc:mysql://114.116.45.246:13306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
@@ -5,11 +5,11 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
url: jdbc:mysql://114.116.45.246:13306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
elasticjob:
# 分布式任务协调依赖zookeeper
zookeeper:
server-lists: 114.116.45.246:13181
server-lists: 127.0.0.1:2181
namespace: pigx-daemon
# 普通任务
simples:
@@ -21,6 +21,14 @@ spring:
eventTraceRdbDataSource: 'dataSource'
listener:
listener-class: com.pig4cloud.pigx.daemon.listener.PigxElasticJobListener
spring-simple-job2:
job-class: com.pig4cloud.pigx.daemon.job.PigxSimpleJob2
cron: 0/2 * * * * ?
sharding-total-count: 3
sharding-item-parameters: 0=service1,1=service2,2=service3
eventTraceRdbDataSource: 'dataSource'
listener:
listener-class: com.pig4cloud.pigx.daemon.listener.PigxElasticJobListener
# 简单任务
dataflows:
spring-dataflow-job:
@@ -15,7 +15,7 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
url: jdbc:mysql://114.116.45.246:13306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
# mybaits 模块配置
mybatis-plus:
@@ -19,6 +19,7 @@ package com.pig4cloud.pigx.codegen.controller;
import cn.hutool.core.io.IoUtil;
import com.baomidou.mybatisplus.plugins.Page;
import com.pig4cloud.pigx.codegen.entity.GenConfig;
import com.pig4cloud.pigx.codegen.service.SysGeneratorService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
@@ -35,7 +36,7 @@ import java.util.Map;
*/
@RestController
@AllArgsConstructor
@RequestMapping("/generator" )
@RequestMapping("/generator")
public class SysGeneratorController {
private final SysGeneratorService sysGeneratorService;
@@ -45,7 +46,7 @@ public class SysGeneratorController {
* @param params 参数集
* @return 数据库表
*/
@GetMapping("/page" )
@GetMapping("/page")
public Page list(@RequestParam Map<String, Object> params) {
return sysGeneratorService.queryPage(params);
}
@@ -53,14 +54,14 @@ public class SysGeneratorController {
/**
* 生成代码
*/
@GetMapping("/code/{tableName}" )
public void code(@PathVariable String tableName, HttpServletResponse response) throws IOException {
byte[] data = sysGeneratorService.generatorCode(new String[]{tableName});
@PostMapping("/code")
public void code(@RequestBody GenConfig genConfig, HttpServletResponse response) throws IOException {
byte[] data = sysGeneratorService.generatorCode(genConfig);
response.reset();
response.setHeader("Content-Disposition", String.format("attachment; filename=%s.zip", tableName));
response.setHeader("Content-Disposition", String.format("attachment; filename=%s.zip", genConfig.getTableName()));
response.addHeader("Content-Length", "" + data.length);
response.setContentType("application/octet-stream; charset=UTF-8" );
response.setContentType("application/octet-stream; charset=UTF-8");
IoUtil.write(response.getOutputStream(), Boolean.TRUE, data);
}
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.codegen.entity;
import lombok.Data;
/**
* @author lengleng
* @date 2018/8/2
* 生成配置
*/
@Data
public class GenConfig {
/**
* 包名
*/
private String packageName;
/**
* 作者
*/
private String author;
/**
* 模块名称
*/
private String moduleName;
/**
* 表前缀
*/
private String tablePrefix;
/**
* 表名称
*/
private String tableName;
/**
* 表备注
*/
private String comments;
}
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.codegen.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.pig4cloud.pigx.common.core.util.Query;
import com.pig4cloud.pigx.codegen.entity.GenConfig;
import java.util.Map;
@@ -33,7 +33,7 @@ public interface SysGeneratorService {
* @param tableNames 表名称
* @return
*/
byte[] generatorCode(String[] tableNames);
byte[] generatorCode(GenConfig tableNames);
/**
* 分页查询表
@@ -20,6 +20,7 @@ package com.pig4cloud.pigx.codegen.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.IoUtil;
import com.baomidou.mybatisplus.plugins.Page;
import com.pig4cloud.pigx.codegen.entity.GenConfig;
import com.pig4cloud.pigx.codegen.mapper.SysGeneratorMapper;
import com.pig4cloud.pigx.codegen.service.SysGeneratorService;
import com.pig4cloud.pigx.codegen.util.GenUtils;
@@ -69,22 +70,20 @@ public class SysGeneratorServiceImpl implements SysGeneratorService {
/**
* 生成代码
*
* @param tableNames 表名称
* @param genConfig 生成配置
* @return
*/
@Override
public byte[] generatorCode(String[] tableNames) {
public byte[] generatorCode(GenConfig genConfig) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ZipOutputStream zip = new ZipOutputStream(outputStream);
for (String tableName : tableNames) {
//查询表信息
Map<String, String> table = queryTable(tableName);
//查询列信息
List<Map<String, String>> columns = queryColumns(tableName);
//生成代码
GenUtils.generatorCode(table, columns, zip);
}
//查询表信息
Map<String, String> table = queryTable(genConfig.getTableName());
//查询列信息
List<Map<String, String>> columns = queryColumns(genConfig.getTableName());
//生成代码
GenUtils.generatorCode(genConfig, table, columns, zip);
IoUtil.close(zip);
return outputStream.toByteArray();
}
@@ -20,7 +20,9 @@ package com.pig4cloud.pigx.codegen.util;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import com.pig4cloud.pigx.codegen.entity.ColumnEntity;
import com.pig4cloud.pigx.codegen.entity.GenConfig;
import com.pig4cloud.pigx.codegen.entity.TableEntity;
import com.pig4cloud.pigx.common.core.exception.CheckedException;
import lombok.extern.slf4j.Slf4j;
@@ -49,47 +51,60 @@ import java.util.zip.ZipOutputStream;
@Slf4j
public class GenUtils {
public static final String ENTITY_JAVA_VM = "Entity.java.vm";
public static final String MAPPER_JAVA_VM = "Mapper.java.vm";
public static final String SERVICE_JAVA_VM = "Service.java.vm";
public static final String SERVICE_IMPL_JAVA_VM = "ServiceImpl.java.vm";
public static final String CONTROLLER_JAVA_VM = "Controller.java.vm";
public static final String MAPPER_XML_VM = "Mapper.xml.vm";
public static final String MENU_SQL_VM = "menu.sql.vm";
public static final String INDEX_VUE_VM = "index.vue.vm";
public static final String API_JS_VM = "api.js.vm";
public static final String CRUD_JS_VM = "crud.js.vm";
private static final String ENTITY_JAVA_VM = "Entity.java.vm";
private static final String MAPPER_JAVA_VM = "Mapper.java.vm";
private static final String SERVICE_JAVA_VM = "Service.java.vm";
private static final String SERVICE_IMPL_JAVA_VM = "ServiceImpl.java.vm";
private static final String CONTROLLER_JAVA_VM = "Controller.java.vm";
private static final String MAPPER_XML_VM = "Mapper.xml.vm";
private static final String MENU_SQL_VM = "menu.sql.vm";
private static final String INDEX_VUE_VM = "index.vue.vm";
private static final String API_JS_VM = "api.js.vm";
private static final String CRUD_JS_VM = "crud.js.vm";
public static List<String> getTemplates() {
private static List<String> getTemplates() {
List<String> templates = new ArrayList<>();
templates.add("template/Entity.java.vm" );
templates.add("template/Mapper.java.vm" );
templates.add("template/Mapper.xml.vm" );
templates.add("template/Service.java.vm" );
templates.add("template/ServiceImpl.java.vm" );
templates.add("template/Controller.java.vm" );
templates.add("template/menu.sql.vm" );
templates.add("template/Entity.java.vm");
templates.add("template/Mapper.java.vm");
templates.add("template/Mapper.xml.vm");
templates.add("template/Service.java.vm");
templates.add("template/ServiceImpl.java.vm");
templates.add("template/Controller.java.vm");
templates.add("template/menu.sql.vm");
templates.add("template/index.vue.vm" );
templates.add("template/api.js.vm" );
templates.add("template/crud.js.vm" );
templates.add("template/index.vue.vm");
templates.add("template/api.js.vm");
templates.add("template/crud.js.vm");
return templates;
}
/**
* 生成代码
*/
public static void generatorCode(Map<String, String> table,
public static void generatorCode(GenConfig genConfig, Map<String, String> table,
List<Map<String, String>> columns, ZipOutputStream zip) {
//配置信息
Configuration config = getConfig();
boolean hasBigDecimal = false;
//表信息
TableEntity tableEntity = new TableEntity();
tableEntity.setTableName(table.get("tableName" ));
tableEntity.setComments(table.get("tableComment" ));
tableEntity.setTableName(table.get("tableName"));
if (StrUtil.isNotBlank(genConfig.getComments())) {
tableEntity.setComments(genConfig.getComments());
} else {
tableEntity.setComments(table.get("tableComment"));
}
String tablePrefix;
if (StrUtil.isNotBlank(genConfig.getTablePrefix())) {
tablePrefix = genConfig.getTablePrefix();
} else {
tablePrefix = config.getString("tablePrefix");
}
//表名转换成Java类名
String className = tableToJava(tableEntity.getTableName(), config.getString("tablePrefix" ));
String className = tableToJava(tableEntity.getTableName(), tablePrefix);
tableEntity.setCaseClassName(className);
tableEntity.setLowerClassName(StringUtils.uncapitalize(className));
@@ -97,10 +112,10 @@ public class GenUtils {
List<ColumnEntity> columnList = new ArrayList<>();
for (Map<String, String> column : columns) {
ColumnEntity columnEntity = new ColumnEntity();
columnEntity.setColumnName(column.get("columnName" ));
columnEntity.setDataType(column.get("dataType" ));
columnEntity.setComments(column.get("columnComment" ));
columnEntity.setExtra(column.get("extra" ));
columnEntity.setColumnName(column.get("columnName"));
columnEntity.setDataType(column.get("dataType"));
columnEntity.setComments(column.get("columnComment"));
columnEntity.setExtra(column.get("extra"));
//列名转换成Java属性名
String attrName = columnToJava(columnEntity.getColumnName());
@@ -108,13 +123,13 @@ public class GenUtils {
columnEntity.setLowerAttrName(StringUtils.uncapitalize(attrName));
//列的数据类型,转换成Java类型
String attrType = config.getString(columnEntity.getDataType(), "unknowType" );
String attrType = config.getString(columnEntity.getDataType(), "unknowType");
columnEntity.setAttrType(attrType);
if (!hasBigDecimal && attrType.equals("BigDecimal" )) {
if (!hasBigDecimal && "BigDecimal".equals(attrType)) {
hasBigDecimal = true;
}
//是否主键
if ("PRI".equalsIgnoreCase(column.get("columnKey" )) && tableEntity.getPk() == null) {
if ("PRI".equalsIgnoreCase(column.get("columnKey")) && tableEntity.getPk() == null) {
tableEntity.setPk(columnEntity);
}
@@ -129,25 +144,44 @@ public class GenUtils {
//设置velocity资源加载器
Properties prop = new Properties();
prop.put("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader" );
prop.put("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
Velocity.init(prop);
String mainPath = config.getString("mainPath" );
mainPath = StringUtils.isBlank(mainPath) ? "com.pig4cloud.pigx" : mainPath;
//封装模板数据
Map<String, Object> map = new HashMap<>(16);
map.put("tableName", tableEntity.getTableName());
map.put("comments", tableEntity.getComments());
map.put("pk", tableEntity.getPk());
map.put("className", tableEntity.getCaseClassName());
map.put("classname", tableEntity.getLowerClassName());
map.put("pathName", tableEntity.getLowerClassName().toLowerCase());
map.put("columns", tableEntity.getColumns());
map.put("hasBigDecimal", hasBigDecimal);
map.put("mainPath", mainPath);
map.put("package", config.getString("package" ));
map.put("moduleName", config.getString("moduleName" ));
map.put("author", config.getString("author" ));
map.put("datetime", DateUtil.now());
if (StrUtil.isNotBlank(genConfig.getComments())) {
map.put("comments", genConfig.getComments());
} else {
map.put("comments", tableEntity.getComments());
}
if (StrUtil.isNotBlank(genConfig.getAuthor())) {
map.put("author", genConfig.getAuthor());
} else {
map.put("author", config.getString("author"));
}
if (StrUtil.isNotBlank(genConfig.getModuleName())) {
map.put("moduleName", genConfig.getModuleName());
} else {
map.put("moduleName", config.getString("moduleName"));
}
if (StrUtil.isNotBlank(genConfig.getPackageName())) {
map.put("package", genConfig.getPackageName());
map.put("mainPath", genConfig.getPackageName());
} else {
map.put("package", config.getString("package"));
map.put("mainPath", config.getString("mainPath"));
}
VelocityContext context = new VelocityContext(map);
//获取模板列表
@@ -162,7 +196,7 @@ public class GenUtils {
//添加到zip
zip.putNextEntry(new ZipEntry(Objects
.requireNonNull(getFileName(template, tableEntity.getCaseClassName()
, config.getString("package" ), config.getString("moduleName" )))));
, map.get("package").toString(), map.get("moduleName").toString()))));
IoUtil.write(zip, CharsetUtil.UTF_8, false, sw.toString());
IoUtil.close(sw);
zip.closeEntry();
@@ -177,7 +211,7 @@ public class GenUtils {
* 列名转换成Java属性名
*/
private static String columnToJava(String columnName) {
return WordUtils.capitalizeFully(columnName, new char[]{'_'}).replace("_", "" );
return WordUtils.capitalizeFully(columnName, new char[]{'_'}).replace("_", "");
}
/**
@@ -185,7 +219,7 @@ public class GenUtils {
*/
private static String tableToJava(String tableName, String tablePrefix) {
if (StringUtils.isNotBlank(tablePrefix)) {
tableName = tableName.replace(tablePrefix, "" );
tableName = tableName.replace(tablePrefix, "");
}
return columnToJava(tableName);
}
@@ -193,9 +227,9 @@ public class GenUtils {
/**
* 获取配置信息
*/
public static Configuration getConfig() {
private static Configuration getConfig() {
try {
return new PropertiesConfiguration("generator.properties" );
return new PropertiesConfiguration("generator.properties");
} catch (ConfigurationException e) {
throw new CheckedException("获取配置文件失败,", e);
}
@@ -204,8 +238,8 @@ public class GenUtils {
/**
* 获取文件名
*/
public static String getFileName(String template, String className, String packageName, String moduleName) {
String packagePath = "pigx" + File.separator + "main" + File.separator + "java" + File.separator;
private static String getFileName(String template, String className, String packageName, String moduleName) {
String packagePath = "pigx" + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator;
if (StringUtils.isNotBlank(packageName)) {
packagePath += packageName.replace(".", File.separator) + File.separator + moduleName + File.separator;
}
@@ -231,7 +265,7 @@ public class GenUtils {
}
if (template.contains(MAPPER_XML_VM)) {
return "pigx" + File.separator + "main" + File.separator + "resources" + File.separator + "mapper" + File.separator + moduleName + File.separator + className + "Mapper.xml";
return "pigx" + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator + "mapper" + File.separator + moduleName + File.separator + className + "Mapper.xml";
}
if (template.contains(MENU_SQL_VM)) {
@@ -249,7 +283,7 @@ public class GenUtils {
if (template.contains(CRUD_JS_VM)) {
return "pigx-ui" + File.separator + "src" + File.separator + "const" +
File.separator + "curd" + File.separator + className.toLowerCase() + ".js";
File.separator + "crud" + File.separator + className.toLowerCase() + ".js";
}
return null;
@@ -14,7 +14,7 @@ tablePrefix=tb_
tinyint=Integer
smallint=Integer
mediumint=Integer
int=Integer
int=Integer
integer=Integer
bigint=Long
float=Float
@@ -5,7 +5,7 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.pig4cloud.pigx.common.core.constant.CommonConstant;
import com.baomidou.mybatisplus.plugins.Page;
import com.pig4cloud.pigx.common.core.util.Query;
import ${package}.${moduleName}.entity.${className};
@@ -21,7 +21,7 @@ import java.util.Map;
* @date ${datetime}
*/
@RestController
@RequestMapping("${moduleName}/${pathName}")
@RequestMapping("/${pathName}")
public class ${className}Controller {
@Autowired
private ${className}Service ${classname}Service;
@@ -34,7 +34,6 @@ public class ${className}Controller {
*/
@GetMapping("/page")
public Page page(@RequestParam Map<String, Object> params) {
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
return ${classname}Service.selectPage(new Query<>(params), new EntityWrapper<>());
}
@@ -1,5 +1,6 @@
package ${package}.${moduleName}.entity;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
@@ -19,7 +20,7 @@ import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("${tableName}")
public class ${className} implements Serializable {
public class ${className} extends Model<${className}> {
private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
@@ -31,4 +32,12 @@ public class ${className} implements Serializable {
#end
private $column.attrType $column.lowerAttrName;
#end
/**
* 主键值
*/
@Override
protected Serializable pkVal() {
return this.$pk.columnName;
}
}
@@ -6,7 +6,7 @@
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="${package}.${moduleName}.entity.${className}" id="${classname}Map">
#foreach($column in $columns)
<result property="${column.attrname}" column="${column.columnName}"/>
<result property="${column.lowerAttrName}" column="${column.columnName}"/>
#end
</resultMap>
@@ -1,11 +1,13 @@
-- 该脚本不要执行,请完善 ID 对应关系,注意层级关系 !!!!
-- 菜单SQL
insert into `pigx`.`sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
values ( '1', 'views/${moduleName}/${pathName}/index', '', '0', 'client', 'icon-bangzhushouji', '8', '0', '2018-01-20 13:17:19', '8', '2018-07-29 13:38:19', '${comments}管理');
values ( '1', 'views/${moduleName}/${pathName}/index', '菜单ID', '0', '${pathName}', 'icon-bangzhushouji', '8', '0', '2018-01-20 13:17:19', '8', '2018-07-29 13:38:19', '${comments}管理');
-- 菜单对应按钮SQL
insert into `pigx`.`sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
values ( '8', null, '${moduleName}_${pathName}_add', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '${comments}新增');
values ( '子按钮ID1', null, '${moduleName}_${pathName}_add', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '${comments}新增');
insert into `pigx`.`sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
values ( '8', null, '${moduleName}_${pathName}_edit', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}修改');
values ( '子按钮ID2', null, '${moduleName}_${pathName}_edit', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}修改');
insert into `pigx`.`sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
values ( '8', null, '${moduleName}_${pathName}_del', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除');
values ( '子按钮ID3', null, '${moduleName}_${pathName}_del', '1', null, '1', '81', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除');
@@ -35,6 +35,6 @@ public class PigxSimpleJob implements SimpleJob {
*/
@Override
public void execute(ShardingContext shardingContext) {
log.info("shardingContext:{}", shardingContext);
log.info("第一个任务执行啦:{}", shardingContext);
}
}
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.daemon.job;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
/**
* @author lengleng
* @date 2018/2/7
* 测试Job
*/
@Slf4j
public class PigxSimpleJob2 implements SimpleJob {
/**
* 业务执行逻辑
*
* @param shardingContext 分片信息
*/
@Override
public void execute(ShardingContext shardingContext) {
log.info("第二个执行了:{}", shardingContext);
}
}
+1 -1
View File
@@ -37,7 +37,7 @@
</parent>
<properties>
<pigx.version>1.3.1</pigx.version>
<pigx.version>1.4.0</pigx.version>
<spring-boot.version>2.0.3.RELEASE</spring-boot.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>