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