From fc9c0d765792e07924f7c5e798394a3fa9d931cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sun, 6 Jul 2025 11:05:46 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20!pr723=20?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E7=A7=9F=E6=88=B7=E5=85=A8=E5=B1=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20=E4=BC=98=E5=8C=96sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 1 + .../org/dromara/workflow/domain/FlowSpel.java | 8 +++--- script/sql/ry_workflow.sql | 25 ++++++++++++++++++ script/sql/update/update_5.4.0-5.5.0.sql | 25 ++++++++++++++++++ script/sql/update/update_flow_spel.sql | 26 ------------------- 5 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 script/sql/update/update_5.4.0-5.5.0.sql delete mode 100644 script/sql/update/update_flow_spel.sql diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 63dbbead9..e89324145 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/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/ diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowSpel.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowSpel.java index 356d69b14..be74ccb90 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowSpel.java +++ b/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; diff --git a/script/sql/ry_workflow.sql b/script/sql/ry_workflow.sql index bb3d76e68..acd59e137 100644 --- a/script/sql/ry_workflow.sql +++ b/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, ''); diff --git a/script/sql/update/update_5.4.0-5.5.0.sql b/script/sql/update/update_5.4.0-5.5.0.sql new file mode 100644 index 000000000..27ec2f9f9 --- /dev/null +++ b/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, ''); diff --git a/script/sql/update/update_flow_spel.sql b/script/sql/update/update_flow_spel.sql deleted file mode 100644 index bbf9da9bd..000000000 --- a/script/sql/update/update_flow_spel.sql +++ /dev/null @@ -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, '');