فهرست منبع

update 优化 !pr723 排除租户全局使用 优化sql脚本

疯狂的狮子Li 1 سال پیش
والد
کامیت
fc9c0d7657

+ 1 - 0
ruoyi-admin/src/main/resources/application.yml

@@ -127,6 +127,7 @@ tenant:
     - sys_user_role
     - sys_client
     - sys_oss_config
+    - flow_spel
 
 # MyBatisPlus配置
 # https://baomidou.com/config/

+ 5 - 3
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowSpel.java

@@ -1,9 +1,11 @@
 package org.dromara.workflow.domain;
 
-import org.dromara.common.tenant.core.TenantEntity;
-import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
 
 import java.io.Serial;
 
@@ -16,7 +18,7 @@ import java.io.Serial;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("flow_spel")
-public class FlowSpel extends TenantEntity {
+public class FlowSpel extends BaseEntity {
 
     @Serial
     private static final long serialVersionUID = 1L;

+ 25 - 0
script/sql/ry_workflow.sql

@@ -182,6 +182,25 @@ INSERT INTO flow_category values (107, '000000', 101, '0,100,101', '外出', 4,
 INSERT INTO flow_category values (108, '000000', 102, '0,100,102', '转正', 1, '0', 103, 1, sysdate(), null, null);
 INSERT INTO flow_category values (109, '000000', 102, '0,100,102', '离职', 2, '0', 103, 1, sysdate(), null, null);
 
+CREATE TABLE flow_spel (
+    id bigint(20) NOT NULL COMMENT '主键id',
+    component_name varchar(255) DEFAULT NULL COMMENT '组件名称',
+    method_name varchar(255) DEFAULT NULL COMMENT '方法名',
+    method_params varchar(255) DEFAULT NULL COMMENT '参数',
+    view_spel varchar(255) DEFAULT NULL COMMENT '预览spel表达式',
+    remark varchar(255) DEFAULT NULL COMMENT '备注',
+    status char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
+    del_flag char(1) DEFAULT '0' COMMENT '删除标志',
+    create_dept bigint(20) DEFAULT NULL COMMENT '创建部门',
+    create_by bigint(20) DEFAULT NULL COMMENT '创建者',
+    create_time datetime DEFAULT NULL COMMENT '创建时间',
+    update_by bigint(20) DEFAULT NULL COMMENT '更新者',
+    update_time datetime DEFAULT NULL COMMENT '更新时间',
+    PRIMARY KEY (id)
+) ENGINE = InnoDB COMMENT='流程spel表达式定义表';
+
+INSERT INTO flow_spel VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, sysdate(), 1, sysdate(), '000000');
+
 -- ----------------------------
 -- 请假单信息
 -- ----------------------------
@@ -222,6 +241,12 @@ insert into sys_menu values ('11624', '流程分类新增', '11622', '2', '#', '
 insert into sys_menu values ('11625', '流程分类修改', '11622', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:edit', '#', 103, 1,sysdate(), null, null, '');
 insert into sys_menu values ('11626', '流程分类删除', '11622', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:remove', '#', 103,1, sysdate(), null, null, '');
 insert into sys_menu values ('11627', '流程分类导出', '11622', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:export', '#', 103,1, sysdate(), null, null, '');
+INSERT INTO sys_menu VALUES (11801, '流程spel表达式', 11616, 1, 'spel', 'workflow/spel/index', NULL, 1, 0, 'C', '0', '0', 'workflow:spel:list', 'input', 103, 1, sysdate(), 1, sysdate(), '流程spel达式定义菜单');
+INSERT INTO sys_menu VALUES (11802, '流程spel达式定义查询', 11801, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:query', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11803, '流程spel达式定义新增', 11801, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:add', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11804, '流程spel达式定义修改', 11801, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:edit', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11805, '流程spel达式定义删除', 11801, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11806, '流程spel达式定义导出', 11801, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:export', '#', 103, 1, sysdate(), NULL, NULL, '');
 -- 请假测试相关按钮
 insert into sys_menu VALUES (11638, '请假申请',     5,    1, 'leave', 'workflow/leave/index', '', 1, 0, 'C', '0', '0', 'workflow:leave:list', '#', 103, 1, sysdate(), NULL, NULL, '请假申请菜单');
 insert into sys_menu VALUES (11639, '请假申请查询', 11638, 1, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:query', '#', 103, 1, sysdate(), NULL, NULL, '');

+ 25 - 0
script/sql/update/update_5.4.0-5.5.0.sql

@@ -0,0 +1,25 @@
+CREATE TABLE flow_spel (
+    id bigint(20) NOT NULL COMMENT '主键id',
+    component_name varchar(255) DEFAULT NULL COMMENT '组件名称',
+    method_name varchar(255) DEFAULT NULL COMMENT '方法名',
+    method_params varchar(255) DEFAULT NULL COMMENT '参数',
+    view_spel varchar(255) DEFAULT NULL COMMENT '预览spel表达式',
+    remark varchar(255) DEFAULT NULL COMMENT '备注',
+    status char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
+    del_flag char(1) DEFAULT '0' COMMENT '删除标志',
+    create_dept bigint(20) DEFAULT NULL COMMENT '创建部门',
+    create_by bigint(20) DEFAULT NULL COMMENT '创建者',
+    create_time datetime DEFAULT NULL COMMENT '创建时间',
+    update_by bigint(20) DEFAULT NULL COMMENT '更新者',
+    update_time datetime DEFAULT NULL COMMENT '更新时间',
+    PRIMARY KEY (id)
+) ENGINE = InnoDB COMMENT='流程spel表达式定义表';
+
+INSERT INTO flow_spel VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, sysdate(), 1, sysdate());
+
+INSERT INTO sys_menu VALUES (11801, '流程spel表达式', 11616, 1, 'spel', 'workflow/spel/index', NULL, 1, 0, 'C', '0', '0', 'workflow:spel:list', 'input', 103, 1, sysdate(), 1, sysdate(), '流程spel达式定义菜单');
+INSERT INTO sys_menu VALUES (11802, '流程spel达式定义查询', 11801, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:query', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11803, '流程spel达式定义新增', 11801, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:add', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11804, '流程spel达式定义修改', 11801, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:edit', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11805, '流程spel达式定义删除', 11801, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
+INSERT INTO sys_menu VALUES (11806, '流程spel达式定义导出', 11801, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:export', '#', 103, 1, sysdate(), NULL, NULL, '');

+ 0 - 26
script/sql/update/update_flow_spel.sql

@@ -1,26 +0,0 @@
-CREATE TABLE `flow_spel` (
-     `id` bigint(20) NOT NULL COMMENT '主键id',
-     `component_name` varchar(255) DEFAULT NULL COMMENT '组件名称',
-     `method_name` varchar(255) DEFAULT NULL COMMENT '方法名',
-     `method_params` varchar(255) DEFAULT NULL COMMENT '参数',
-     `view_spel` varchar(255) DEFAULT NULL COMMENT '预览spel表达式',
-     `remark` varchar(255) DEFAULT NULL COMMENT '备注',
-     `status` char(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
-     `del_flag` char(1) DEFAULT '0' COMMENT '删除标志',
-     `create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
-     `create_by` bigint(20) DEFAULT NULL COMMENT '创建者',
-     `create_time` datetime DEFAULT NULL COMMENT '创建时间',
-     `update_by` bigint(20) DEFAULT NULL COMMENT '更新者',
-     `update_time` datetime DEFAULT NULL COMMENT '更新时间',
-     `tenant_id` varchar(40) DEFAULT NULL COMMENT '租户id',
-     PRIMARY KEY (`id`)
-) ENGINE = InnoDB COMMENT='流程spel表达式定义表';
-
-INSERT INTO `ry-vue`.`flow_spel` (`id`, `component_name`, `method_name`, `method_params`, `view_spel`, `remark`, `status`, `del_flag`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `tenant_id`) VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, sysdate(), 1, sysdate(), '000000');
-
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11801, '流程spel表达式', 11616, 1, 'spel', 'workflow/spel/index', NULL, 1, 0, 'C', '0', '0', 'workflow:spel:list', 'input', 103, 1, sysdate(), 1, sysdate(), '流程spel达式定义菜单');
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11802, '流程spel达式定义查询', 11801, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:query', '#', 103, 1, sysdate(), NULL, NULL, '');
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11803, '流程spel达式定义新增', 11801, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:add', '#', 103, 1, sysdate(), NULL, NULL, '');
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11804, '流程spel达式定义修改', 11801, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:edit', '#', 103, 1, sysdate(), NULL, NULL, '');
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11805, '流程spel达式定义删除', 11801, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
-INSERT INTO `ry-vue`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11806, '流程spel达式定义导出', 11801, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'workflow:spel:export', '#', 103, 1, sysdate(), NULL, NULL, '');