mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 12:39:05 +08:00
✨ 添加新特性。工作流模块
This commit is contained in:
1 parent
436ae2b7ed
commit
b76e1c3e3f
35 files changed
+1385
-523
No files matched your search
-282
@@ -1,282 +0,0 @@
|
||||
SET NAMES utf8;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dept`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dept`;
|
||||
CREATE TABLE `sys_dept` (
|
||||
`dept_id` int(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL COMMENT '部门名称',
|
||||
`order_num` int(11) DEFAULT NULL COMMENT '排序',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '是否删除 -1:已删除 0:正常',
|
||||
`parent_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`dept_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门管理';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dept`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dept` VALUES ('1', '山东农信', null, '2018-01-22 19:00:23', '2018-01-23 12:40:46', '0', '0'), ('2', '沙县国际', null, '2018-01-22 19:00:38', '2018-01-23 12:42:04', '0', '0'), ('3', '潍坊农信', null, '2018-01-22 19:00:44', '2018-01-23 12:40:56', '0', '1'), ('4', '高新农信', null, '2018-01-22 19:00:52', '2018-01-23 12:41:11', '0', '3'), ('5', '院校农信', null, '2018-01-22 19:00:57', '2018-01-23 12:41:22', '0', '4'), ('6', '潍坊学院农信', '1234657', '2018-01-22 19:01:06', '2018-09-09 07:47:20', '1', '5'), ('7', '山东沙县', null, '2018-01-22 19:01:57', '2018-01-23 12:42:15', '0', '2'), ('8', '潍坊沙县', null, '2018-01-22 19:02:03', '2018-01-23 12:42:23', '0', '7'), ('9', '高新沙县', null, '2018-01-22 19:02:14', '2018-08-03 04:33:16', '1', '8');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dept_relation`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dept_relation`;
|
||||
CREATE TABLE `sys_dept_relation` (
|
||||
`ancestor` int(11) NOT NULL COMMENT '祖先节点',
|
||||
`descendant` int(11) NOT NULL COMMENT '后代节点',
|
||||
PRIMARY KEY (`ancestor`,`descendant`),
|
||||
KEY `idx1` (`ancestor`),
|
||||
KEY `idx2` (`descendant`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dept_relation`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dept_relation` VALUES ('1', '1'), ('1', '3'), ('1', '4'), ('1', '5'), ('2', '2'), ('2', '7'), ('2', '8'), ('3', '3'), ('3', '4'), ('3', '5'), ('4', '4'), ('4', '5'), ('5', '5'), ('7', '7'), ('7', '8'), ('8', '8');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dict`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`value` varchar(100) NOT NULL COMMENT '数据值',
|
||||
`label` varchar(100) NOT NULL COMMENT '标签名',
|
||||
`type` varchar(100) NOT NULL COMMENT '类型',
|
||||
`description` varchar(100) NOT NULL COMMENT '描述',
|
||||
`sort` decimal(10,0) NOT NULL COMMENT '排序(升序)',
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记',
|
||||
PRIMARY KEY (`id`),
|
||||
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='字典表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dict`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dict` VALUES ('2', '9', '异常', 'log_type', '日志异常', '1', '2018-07-09 06:16:14', '2018-07-09 06:16:14', '日志异常', '0'), ('3', '0', '正常', 'log_type', '正常', '0', '2018-07-09 06:15:40', '2018-07-09 06:15:40', '正常', '0'), ('5', 'WX', '微信', 'social_type', '微信登录', '0', '2018-08-16 14:01:45', '2018-08-16 14:01:45', '微信登录', '0'), ('6', 'QQ', 'QQ', 'social_type', 'QQ登录', '1', '2018-07-09 06:15:40', '2018-07-09 06:15:40', 'QQ登录', '0');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_log`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`type` char(1) DEFAULT '1' COMMENT '日志类型',
|
||||
`title` varchar(255) DEFAULT '' COMMENT '日志标题',
|
||||
`service_id` varchar(32) DEFAULT NULL COMMENT '服务ID',
|
||||
`create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remote_addr` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
|
||||
`user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
|
||||
`request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
|
||||
`method` varchar(10) DEFAULT NULL COMMENT '操作方式',
|
||||
`params` text COMMENT '操作提交的数据',
|
||||
`time` mediumtext COMMENT '执行时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '删除标记',
|
||||
`exception` text COMMENT '异常信息',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sys_log_create_by` (`create_by`),
|
||||
KEY `sys_log_request_uri` (`request_uri`),
|
||||
KEY `sys_log_type` (`type`),
|
||||
KEY `sys_log_create_date` (`create_time`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_menu`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`menu_id` int(11) NOT NULL COMMENT '菜单ID',
|
||||
`name` varchar(32) NOT NULL COMMENT '菜单名称',
|
||||
`permission` varchar(32) DEFAULT NULL COMMENT '菜单权限标识',
|
||||
`path` varchar(128) DEFAULT NULL COMMENT '前端URL',
|
||||
`parent_id` int(11) DEFAULT NULL COMMENT '父菜单ID',
|
||||
`icon` varchar(32) DEFAULT NULL COMMENT '图标',
|
||||
`component` varchar(64) DEFAULT NULL COMMENT 'VUE页面',
|
||||
`sort` int(11) DEFAULT '1' COMMENT '排序值',
|
||||
`type` char(1) DEFAULT NULL COMMENT '菜单类型 (0菜单 1按钮)',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '0--正常 1--删除',
|
||||
PRIMARY KEY (`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单权限表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 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', '终端管理', '', 'client', '1', 'icon-bangzhushouji', 'views/admin/client/index', '9', '0', '2018-01-20 13:17:19', '2018-07-29 13:38:19', '0'), ('9', '代码生成', '', 'gen', '1', 'icon-weibiaoti46', 'views/admin/gen/index', '8', '0', '2018-01-20 13:17:19', '2018-08-02 08:19:59', '0'), ('10', '密钥管理', '', 'social', '1', 'icon-miyue', 'views/admin/social/index', '10', '0', '2018-01-20 13:17:19', '2018-09-04 05:51:38', '0'), ('11', '密钥新增', 'generator_syssocialdetails_add', null, '10', '1', null, '0', '1', '2018-05-15 21:35:18', '2018-08-19 07:52:17', '0'), ('12', '密钥修改', 'generator_syssocialdetails_edit', null, '10', '1', null, '1', '1', '2018-05-15 21:35:18', '2018-08-19 07:52:11', '0'), ('13', '密钥删除', 'generator_syssocialdetails_del', null, '10', '1', null, '2', '1', '2018-05-15 21:35:18', '2018-08-19 07:52:06', '0'), ('14', '令牌管理', null, 'token', '1', 'icon-denglvlingpai', 'views/admin/token/index', '11', '0', '2018-09-04 05:58:41', '2018-09-04 05:59:58', '0'), ('15', '令牌删除', 'sys_token_del', null, '14', null, null, '1', '1', '2018-09-04 05:59:50', null, '0'), ('20', '多级菜单', null, '/crud', '-1', 'icon-caidanguanli', 'Layout', '3', '0', '2018-08-28 01:50:22', '2018-08-28 01:52:43', '0'), ('21', '一级菜单', null, 'index', '20', 'icon-caidanguanli', 'Layout', '1', '0', '2018-08-28 01:50:48', '2018-08-28 01:53:07', '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'), ('40', '二级菜单', null, 'index', '21', 'icon-caidanguanli', 'views/crud/index', '1', '0', '2018-08-28 01:51:23', '2018-08-28 01:52:37', '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', '客户端Line truncated
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_oauth_client_details`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_oauth_client_details`;
|
||||
CREATE TABLE `sys_oauth_client_details` (
|
||||
`client_id` varchar(32) NOT NULL,
|
||||
`resource_ids` varchar(256) DEFAULT NULL,
|
||||
`client_secret` varchar(256) DEFAULT NULL,
|
||||
`scope` varchar(256) DEFAULT NULL,
|
||||
`authorized_grant_types` varchar(256) DEFAULT NULL,
|
||||
`web_server_redirect_uri` varchar(256) DEFAULT NULL,
|
||||
`authorities` varchar(256) DEFAULT NULL,
|
||||
`access_token_validity` int(11) DEFAULT NULL,
|
||||
`refresh_token_validity` int(11) DEFAULT NULL,
|
||||
`additional_information` varchar(4096) DEFAULT NULL,
|
||||
`autoapprove` varchar(256) DEFAULT NULL,
|
||||
PRIMARY KEY (`client_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- 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'), ('daemon', null, 'daemon', 'server', 'password,refresh_token', null, null, null, null, null, 'true'), ('gen', null, 'gen', '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;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`role_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`role_name` varchar(64) COLLATE utf8mb4_bin NOT NULL,
|
||||
`role_code` varchar(64) COLLATE utf8mb4_bin NOT NULL,
|
||||
`role_desc` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`del_flag` char(1) COLLATE utf8mb4_bin DEFAULT '0' COMMENT '删除标识(0-正常,1-删除)',
|
||||
PRIMARY KEY (`role_id`),
|
||||
UNIQUE KEY `role_idx1_role_code` (`role_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- 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');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role_dept`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_dept`;
|
||||
CREATE TABLE `sys_role_dept` (
|
||||
`id` int(20) NOT NULL AUTO_INCREMENT,
|
||||
`role_id` int(20) DEFAULT NULL COMMENT '角色ID',
|
||||
`dept_id` int(20) DEFAULT NULL COMMENT '部门ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色与部门对应关系';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_role_dept`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role_dept` VALUES ('1', '1', '8');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role_menu`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_menu`;
|
||||
CREATE TABLE `sys_role_menu` (
|
||||
`role_id` int(11) NOT NULL COMMENT '角色ID',
|
||||
`menu_id` int(11) NOT NULL COMMENT '菜单ID',
|
||||
PRIMARY KEY (`role_id`,`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色菜单表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 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', '8'), ('1', '9'), ('1', '10'), ('1', '11'), ('1', '12'), ('1', '13'), ('1', '14'), ('1', '15'), ('1', '20'), ('1', '21'), ('1', '22'), ('1', '23'), ('1', '24'), ('1', '32'), ('1', '33'), ('1', '34'), ('1', '40'), ('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'), ('1', '105'), ('1', '106'), ('1', '110'), ('1', '111'), ('1', '112'), ('1', '113');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_social_details`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_social_details`;
|
||||
CREATE TABLE `sys_social_details` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
|
||||
`type` varchar(16) NOT NULL COMMENT '类型',
|
||||
`remark` varchar(64) DEFAULT NULL COMMENT '描述',
|
||||
`app_id` varchar(64) NOT NULL COMMENT 'appid',
|
||||
`app_secret` varchar(64) NOT NULL COMMENT 'app_secret',
|
||||
`redirect_url` varchar(128) DEFAULT NULL COMMENT '回调地址',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`del_flag` char(50) NOT NULL DEFAULT '0' COMMENT '删除标记',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='系统社交登录账号表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_social_details`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_social_details` VALUES ('1', 'WX', '微信互联参数', 'wxd1678d3f83b1d83a', '6ddb043f94da5d2172926abe8533504f', 'daoweicloud.com', '2018-08-16 14:24:25', '2018-08-16 14:24:25', '0');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_user`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`username` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '用户名',
|
||||
`password` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`salt` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '随机盐',
|
||||
`phone` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '简介',
|
||||
`avatar` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像',
|
||||
`dept_id` int(11) DEFAULT NULL COMMENT '部门ID',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` char(1) COLLATE utf8mb4_bin DEFAULT '0' COMMENT '0-正常,1-删除',
|
||||
`wx_openid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微信openid',
|
||||
`qq_openid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'QQ openid',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `user_idx1_username` (`username`),
|
||||
KEY `user_wx_openid` (`wx_openid`),
|
||||
KEY `user_qq_openid` (`qq_openid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_user`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user` VALUES ('1', 'admin', '$2a$10$RpFJjxYiXdEsAGnWp/8fsOetMuOON96Ntk/Ym2M/RKRyU0GZseaDC', null, '17034642888', null, '1', '2018-04-20 07:15:18', '2018-09-01 15:57:21', '0', 'o_0FT0uyg_H1vVy2H0JpSwlVGhWQ', null);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_user_role`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user_role`;
|
||||
CREATE TABLE `sys_user_role` (
|
||||
`user_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`role_id` int(11) NOT NULL COMMENT '角色ID',
|
||||
PRIMARY KEY (`user_id`,`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户角色表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_user_role`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user_role` VALUES ('1', '1');
|
||||
COMMIT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
+322
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : RDS本地使用
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50721
|
||||
Source Host : 114.116.21.191
|
||||
Source Database : pigxx
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50721
|
||||
File Encoding : utf-8
|
||||
|
||||
Date: 09/28/2018 17:23:44 PM
|
||||
*/
|
||||
|
||||
SET NAMES utf8;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `oa_leave_bill`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `oa_leave_bill`;
|
||||
CREATE TABLE `oa_leave_bill` (
|
||||
`leave_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`username` varchar(255) NOT NULL COMMENT '申请人',
|
||||
`days` int(4) NOT NULL COMMENT '天数',
|
||||
`content` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||
`state` char(1) NOT NULL DEFAULT '0' COMMENT '0-未提交,1-未审核,2-批准,9-驳回 ',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '请假时间',
|
||||
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '删除标志',
|
||||
PRIMARY KEY (`leave_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='请假记录表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dept`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dept`;
|
||||
CREATE TABLE `sys_dept` (
|
||||
`dept_id` int(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL COMMENT '部门名称',
|
||||
`order_num` int(11) DEFAULT NULL COMMENT '排序',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '是否删除 -1:已删除 0:正常',
|
||||
`parent_id` int(11) DEFAULT NULL,
|
||||
`tenant_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`dept_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门管理';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dept`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dept` VALUES ('1', '山东农信', null, '2018-01-22 19:00:23', '2018-09-13 01:46:29', '0', '0', '1'), ('2', '沙县国际', null, '2018-01-22 19:00:38', '2018-09-13 01:46:30', '0', '0', '1'), ('3', '潍坊农信', null, '2018-01-22 19:00:44', '2018-09-13 01:46:31', '0', '1', '1'), ('4', '高新农信', null, '2018-01-22 19:00:52', '2018-09-13 01:46:40', '0', '3', '1'), ('5', '院校农信', null, '2018-01-22 19:00:57', '2018-09-13 01:46:36', '0', '4', '1'), ('6', '潍坊学院农信', null, '2018-01-22 19:01:06', '2018-09-13 03:29:10', '1', '5', '1'), ('7', '山东沙县', null, '2018-01-22 19:01:57', '2018-09-13 01:46:42', '0', '2', '1'), ('8', '潍坊沙县', null, '2018-01-22 19:02:03', '2018-09-13 01:46:43', '0', '7', '1'), ('9', '高新沙县', null, '2018-01-22 19:02:14', '2018-09-13 01:46:44', '1', '8', '1');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dept_relation`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dept_relation`;
|
||||
CREATE TABLE `sys_dept_relation` (
|
||||
`ancestor` int(11) NOT NULL COMMENT '祖先节点',
|
||||
`descendant` int(11) NOT NULL COMMENT '后代节点',
|
||||
PRIMARY KEY (`ancestor`,`descendant`),
|
||||
KEY `idx1` (`ancestor`),
|
||||
KEY `idx2` (`descendant`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dept_relation`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dept_relation` VALUES ('1', '1'), ('1', '3'), ('1', '4'), ('1', '5'), ('2', '2'), ('2', '7'), ('2', '8'), ('3', '3'), ('3', '4'), ('3', '5'), ('4', '4'), ('4', '5'), ('5', '5'), ('7', '7'), ('7', '8'), ('8', '8');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_dict`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`value` varchar(100) NOT NULL COMMENT '数据值',
|
||||
`label` varchar(100) NOT NULL COMMENT '标签名',
|
||||
`type` varchar(100) NOT NULL COMMENT '类型',
|
||||
`description` varchar(100) NOT NULL COMMENT '描述',
|
||||
`sort` decimal(10,0) NOT NULL COMMENT '排序(升序)',
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`del_flag` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记',
|
||||
`tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
|
||||
PRIMARY KEY (`id`),
|
||||
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='字典表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_dict`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_dict` VALUES ('2', '9', '异常', 'log_type', '日志异常', '1', '2018-07-09 06:16:14', '2018-09-13 08:10:58', '日志异常', '0', '1'), ('3', '0', '正常', 'log_type', '正常', '0', '2018-07-09 06:15:40', '2018-07-09 06:15:40', '正常', '0', '0'), ('4', '123', '123', '1234', '123', '123', '2018-08-09 07:16:47', '2018-08-16 14:01:03', '123', '1', '0'), ('5', 'WX', '微信', 'social_type', '微信登录', '0', '2018-08-16 14:01:45', '2018-08-16 14:01:45', '微信登录', '0', '0'), ('6', 'QQ', 'QQ', 'social_type', 'QQ登录', '1', '2018-07-09 06:15:40', '2018-07-09 06:15:40', 'QQ登录', '0', '0');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_log`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`type` char(1) DEFAULT '1' COMMENT '日志类型',
|
||||
`title` varchar(255) DEFAULT '' COMMENT '日志标题',
|
||||
`service_id` varchar(32) DEFAULT NULL COMMENT '服务ID',
|
||||
`create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remote_addr` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
|
||||
`user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
|
||||
`request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
|
||||
`method` varchar(10) DEFAULT NULL COMMENT '操作方式',
|
||||
`params` text COMMENT '操作提交的数据',
|
||||
`time` mediumtext COMMENT '执行时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '删除标记',
|
||||
`exception` text COMMENT '异常信息',
|
||||
`tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sys_log_create_by` (`create_by`),
|
||||
KEY `sys_log_request_uri` (`request_uri`),
|
||||
KEY `sys_log_type` (`type`),
|
||||
KEY `sys_log_create_date` (`create_time`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_menu`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`menu_id` int(11) NOT NULL COMMENT '菜单ID',
|
||||
`name` varchar(32) NOT NULL COMMENT '菜单名称',
|
||||
`permission` varchar(32) DEFAULT NULL COMMENT '菜单权限标识',
|
||||
`path` varchar(128) DEFAULT NULL COMMENT '前端URL',
|
||||
`parent_id` int(11) DEFAULT NULL COMMENT '父菜单ID',
|
||||
`icon` varchar(32) DEFAULT NULL COMMENT '图标',
|
||||
`component` varchar(64) DEFAULT NULL COMMENT 'VUE页面',
|
||||
`sort` int(11) DEFAULT '1' COMMENT '排序值',
|
||||
`type` char(1) DEFAULT NULL COMMENT '菜单类型 (0菜单 1按钮)',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`del_flag` char(1) DEFAULT '0' COMMENT '0--正常 1--删除',
|
||||
`tenant_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单权限表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_menu`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_menu` VALUES ('1000', '权限管理', null, '/upms', '-1', 'icon-quanxianguanli', 'Layout', '0', '0', '2018-09-28 08:29:53', '2018-09-28 08:53:01', '0', '1'), ('1100', '用户管理', null, 'user', '1000', 'icon-yonghuguanli', 'views/admin/user/index', '1', '0', '2017-11-02 22:24:37', '2018-09-28 09:00:41', '0', '1'), ('1101', '用户新增', 'sys_user_add', null, '1100', null, null, null, '1', '2017-11-08 09:52:09', '2018-09-28 09:06:34', '0', '1'), ('1102', '用户修改', 'sys_user_edit', null, '1100', null, null, null, '1', '2017-11-08 09:52:48', '2018-09-28 09:06:37', '0', '1'), ('1103', '用户删除', 'sys_user_del', null, '1100', null, null, null, '1', '2017-11-08 09:54:01', '2018-09-28 09:06:42', '0', '1'), ('1200', '菜单管理', null, 'menu', '1000', 'icon-caidanguanli', 'views/admin/menu/index', '2', '0', '2017-11-08 09:57:27', '2018-09-28 09:00:45', '0', '1'), ('1201', '菜单新增', 'sys_menu_add', null, '1200', null, null, null, '1', '2017-11-08 10:15:53', '2018-09-28 09:07:16', '0', '1'), ('1202', '菜单修改', 'sys_menu_edit', null, '1200', null, null, null, '1', '2017-11-08 10:16:23', '2018-09-28 09:07:18', '0', '1'), ('1203', '菜单删除', 'sys_menu_del', null, '1200', null, null, null, '1', '2017-11-08 10:16:43', '2018-09-28 09:07:22', '0', '1'), ('1300', '角色管理', null, 'role', '1000', 'icon-jiaoseguanli', 'views/admin/role/index', '3', '0', '2017-11-08 10:13:37', '2018-09-28 09:00:48', '0', '1'), ('1301', '角色新增', 'sys_role_add', null, '1300', null, null, null, '1', '2017-11-08 10:14:18', '2018-09-28 09:07:46', '0', '1'), ('1302', '角色修改', 'sys_role_edit', null, '1300', null, null, null, '1', '2017-11-08 10:14:41', '2018-09-28 09:07:49', '0', '1'), ('1303', '角色删除', 'sys_role_del', null, '1300', null, null, null, '1', '2017-11-08 10:14:59', '2018-09-28 09:07:53', '0', '1'), ('1304', '分配权限', 'sys_role_perm', null, '1300', null, null, null, '1', '2018-04-20 07:22:55', '2018-09-28 09:13:23', '0', '1'), ('1400', '部门管理', null, 'dept', '1000', 'icon-web-icon-', 'views/admin/dept/index', '4', '0', '2018-01-20 13:17:19', '2018-09-28 09:00:52', '0', '1'), ('1401', '部门新增', 'sys_dept_add', null, '1400', null, null, null, '1', '2018-01-20 14:56:16', '2018-09-28 09:08:13', '0', '1'), ('1402', '部门修改', 'sys_dept_edit', null, '1400', null, null, null, '1', '2018-01-20 14:56:59', '2018-09-28 09:08:16', '0', '1'), ('1403', '部门删除', 'sys_dept_del', null, '1400', null, null, null, '1', '2018-01-20 14:57:28', '2018-09-28 09:08:18', '0', '1'), ('2000', '系统管理', null, '/admin', '-1', 'icon-xitongguanli', 'Layout', '1', '0', '2017-11-07 20:56:00', '2018-09-28 08:53:18', '0', '1'), ('2100', '日志管理', null, 'log', '2000', 'icon-rizhiguanli', 'views/admin/log/index', '5', '0', '2017-11-20 14:06:22', '2018-09-28 09:01:52', '0', '1'), ('2101', '日志删除', 'sys_log_del', null, '2100', null, null, null, '1', '2017-11-20 20:37:37', '2018-09-28 09:08:44', '0', '1'), ('2200', '字典管理', null, 'dict', '2000', 'icon-navicon-zdgl', 'views/admin/dict/index', '6', '0', '2017-11-29 11:30:52', '2018-09-28 09:01:47', '0', '1'), ('2201', '字典删除', 'sys_dict_del', null, '2200', null, null, null, '1', '2017-11-29 11:30:11', '2018-09-28 09:09:10', '0', '1'), ('2202', '字典新增', 'sys_dict_add', null, '2200', null, null, null, '1', '2018-05-11 22:34:55', '2018-09-28 09:09:12', '0', '1'), ('2203', '字典修改', 'sys_dict_edit', null, '2200', null, null, null, '1', '2018-05-11 22:36:03', '2018-09-28 09:09:16', '0', '1'), ('2300', '代码生成', '', 'gen', '2000', 'icon-weibiaoti46', 'views/admin/gen/index', '8', '0', '2018-01-20 13:17:19', '2018-09-28 09:02:54', '0', '1'), ('2400', '终端管理', '', 'client', '2000', 'icon-shouji', 'views/admin/client/index', '9', '0', '2018-01-20 13:17:19', '2018-09-28 09:01:43', '0', '1'), ('2401', '客户端新增', 'sys_client_add', null, '2400', '1', null, null, '1', '2018-05-15 21:35:18', '2018-09-28 09:10:25', '0', '1'), ('2402', '客户端修改', 'sys_client_edit', null, '2400', null, null, null, '1', '2018-05-15 21:37:06', '2018-09-28 09:10:27', '0', '1'), ('2403', '客户端删除', 'sys_client_del', null, '2400', null, null, null, '1', '2018-05-15 21:39:16', '2018-09-28 09:10:30', '0', '1'), ('2500', '密钥管理', '', 'social', '2000', 'icon-miyue', 'views/admin/social/index', '10', '0', '2018-01-20 13:17:19', '2018-09-28 09:01:41', '0', '1'), ('2501', '密钥新增', 'generator_syssocialdetails_add', null, '2500', '1', null, '0', '1', '2018-05-15 21:35:18', '2018-09-28 09:11:02', '0', '1'), ('2502', '密钥修改', 'generator_syssocialdetails_edit', null, '2500', '1', null, '1', '1', '2018-05-15 21:35:18', '2018-09-28 09:11:04', '0', '1'), ('2503', '密钥删除', 'generator_syssocialdetails_del', null, '2500', '1', null, '2', '1', '2018-05-15 21:35:18', '2018-09-28 09:11:06', '0', '1'), ('2600', '令牌管理', null, 'token', '2000', 'icon-denglvlingpai', 'vieLine truncated
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_oauth_client_details`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_oauth_client_details`;
|
||||
CREATE TABLE `sys_oauth_client_details` (
|
||||
`client_id` varchar(32) NOT NULL,
|
||||
`resource_ids` varchar(256) DEFAULT NULL,
|
||||
`client_secret` varchar(256) DEFAULT NULL,
|
||||
`scope` varchar(256) DEFAULT NULL,
|
||||
`authorized_grant_types` varchar(256) DEFAULT NULL,
|
||||
`web_server_redirect_uri` varchar(256) DEFAULT NULL,
|
||||
`authorities` varchar(256) DEFAULT NULL,
|
||||
`access_token_validity` int(11) DEFAULT NULL,
|
||||
`refresh_token_validity` int(11) DEFAULT NULL,
|
||||
`additional_information` varchar(4096) DEFAULT NULL,
|
||||
`autoapprove` varchar(256) DEFAULT NULL,
|
||||
`tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
|
||||
PRIMARY KEY (`client_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- 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', '0'), ('daemon', null, 'daemon', 'server', 'password,refresh_token', null, null, null, null, null, 'true', '0'), ('gen', null, 'gen', 'server', 'password,refresh_token', null, null, null, null, null, 'true', '0'), ('pig', null, 'pig', 'server', 'password,refresh_token', null, null, null, null, null, 'true', '0'), ('test', null, 'test', 'server', 'password,refresh_token', null, null, null, null, null, 'true', '0');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`role_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`role_name` varchar(64) COLLATE utf8mb4_bin NOT NULL,
|
||||
`role_code` varchar(64) COLLATE utf8mb4_bin NOT NULL,
|
||||
`role_desc` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`del_flag` char(1) COLLATE utf8mb4_bin DEFAULT '0' COMMENT '删除标识(0-正常,1-删除)',
|
||||
`tenant_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`role_id`),
|
||||
UNIQUE KEY `role_idx1_role_code` (`role_code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_role`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role` VALUES ('1', 'admin', 'ROLE_ADMIN', '超级管理员', '2017-10-29 15:45:51', '2018-09-13 01:46:01', '0', '1');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role_dept`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_dept`;
|
||||
CREATE TABLE `sys_role_dept` (
|
||||
`id` int(20) NOT NULL AUTO_INCREMENT,
|
||||
`role_id` int(20) DEFAULT NULL COMMENT '角色ID',
|
||||
`dept_id` int(20) DEFAULT NULL COMMENT '部门ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色与部门对应关系';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_role_dept`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role_dept` VALUES ('1', '1', '1');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_role_menu`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_menu`;
|
||||
CREATE TABLE `sys_role_menu` (
|
||||
`role_id` int(11) NOT NULL COMMENT '角色ID',
|
||||
`menu_id` int(11) NOT NULL COMMENT '菜单ID',
|
||||
PRIMARY KEY (`role_id`,`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色菜单表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_role_menu`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '1000'), ('1', '1100'), ('1', '1101'), ('1', '1102'), ('1', '1103'), ('1', '1200'), ('1', '1201'), ('1', '1202'), ('1', '1203'), ('1', '1300'), ('1', '1301'), ('1', '1302'), ('1', '1303'), ('1', '1304'), ('1', '1400'), ('1', '1401'), ('1', '1402'), ('1', '1403'), ('1', '2000'), ('1', '2100'), ('1', '2101'), ('1', '2200'), ('1', '2201'), ('1', '2202'), ('1', '2203'), ('1', '2300'), ('1', '2400'), ('1', '2401'), ('1', '2402'), ('1', '2403'), ('1', '2500'), ('1', '2501'), ('1', '2502'), ('1', '2503'), ('1', '2600'), ('1', '2601'), ('1', '3000'), ('1', '3100'), ('1', '3200'), ('1', '3300'), ('1', '3400'), ('1', '3500'), ('1', '3600'), ('1', '3601'), ('1', '3700'), ('1', '3800'), ('1', '4000'), ('1', '4100'), ('1', '4200'), ('1', '4300'), ('1', '4301'), ('1', '4302'), ('1', '4303'), ('1', '4400'), ('1', '5000'), ('1', '5001'), ('1', '5002'), ('1', '6000');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_social_details`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_social_details`;
|
||||
CREATE TABLE `sys_social_details` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
|
||||
`type` varchar(16) NOT NULL COMMENT '类型',
|
||||
`remark` varchar(64) DEFAULT NULL COMMENT '描述',
|
||||
`app_id` varchar(64) NOT NULL COMMENT 'appid',
|
||||
`app_secret` varchar(64) NOT NULL COMMENT 'app_secret',
|
||||
`redirect_url` varchar(128) DEFAULT NULL COMMENT '回调地址',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`del_flag` char(50) NOT NULL DEFAULT '0' COMMENT '删除标记',
|
||||
`tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='系统社交登录账号表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_social_details`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_social_details` VALUES ('1', 'WX', '微信互联参数', 'wxd1678d3f83b1d83a', '6ddb043f94da5d2172926abe8533504f', 'daoweicloud.com', '2018-08-16 14:24:25', '2018-08-16 14:24:25', '0', '0');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_user`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`username` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '用户名',
|
||||
`password` varchar(255) COLLATE utf8mb4_bin NOT NULL,
|
||||
`salt` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '随机盐',
|
||||
`phone` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '简介',
|
||||
`avatar` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像',
|
||||
`dept_id` int(11) DEFAULT NULL COMMENT '部门ID',
|
||||
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` char(1) COLLATE utf8mb4_bin DEFAULT '0' COMMENT '0-正常,1-删除',
|
||||
`wx_openid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '微信openid',
|
||||
`qq_openid` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'QQ openid',
|
||||
`tenant_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属租户',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `user_idx1_username` (`username`),
|
||||
KEY `user_wx_openid` (`wx_openid`),
|
||||
KEY `user_qq_openid` (`qq_openid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_user`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user` VALUES ('1', 'admin', '$2a$10$RpFJjxYiXdEsAGnWp/8fsOetMuOON96Ntk/Ym2M/RKRyU0GZseaDC', null, '17034642888', null, '1', '2018-04-20 07:15:18', '2018-09-27 14:49:41', '0', 'o_0FT0uyg_H1vVy2H0JpSwlVGhWQ', null, '1'), ('7', 'test', '$2a$10$n5eYlttzwyb/L9FX7FewdOJ.fAgFw6fPSMqflG5Qwc85X3GWNea0q', null, null, null, '1', '2018-09-13 06:20:23', '2018-09-27 16:54:52', '0', null, null, '1');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `sys_user_role`
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user_role`;
|
||||
CREATE TABLE `sys_user_role` (
|
||||
`user_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`role_id` int(11) NOT NULL COMMENT '角色ID',
|
||||
PRIMARY KEY (`user_id`,`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户角色表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of `sys_user_role`
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user_role` VALUES ('1', '1'), ('7', '1');
|
||||
COMMIT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -83,6 +83,15 @@ services:
|
||||
dockerfile: ./pigx-visual/pigx-codegen/Dockerfile
|
||||
restart: always
|
||||
|
||||
pigx-activiti:
|
||||
links:
|
||||
- pigx-eureka
|
||||
- pigx-redis
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./pigx-visual/pigx-activiti/Dockerfile
|
||||
restart: always
|
||||
|
||||
pigx-tx-manager:
|
||||
links:
|
||||
- pigx-eureka
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<logger name="com.pig4cloud.pigx.admin.mapper" level="DEBUG">
|
||||
<logger name="org.activiti.engine.impl.db" level="DEBUG">
|
||||
<appender-ref ref="debug" />
|
||||
</logger>
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ swagger:
|
||||
## spring security 配置
|
||||
security:
|
||||
auth:
|
||||
server: http://localhost:9999/auth/oauth
|
||||
server: http://192.168.0.20:9999/auth/oauth
|
||||
oauth2:
|
||||
resource:
|
||||
token-info-uri: ${security.auth.server}/check_token
|
||||
@@ -13,7 +13,7 @@ spring:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: Bjyjht2017!@#
|
||||
url: jdbc:mysql://114.116.30.176:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
url: jdbc:mysql://114.116.21.191:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
@@ -24,3 +24,23 @@ spring:
|
||||
mybatis-plus:
|
||||
typeAliasesPackage: com.pig4cloud.pigx.codegen.entity
|
||||
|
||||
#mybaits-plus配置,修改主键类型,mapper.xml、type 别名等
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
global-config:
|
||||
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
|
||||
id-type: 0
|
||||
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
|
||||
field-strategy: 1
|
||||
#驼峰下划线转换
|
||||
db-column-underline: true
|
||||
#刷新mapper 调试神器
|
||||
refresh-mapper: false
|
||||
# 逻辑删除字段
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
#自定义SQL注入器
|
||||
sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: true
|
||||
@@ -14,7 +14,7 @@ spring:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: Bjyjht2017!@#
|
||||
url: jdbc:mysql://114.116.30.176:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
url: jdbc:mysql://114.116.21.191:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
elasticjob:
|
||||
# 分布式任务协调依赖zookeeper
|
||||
zookeeper:
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
RUN mkdir -p /pigx/bin/com.pig4cloud/pigx-daemon
|
||||
|
||||
WORKDIR /pigx/bin/com.pig4cloud/pigx-activiti
|
||||
|
||||
EXPOSE 5002
|
||||
|
||||
ADD ./pigx-visual/pigx-activiti/target/pigx-activiti.jar ./
|
||||
|
||||
CMD java -Djava.security.egd=file:/dev/./urandom -jar pigx-activiti.jar
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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)
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<artifactId>pigx-visual</artifactId>
|
||||
<version>${pigx.version}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>pigx-activiti</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<description>工作流管理模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--common code -->
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<artifactId>pigx-common-core</artifactId>
|
||||
<version>${pigx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!--mybatis-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mbp.boot.version}</version>
|
||||
</dependency>
|
||||
<!-- activiti -->
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-spring-boot-starter-basic</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-modeler</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-diagram-rest</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency>
|
||||
<!--web 模块-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<!--排除tomcat依赖-->
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--undertow容器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
+40
@@ -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.act;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
||||
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
* 工作流管理模块
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableCircuitBreaker
|
||||
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class,org.activiti.spring.boot.SecurityAutoConfiguration.class})
|
||||
public class PigxActivitiApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PigxActivitiApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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.act.config;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/27
|
||||
* mybatis-plus 配置
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan("com.pig4cloud.pigx.act.mapper")
|
||||
public class MybatisPlusConfigurer {
|
||||
/**
|
||||
* 分页插件
|
||||
*
|
||||
* @return PaginationInterceptor
|
||||
*/
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
return new PaginationInterceptor();
|
||||
}
|
||||
}
|
||||
Executable
+117
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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.act.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import com.pig4cloud.pigx.act.service.ActTaskService;
|
||||
import com.pig4cloud.pigx.act.service.LeaveBillService;
|
||||
import com.pig4cloud.pigx.act.service.ProcessService;
|
||||
import com.pig4cloud.pigx.common.core.util.Query;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 请假流程
|
||||
*
|
||||
* @author 冷冷
|
||||
* @date 2018-09-27 15:20:44
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/leavebill")
|
||||
public class LeaveBillController {
|
||||
private final LeaveBillService leaveBillService;
|
||||
private final ProcessService processService;
|
||||
private final ActTaskService actTaskService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return leaveBillService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*
|
||||
* @param leaveId
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/{leaveId}")
|
||||
public R info(@PathVariable("leaveId") Integer leaveId) {
|
||||
LeaveBill leaveBill = leaveBillService.selectById(leaveId);
|
||||
return new R<>(leaveBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param leaveBill
|
||||
* @return R
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody LeaveBill leaveBill) {
|
||||
return new R<>(leaveBillService.insert(leaveBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param leaveBill
|
||||
* @return R
|
||||
*/
|
||||
@PutMapping
|
||||
public R update(@RequestBody LeaveBill leaveBill) {
|
||||
leaveBillService.updateById(leaveBill);
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param leaveId
|
||||
* @return R
|
||||
*/
|
||||
@DeleteMapping("/{leaveId}")
|
||||
public R delete(@PathVariable Integer leaveId) {
|
||||
return new R<>(leaveBillService.deleteById(leaveId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交请假流程
|
||||
*
|
||||
* @param leaveId
|
||||
* @return R
|
||||
*/
|
||||
@GetMapping("/submit/{leaveId}")
|
||||
public R submit(@PathVariable("leaveId") Integer leaveId) {
|
||||
return new R<>(processService.saveStartProcess(leaveId));
|
||||
}
|
||||
}
|
||||
+1
-8
@@ -25,7 +25,6 @@ import lombok.AllArgsConstructor;
|
||||
import org.activiti.engine.repository.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -39,12 +38,6 @@ import java.util.Map;
|
||||
public class ModelController {
|
||||
private final ModelService modelService;
|
||||
|
||||
@GetMapping
|
||||
public String list(org.springframework.ui.Model model, HttpServletRequest request) {
|
||||
model.addAttribute("url", request.getContextPath() + "/model/");
|
||||
return "model/list";
|
||||
}
|
||||
|
||||
@PostMapping(value = "/insert")
|
||||
public R<Boolean> insertForm(@RequestBody @Valid ModelForm form) {
|
||||
modelService.create(form.getName(), form.getKey(), form.getDesc(), form.getCategory());
|
||||
@@ -58,7 +51,7 @@ public class ModelController {
|
||||
return model.getId();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
@GetMapping
|
||||
public Page<Model> list(@RequestParam Map<String, Object> params) {
|
||||
return modelService.selectPage(params);
|
||||
}
|
||||
|
||||
+5
-5
@@ -62,13 +62,13 @@ public class ProcessController {
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/status")
|
||||
public R<Boolean> updateState(@RequestParam String status, @RequestParam String procDefId) {
|
||||
@PutMapping("/status/{procDefId}/{status}")
|
||||
public R<Boolean> updateState(@PathVariable String procDefId, @PathVariable String status) {
|
||||
return new R<>(processService.updateStatus(status, procDefId));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
public R<Boolean> deleteProcIns(@RequestParam String procInsId) {
|
||||
return new R<>(processService.deleteProcIns(procInsId));
|
||||
@DeleteMapping("/{deploymentId}")
|
||||
public R<Boolean> deleteProcIns(@PathVariable String deploymentId) {
|
||||
return new R<>(processService.deleteProcIns(deploymentId));
|
||||
}
|
||||
}
|
||||
+30
-25
@@ -17,43 +17,48 @@
|
||||
|
||||
package com.pig4cloud.pigx.act.controller;
|
||||
|
||||
import com.pig4cloud.pigx.act.dto.DataTable;
|
||||
import com.pig4cloud.pigx.act.dto.StartTaskForm;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.pig4cloud.pigx.act.dto.LeaveBillDto;
|
||||
import com.pig4cloud.pigx.act.service.ActTaskService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
* @date 2018/9/28
|
||||
*/
|
||||
@Controller
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/task")
|
||||
public class TaskController {
|
||||
private final ActTaskService actTaskService;
|
||||
|
||||
@Autowired
|
||||
ActTaskService taskService;
|
||||
@GetMapping("/todo")
|
||||
public Page todo(@RequestParam Map<String, Object> params) {
|
||||
return actTaskService.findTaskByName(params, "lengleng");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/todo")
|
||||
public String list(Model model, HttpServletRequest request) {
|
||||
model.addAttribute("url", request.getContextPath()+"/task/todo/");
|
||||
return "task/todoList";
|
||||
}
|
||||
@GetMapping("/{id}")
|
||||
public R task(@PathVariable String id) {
|
||||
return new R(actTaskService.findTaskByTaskId(id));
|
||||
}
|
||||
|
||||
@PostMapping("/todo/list")
|
||||
@ResponseBody
|
||||
public DataTable todoList(@RequestBody DataTable dt) {
|
||||
return taskService.getTodoTasks(dt);
|
||||
}
|
||||
@PostMapping
|
||||
public R task(@RequestBody LeaveBillDto leaveBillDto) {
|
||||
return new R(actTaskService.submitTask(leaveBillDto));
|
||||
}
|
||||
|
||||
@GetMapping("/view/{id}")
|
||||
public R viewCurrentImage(@PathVariable String id) {
|
||||
return new R(actTaskService.findProcessDefinitionByTaskId(id));
|
||||
}
|
||||
|
||||
@GetMapping("/comment/{id}")
|
||||
public R commitList(@PathVariable String id) {
|
||||
return new R(actTaskService.findCommentByTaskId(id));
|
||||
}
|
||||
|
||||
@PostMapping("/todo/start")
|
||||
public R<Boolean> start(@RequestBody StartTaskForm form, BindingResult result) {
|
||||
return new R<>(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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.act.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/28
|
||||
* 批注Dto
|
||||
*/
|
||||
@Data
|
||||
public class CommentDto {
|
||||
/**
|
||||
* unique identifier for this comment
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* reference to the user that made the comment
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* time and date when the user made the comment
|
||||
*/
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* reference to the task on which this comment was made
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* reference to the process instance on which this comment was made
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* reference to the type given to the comment
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* the full comment message the user had related to the task and/or process instance
|
||||
*/
|
||||
private String fullMessage;
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* 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.act.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
*/
|
||||
public class DataTable<T> implements Serializable {
|
||||
private static final long serialVersionUID = 2252240868205663450L;
|
||||
|
||||
|
||||
private int total;
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
private Map<String, Object> searchParams;
|
||||
|
||||
/**
|
||||
* 返回列表
|
||||
*/
|
||||
private List<T> rows = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 排序 条件
|
||||
*/
|
||||
Map<String, String> sorts;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*/
|
||||
private int pageNumber;
|
||||
|
||||
/**
|
||||
* 页码大小
|
||||
*/
|
||||
private int pageSize;
|
||||
|
||||
|
||||
public int getPageNumber() {
|
||||
return pageNumber;
|
||||
}
|
||||
|
||||
public void setPageNumber(int pageNumber) {
|
||||
this.pageNumber = pageNumber;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchParams() {
|
||||
return searchParams;
|
||||
}
|
||||
|
||||
public void setSearchParams(Map<String, Object> searchParams) {
|
||||
this.searchParams = searchParams;
|
||||
}
|
||||
|
||||
public List<T> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<T> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> getSorts() {
|
||||
return sorts;
|
||||
}
|
||||
|
||||
public void setSorts(Map<String, String> sorts) {
|
||||
this.sorts = sorts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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.act.dto;
|
||||
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/28
|
||||
* LeaveBillDto
|
||||
*/
|
||||
@Data
|
||||
public class LeaveBillDto extends LeaveBill {
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 任务提交时间
|
||||
*/
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 批准信息
|
||||
*/
|
||||
private String comment;
|
||||
}
|
||||
+41
-11
@@ -18,6 +18,8 @@
|
||||
package com.pig4cloud.pigx.act.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.activiti.engine.repository.Deployment;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
@@ -25,15 +27,43 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ProcessDefDTO {
|
||||
public String category;
|
||||
public String processonDefinitionId;
|
||||
public String key;
|
||||
public String name;
|
||||
public Integer revision;
|
||||
public Long deploymentTime;
|
||||
public String xmlName;
|
||||
public String picName;
|
||||
public String deploymentId;
|
||||
public Boolean suspend;
|
||||
public String description;
|
||||
private String category;
|
||||
private String processonDefinitionId;
|
||||
private String key;
|
||||
private String name;
|
||||
private Integer revision;
|
||||
private Long deploymentTime;
|
||||
private String xmlName;
|
||||
private String picName;
|
||||
private String deploymentId;
|
||||
private Boolean suspend;
|
||||
private String description;
|
||||
private Integer xAxis;
|
||||
private Integer yAxis;
|
||||
private Integer width;
|
||||
private Integer height;
|
||||
|
||||
|
||||
/**
|
||||
* 抽取流程定义需要返回的内容
|
||||
*
|
||||
* @param processDefinition
|
||||
* @param deployment
|
||||
* @return
|
||||
*/
|
||||
public static ProcessDefDTO toProcessDefDTO(ProcessDefinition processDefinition, Deployment deployment) {
|
||||
ProcessDefDTO dto = new ProcessDefDTO();
|
||||
dto.setCategory(processDefinition.getCategory());
|
||||
dto.setProcessonDefinitionId(processDefinition.getId());
|
||||
dto.setKey(processDefinition.getKey());
|
||||
dto.setName(deployment.getName());
|
||||
dto.setRevision(processDefinition.getVersion());
|
||||
dto.setDeploymentTime(deployment.getDeploymentTime().getTime());
|
||||
dto.setXmlName(processDefinition.getResourceName());
|
||||
dto.setPicName(processDefinition.getDiagramResourceName());
|
||||
dto.setDeploymentId(deployment.getId());
|
||||
dto.setSuspend(processDefinition.isSuspended());
|
||||
dto.setDescription(processDefinition.getDescription());
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,9 @@ package com.pig4cloud.pigx.act.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
@@ -31,7 +34,7 @@ public class TaskDTO {
|
||||
private String title;
|
||||
private String pdName;
|
||||
private String version;
|
||||
private Long time;
|
||||
private Date time;
|
||||
private String processInstanceId;
|
||||
private String status;
|
||||
private String nodeKey;
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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.act.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 请假流程
|
||||
*
|
||||
* @author 冷冷
|
||||
* @date 2018-09-27 15:20:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_leave_bill")
|
||||
public class LeaveBill extends Model<LeaveBill> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer leaveId;
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
private String username;
|
||||
/**
|
||||
* 天数
|
||||
*/
|
||||
private Integer days;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 0-未提交,1-未审核,2-批准,9-驳回
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 请假时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
/**
|
||||
* 删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 主键值
|
||||
*/
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.leaveId;
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.act.listener;
|
||||
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/27
|
||||
* 请假流程监听器对于
|
||||
*/
|
||||
public class LeaveProcessTaskListener implements TaskListener {
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
delegateTask.addCandidateUser("lengleng");
|
||||
}
|
||||
}
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
package com.pig4cloud.pigx.act.mapper;
|
||||
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 请假流程
|
||||
*
|
||||
* @author 冷冷
|
||||
* @date 2018-09-27 15:20:44
|
||||
*/
|
||||
@Mapper
|
||||
public interface LeaveBillMapper extends BaseMapper<LeaveBill> {
|
||||
|
||||
}
|
||||
+44
-4
@@ -17,7 +17,13 @@
|
||||
|
||||
package com.pig4cloud.pigx.act.service;
|
||||
|
||||
import com.pig4cloud.pigx.act.dto.DataTable;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.pig4cloud.pigx.act.dto.CommentDto;
|
||||
import com.pig4cloud.pigx.act.dto.LeaveBillDto;
|
||||
import com.pig4cloud.pigx.act.dto.ProcessDefDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
@@ -25,11 +31,45 @@ import com.pig4cloud.pigx.act.dto.DataTable;
|
||||
*/
|
||||
public interface ActTaskService {
|
||||
|
||||
|
||||
/**
|
||||
* 获取代办列表
|
||||
* 获取用户代办列表
|
||||
*
|
||||
* @param dt
|
||||
* @param params
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
DataTable getTodoTasks(DataTable dt);
|
||||
Page findTaskByName(Map<String, Object> params, String name);
|
||||
|
||||
/**
|
||||
* 通过任务ID查询任务信息关联申请单信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LeaveBillDto findTaskByTaskId(String id);
|
||||
|
||||
/**
|
||||
* 提交任务
|
||||
*
|
||||
* @param leaveBillDto
|
||||
* @return
|
||||
*/
|
||||
Boolean submitTask(LeaveBillDto leaveBillDto);
|
||||
|
||||
/**
|
||||
* 根据 taskId 查询 流程定义 (活动任务坐标)
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
ProcessDefDTO findProcessDefinitionByTaskId(String taskId);
|
||||
|
||||
/**
|
||||
* 通过任务ID 查询批注信息
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
* @return
|
||||
*/
|
||||
List<CommentDto> findCommentByTaskId(String taskId);
|
||||
}
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
package com.pig4cloud.pigx.act.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
|
||||
/**
|
||||
* 请假流程
|
||||
*
|
||||
* @author 冷冷
|
||||
* @date 2018-09-27 15:20:44
|
||||
*/
|
||||
public interface LeaveBillService extends IService<LeaveBill> {
|
||||
}
|
||||
|
||||
+10
-2
@@ -59,8 +59,16 @@ public interface ProcessService {
|
||||
/**
|
||||
* 删除流程实例
|
||||
*
|
||||
* @param procInsId
|
||||
* @param deploymentId
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteProcIns(String procInsId);
|
||||
Boolean deleteProcIns(String deploymentId);
|
||||
|
||||
/**
|
||||
* 启动流程、更新请假单状态
|
||||
*
|
||||
* @param leaveId
|
||||
* @return
|
||||
*/
|
||||
Boolean saveStartProcess(Integer leaveId);
|
||||
}
|
||||
+192
-39
@@ -17,81 +17,234 @@
|
||||
|
||||
package com.pig4cloud.pigx.act.service.impl;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pig4cloud.pigx.act.dto.DataTable;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.pig4cloud.pigx.act.dto.CommentDto;
|
||||
import com.pig4cloud.pigx.act.dto.LeaveBillDto;
|
||||
import com.pig4cloud.pigx.act.dto.ProcessDefDTO;
|
||||
import com.pig4cloud.pigx.act.dto.TaskDTO;
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import com.pig4cloud.pigx.act.mapper.LeaveBillMapper;
|
||||
import com.pig4cloud.pigx.act.service.ActTaskService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.RepositoryService;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
import org.activiti.engine.TaskService;
|
||||
import org.activiti.engine.impl.identity.Authentication;
|
||||
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
|
||||
import org.activiti.engine.impl.pvm.process.ActivityImpl;
|
||||
import org.activiti.engine.repository.Deployment;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.task.TaskInfo;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.engine.task.Comment;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.activiti.engine.task.TaskQuery;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ActTaskServiceImpl implements ActTaskService {
|
||||
private final TaskService actTaskService;
|
||||
private final LeaveBillMapper leaveBillMapper;
|
||||
private final TaskService taskService;
|
||||
private final RuntimeService runtimeService;
|
||||
private final RepositoryService repositoryService;
|
||||
|
||||
@Override
|
||||
public Page findTaskByName(Map<String, Object> params, String name) {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.taskCandidateOrAssigned(name)
|
||||
.orderByTaskCreateTime().asc();
|
||||
|
||||
int page = MapUtil.getInt(params, "page");
|
||||
int limit = MapUtil.getInt(params, "limit");
|
||||
|
||||
Page result = new Page(page, limit);
|
||||
result.setTotal(taskQuery.count());
|
||||
List<TaskDTO> taskDTOList = new ArrayList<>();
|
||||
taskQuery.list().forEach(task -> {
|
||||
TaskDTO dto = new TaskDTO();
|
||||
dto.setTaskId(task.getId());
|
||||
dto.setTaskName(task.getName());
|
||||
dto.setProcessInstanceId(task.getProcessInstanceId());
|
||||
dto.setNodeKey(task.getTaskDefinitionKey());
|
||||
dto.setCategory(task.getCategory());
|
||||
dto.setTime(task.getCreateTime());
|
||||
taskDTOList.add(dto);
|
||||
});
|
||||
result.setRecords(taskDTOList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代办列表
|
||||
* 通过任务ID查询任务信息关联申请单信息
|
||||
*
|
||||
* @param dt
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public DataTable getTodoTasks(DataTable dt) {
|
||||
String TASK_STATUS_TODO = "todo";
|
||||
String TASK_STATUS_CLAIM = "claim";
|
||||
public LeaveBillDto findTaskByTaskId(String taskId) {
|
||||
//1:使用任务ID,查询任务对象Task
|
||||
Task task = taskService.createTaskQuery()
|
||||
.taskId(taskId)
|
||||
.singleResult();
|
||||
//2:使用任务对象Task获取流程实例ID
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
//3:使用流程实例ID,查询正在执行的执行对象表,返回流程实例对象
|
||||
ProcessInstance pi = runtimeService.createProcessInstanceQuery()
|
||||
.processInstanceId(processInstanceId)
|
||||
.singleResult();
|
||||
//4:使用流程实例对象获取BUSINESS_KEY
|
||||
String buniness_key = pi.getBusinessKey();
|
||||
//5:获取BUSINESS_KEY对应的主键ID,使用主键ID,查询请假单对象(LeaveBill.1)
|
||||
String id = "";
|
||||
if (StrUtil.isNotBlank(buniness_key)) {
|
||||
//截取字符串,取buniness_key小数点的第2个值
|
||||
id = buniness_key.split("\\.")[1];
|
||||
}
|
||||
//查询请假单对象
|
||||
LeaveBill leaveBill = leaveBillMapper.selectById(id);
|
||||
|
||||
String userId = "lengleng" + "";
|
||||
TaskQuery taskQuery = actTaskService.createTaskQuery().taskCandidateOrAssigned(userId)
|
||||
.active().includeProcessVariables().orderByTaskCreateTime().desc();
|
||||
String category = (String) dt.getSearchParams().get("category");
|
||||
if (StrUtil.isNotBlank(category)) {
|
||||
taskQuery.taskCategory(category);
|
||||
}
|
||||
String title = (String) dt.getSearchParams().get("title");
|
||||
if (StrUtil.isNotBlank(title)) {
|
||||
taskQuery.processVariableValueLikeIgnoreCase("title", "%" + title + "%");
|
||||
}
|
||||
Map<String, List<TaskDTO>> collect = taskQuery.listPage((dt.getPageNumber() - 1) * dt.getPageSize(), dt.getPageSize())
|
||||
.stream()
|
||||
.map(task -> {
|
||||
TaskDTO dto = getTaskDTO(task, task.getAssignee() == null ?
|
||||
TASK_STATUS_CLAIM : TASK_STATUS_TODO);
|
||||
dto.setTime(task.getCreateTime().getTime());
|
||||
return dto;
|
||||
}).collect(Collectors.groupingBy(TaskDTO::getCategory));
|
||||
dt.setRows(Collections.singletonList(collect));
|
||||
return dt;
|
||||
LeaveBillDto leaveBillDto = new LeaveBillDto();
|
||||
BeanUtils.copyProperties(leaveBill, leaveBillDto);
|
||||
leaveBillDto.setTaskId(taskId);
|
||||
leaveBillDto.setTime(task.getCreateTime());
|
||||
return leaveBillDto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交任务
|
||||
*
|
||||
* @param leaveBillDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean submitTask(LeaveBillDto leaveBillDto) {
|
||||
//获取任务ID
|
||||
String taskId = leaveBillDto.getTaskId();
|
||||
//批注信息
|
||||
String message = leaveBillDto.getComment();
|
||||
//获取请假单ID
|
||||
Integer id = leaveBillDto.getLeaveId();
|
||||
//1:在完成之前,添加一个批注信息,向act_hi_comment表中添加数据,用于记录对当前申请人的一些审核信息
|
||||
Task task = taskService.createTaskQuery()
|
||||
.taskId(taskId)
|
||||
.singleResult();
|
||||
//获取流程实例ID
|
||||
String processInstanceId = task.getProcessInstanceId();
|
||||
|
||||
private TaskDTO getTaskDTO(TaskInfo task, String status) {
|
||||
ProcessDefinition processDefinition = getProcessDefinition(task.getProcessDefinitionId());
|
||||
String deploymentId = processDefinition.getDeploymentId();
|
||||
Deployment deployment = getDeployment(deploymentId);
|
||||
// 设置批注用户
|
||||
Authentication.setAuthenticatedUserId("lengleng");
|
||||
taskService.addComment(taskId, processInstanceId, message);
|
||||
/**
|
||||
* 2:如果连线的名称是“默认提交”,那么就不需要设置,如果不是,就需要设置流程变量
|
||||
* 在完成任务之前,设置流程变量,按照连线的名称,去完成任务
|
||||
流程变量的名称:outcome
|
||||
流程变量的值:连线的名称
|
||||
*/
|
||||
Map<String, Object> variables = new HashMap<String, Object>();
|
||||
String outcome = "";
|
||||
if (outcome != null && !outcome.equals("默认提交")) {
|
||||
variables.put("outcome", outcome);
|
||||
}
|
||||
|
||||
//3:使用任务ID,完成当前人的个人任务,同时流程变量
|
||||
taskService.complete(taskId, variables);
|
||||
//4:当任务完成之后,需要指定下一个任务的办理人(使用类)-----已经开发完成
|
||||
|
||||
/**
|
||||
* 5:在完成任务之后,判断流程是否结束
|
||||
如果流程结束了,更新请假单表的状态从1变成2(审核中-->审核完成)
|
||||
*/
|
||||
ProcessInstance pi = runtimeService.createProcessInstanceQuery()
|
||||
.processInstanceId(processInstanceId)
|
||||
.singleResult();
|
||||
//流程结束了
|
||||
if (pi == null) {
|
||||
LeaveBill bill = new LeaveBill();
|
||||
bill.setLeaveId(id);
|
||||
bill.setState("2");
|
||||
leaveBillMapper.updateById(bill);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ProcessDefinition getProcessDefinition(String processDefinitionId) {
|
||||
return repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).singleResult();
|
||||
/**
|
||||
* 根据 taskId 查询 流程定义 (活动任务坐标)
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProcessDefDTO findProcessDefinitionByTaskId(String taskId) {
|
||||
//使用任务ID,查询任务对象
|
||||
Task task = taskService.createTaskQuery()
|
||||
.taskId(taskId)
|
||||
.singleResult();
|
||||
//获取流程定义ID
|
||||
String processDefinitionId = task.getProcessDefinitionId();
|
||||
//查询流程定义的对象act_re_procdef
|
||||
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(processDefinitionId)
|
||||
.singleResult();
|
||||
|
||||
//获取流程定义的实体对象(对应.bpmn文件中的数据)
|
||||
ProcessDefinitionEntity processDefinitionEntity =
|
||||
(ProcessDefinitionEntity) repositoryService.getProcessDefinition(processDefinitionId);
|
||||
|
||||
//使用流程实例ID,查询正在执行的执行对象表,获取当前活动对应的流程实例对象
|
||||
ProcessInstance pi = runtimeService.createProcessInstanceQuery()
|
||||
.processInstanceId(task.getProcessInstanceId())
|
||||
.singleResult();
|
||||
|
||||
//获取当前活动对象
|
||||
ActivityImpl activityImpl = processDefinitionEntity.findActivity(pi.getActivityId());
|
||||
|
||||
Deployment deployment = repositoryService.createDeploymentQuery()
|
||||
.deploymentId(processDefinition.getDeploymentId()).singleResult();
|
||||
ProcessDefDTO processDefDTO = ProcessDefDTO.toProcessDefDTO(processDefinition, deployment);
|
||||
processDefDTO.setXAxis(activityImpl.getX());
|
||||
processDefDTO.setYAxis(activityImpl.getY());
|
||||
processDefDTO.setWidth(activityImpl.getWidth());
|
||||
processDefDTO.setHeight(activityImpl.getWidth());
|
||||
return processDefDTO;
|
||||
}
|
||||
|
||||
private Deployment getDeployment(String deploymentId) {
|
||||
return repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
|
||||
@Override
|
||||
public List<CommentDto> findCommentByTaskId(String taskId) {
|
||||
//使用当前的任务ID,查询当前流程对应的历史任务ID
|
||||
//使用当前任务ID,获取当前任务对象
|
||||
Task task = taskService.createTaskQuery()
|
||||
.taskId(taskId)
|
||||
.singleResult();
|
||||
//获取流程实例ID
|
||||
List<CommentDto> commentDtoList = new ArrayList<>();
|
||||
List<Comment> commentList = taskService.getProcessInstanceComments(task.getProcessInstanceId());
|
||||
|
||||
commentList.forEach(comment -> {
|
||||
CommentDto commentDto = new CommentDto();
|
||||
commentDto.setId(comment.getId());
|
||||
commentDto.setTime(comment.getTime());
|
||||
commentDto.setType(comment.getType());
|
||||
commentDto.setTaskId(comment.getTaskId());
|
||||
commentDto.setUserId(comment.getUserId());
|
||||
commentDto.setFullMessage(comment.getFullMessage());
|
||||
commentDto.setProcessInstanceId(comment.getProcessInstanceId());
|
||||
commentDtoList.add(commentDto);
|
||||
});
|
||||
return commentDtoList;
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.act.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import com.pig4cloud.pigx.act.mapper.LeaveBillMapper;
|
||||
import com.pig4cloud.pigx.act.service.LeaveBillService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018-09-27
|
||||
*/
|
||||
@Service("leaveBillService")
|
||||
public class LeaveBillServiceImpl extends ServiceImpl<LeaveBillMapper, LeaveBill> implements LeaveBillService {
|
||||
|
||||
}
|
||||
+38
-23
@@ -21,6 +21,8 @@ import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.pig4cloud.pigx.act.dto.ProcessDefDTO;
|
||||
import com.pig4cloud.pigx.act.entity.LeaveBill;
|
||||
import com.pig4cloud.pigx.act.mapper.LeaveBillMapper;
|
||||
import com.pig4cloud.pigx.act.service.ProcessService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.activiti.engine.RepositoryService;
|
||||
@@ -33,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -45,6 +48,7 @@ import java.util.Map;
|
||||
public class ProcessServiceImpl implements ProcessService {
|
||||
private final RepositoryService repositoryService;
|
||||
private final RuntimeService runtimeService;
|
||||
private final LeaveBillMapper leaveBillMapper;
|
||||
|
||||
/**
|
||||
* 分页流程列表
|
||||
@@ -72,7 +76,7 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
.forEach(processDefinition -> {
|
||||
Deployment deployment = repositoryService.createDeploymentQuery()
|
||||
.deploymentId(processDefinition.getDeploymentId()).singleResult();
|
||||
deploymentList.add(toProcessDefDTO(processDefinition, deployment));
|
||||
deploymentList.add(ProcessDefDTO.toProcessDefDTO(processDefinition, deployment));
|
||||
});
|
||||
result.setRecords(deploymentList);
|
||||
return result;
|
||||
@@ -124,38 +128,49 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程实例
|
||||
* 删除部署的流程,级联删除流程实例
|
||||
*
|
||||
* @param procInsId
|
||||
* @param deploymentId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteProcIns(String procInsId) {
|
||||
runtimeService.deleteProcessInstance(procInsId, "pigx");
|
||||
public Boolean deleteProcIns(String deploymentId) {
|
||||
repositoryService.deleteDeployment(deploymentId, true);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽取流程定义需要返回的内容
|
||||
* 启动流程、更新请假单状态
|
||||
*
|
||||
* @param processDefinition
|
||||
* @param deployment
|
||||
* @param leaveId
|
||||
* @return
|
||||
*/
|
||||
private ProcessDefDTO toProcessDefDTO(ProcessDefinition processDefinition, Deployment deployment) {
|
||||
|
||||
ProcessDefDTO dto = new ProcessDefDTO();
|
||||
dto.category = processDefinition.getCategory();
|
||||
dto.processonDefinitionId = processDefinition.getId();
|
||||
dto.key = processDefinition.getKey();
|
||||
dto.name = deployment.getName();
|
||||
dto.revision = processDefinition.getVersion();
|
||||
dto.deploymentTime = deployment.getDeploymentTime().getTime();
|
||||
dto.xmlName = processDefinition.getResourceName();
|
||||
dto.picName = processDefinition.getDiagramResourceName();
|
||||
dto.deploymentId = deployment.getId();
|
||||
dto.suspend = processDefinition.isSuspended();
|
||||
dto.description = processDefinition.getDescription();
|
||||
return dto;
|
||||
@Override
|
||||
public Boolean saveStartProcess(Integer leaveId) {
|
||||
//1:获取请假单ID,使用请假单ID,查询请假单的对象LeaveBill
|
||||
LeaveBill leaveBill = leaveBillMapper.selectById(leaveId);
|
||||
leaveBill.setState("1");
|
||||
//3:使用当前对象获取到流程定义的key(对象的名称就是流程定义的key)
|
||||
String key = leaveBill.getClass().getSimpleName();
|
||||
/**
|
||||
* 4:从Session中获取当前任务的办理人,使用流程变量设置下一个任务的办理人
|
||||
* inputUser是流程变量的名称,
|
||||
* 获取的办理人是流程变量的值
|
||||
*/
|
||||
Map<String, Object> variables = new HashMap<>(1);
|
||||
variables.put("aaaaaaa", "lengleng");
|
||||
/**
|
||||
* 5:
|
||||
* (1)使用流程变量设置字符串(格式:LeaveBill.id的形式),通过设置,让启动的流程(流程实例)关联业务
|
||||
* (2)使用正在执行对象表中的一个字段BUSINESS_KEY(Activiti提供的一个字段),让启动的流程(流程实例)关联业务
|
||||
*/
|
||||
//格式:LeaveBill.id的形式(使用流程变量)
|
||||
String objId = key + "." + leaveBill.getLeaveId();
|
||||
variables.put("objId", objId);
|
||||
//6:使用流程定义的key,启动流程实例,同时设置流程变量,同时向正在执行的执行对象表中的字段BUSINESS_KEY添加业务数据,同时让流程关联业务
|
||||
runtimeService.startProcessInstanceByKey(key, objId, variables);
|
||||
leaveBillMapper.updateById(leaveBill);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
server:
|
||||
port: 5002
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: pigx-activiti
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: dev
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
datasource:
|
||||
url: jdbc:mysql://114.116.21.191:3306/ac?characterEncoding=UTF-8&useSSL=false
|
||||
username: root
|
||||
password: Bjyjht2017!@#
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
activiti:
|
||||
check-process-definitions: false
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@192.168.0.20:1025/eureka/
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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.pig4cloud.pigx.act.mapper.LeaveBillMapper">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.pig4cloud.pigx.act.entity.LeaveBill" id="leaveBillMap">
|
||||
<result property="leaveId" column="leave_id"/>
|
||||
<result property="username" column="username"/>
|
||||
<result property="days" column="days"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +1,5 @@
|
||||
package ${package}.${moduleName}.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -11,7 +10,6 @@ import com.pig4cloud.pigx.common.core.util.Query;
|
||||
import ${package}.${moduleName}.entity.${className};
|
||||
import ${package}.${moduleName}.service.${className}Service;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ package ${package}.${moduleName}.entity;
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
#if(${hasBigDecimal})
|
||||
@@ -28,7 +29,7 @@ public class ${className} extends Model<${className}> {
|
||||
* $column.comments
|
||||
*/
|
||||
#if($column.columnName == $pk.columnName)
|
||||
@TableId
|
||||
@TableId(type = IdType.AUTO)
|
||||
#end
|
||||
private $column.attrType $column.lowerAttrName;
|
||||
#end
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
type: 'success'
|
||||
})
|
||||
done()
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -171,6 +172,7 @@
|
||||
type: 'success'
|
||||
})
|
||||
done()
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -1,13 +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 ( '父菜单ID', 'views/${moduleName}/${pathName}/index', '', '0', '${pathName}', 'icon-bangzhushouji', '菜单ID', '0', '2018-01-20 13:17:19', '8', '2018-07-29 13:38:19', '${comments}管理');
|
||||
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`)
|
||||
values ( '父菜单ID', 'views/${moduleName}/${pathName}/index', '', '0', '${pathName}', 'icon-bangzhushouji', '菜单ID', '0', '2018-01-20 13:17:19', '8', '2018-07-29 13:38:19', '${comments}管理','1');
|
||||
|
||||
-- 菜单对应按钮SQL
|
||||
insert into `pigx`.`sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
|
||||
values ( '菜单ID', null, '${moduleName}_${pathName}_add', '1', null, '1', '子按钮ID1', '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 ( '菜单ID', null, '${moduleName}_${pathName}_edit', '1', null, '1', '子按钮ID2', '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 ( '菜单ID', null, '${moduleName}_${pathName}_del', '1', null, '1', '子按钮ID3', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除');
|
||||
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`)
|
||||
values ( '菜单ID', null, '${moduleName}_${pathName}_add', '1', null, '1', '子按钮ID1', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '${comments}新增','1');
|
||||
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`)
|
||||
values ( '菜单ID', null, '${moduleName}_${pathName}_edit', '1', null, '1', '子按钮ID2', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}修改','1');
|
||||
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`)
|
||||
values ( '菜单ID', null, '${moduleName}_${pathName}_del', '1', null, '1', '子按钮ID3', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除','1');
|
||||
Reference in new issue
Block a user