From ffe8d62ecd0063b4509b6fe12af0b982954c2956 Mon Sep 17 00:00:00 2001 From: luozukai Date: Thu, 29 Aug 2019 10:32:24 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=B4=A6=E5=8D=95=E7=BB=93=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V201908291022__L_FLOW.sql | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201908291022__L_FLOW.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201908291022__L_FLOW.sql b/mallinkAdmin/src/main/resources/db/migration/V201908291022__L_FLOW.sql new file mode 100644 index 000000000..9000f56de --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201908291022__L_FLOW.sql @@ -0,0 +1,81 @@ +alter table wx_flow_config modify `parent_id` BIGINT(20) NULL DEFAULT NULL; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 789) parent_id, + '789' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 790) parent_id, + '790' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1000) parent_id, + '1000' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1001) parent_id, + '1001' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1002) parent_id, + '1002' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1003) parent_id, + '1003' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1004) parent_id, + '1004' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1005) parent_id, + '1005' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1006) parent_id, + '1006' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1007) parent_id, + '1007' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1008) parent_id, + '1008' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1009) parent_id, + '1009' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1010) parent_id, + '1010' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1011) parent_id, + '1011' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1012) parent_id, + '1012' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `sort`) +select (select unix_timestamp(now()) + CEILING(RAND()*90000+10000)) id, + (select id from wx_flow_config where name = '账单审批' and tenant_id = 1013) parent_id, + '1013' tenant_id, '结算单审核' name, 10 type, 0 model_id, 2 sort from dual; \ No newline at end of file