xhxu 3 лет назад
Родитель
Сommit
ee7ec82b17
3 измененных файлов: 234 добавлений и 22 удалений
  1. +227
    -4
      mallinkAdmin/src/main/resources/db/migration/V2023030800001__coupon_press.sql
  2. +0
    -18
      mallinkAdmin/src/main/resources/db/migration/V2023030800001__upd_coupon_password.sql
  3. +7
    -0
      mallinkAdmin/src/main/resources/db/migration/V2023030800002__upd_coupon_password.sql

+ 227
- 4
mallinkAdmin/src/main/resources/db/migration/V2023030800001__coupon_press.sql Просмотреть файл

@@ -1,7 +1,230 @@
ALTER TABLE `mallink`.`wx_coupon_password`
ADD COLUMN `pay_password` varchar(50) COMMENT '支付密码' AFTER `password`;
CREATE TABLE `wx_coupon_batch` (
`id` bigint(20) unsigned NOT NULL,
`tenant_id` varchar(5) NOT NULL,
`parent_tenant_id` varchar(5) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL COMMENT '批次名称',
`status` int(1) NOT NULL DEFAULT '0' COMMENT '状态0-草稿 1-进行中 2-已停止',
`create_date` datetime DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`allow_count` int(3) NOT NULL DEFAULT '0' COMMENT '限购次数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;




INSERT INTO `mallink`.`sys_config`(`id`, `config_item_key`, `config_item_remark`, `create_date`, `update_date`, `status`) VALUES (7, 'cardIsNeedPassword', '实体购物卡是否需要密码,0-不需要,1-需要', '2023-03-08 10:49:15', '2023-03-08 10:49:15', 0);
CREATE TABLE `wx_coupon_batch_item` (
`id` bigint(20) unsigned NOT NULL,
`coupon_batch_id` bigint(20) NOT NULL COMMENT '批次id',
`coupon_id` bigint(20) NOT NULL COMMENT '砍价券id',
`coupon_batch_status` int(1) NOT NULL COMMENT '批次状态',
`create_date` datetime DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`tenant_id` varchar(5) NOT NULL,
`parent_tenant_id` varchar(5) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


INSERT INTO `mallink`.`sys_config`(`id`, `config_item_key`, `config_item_remark`, `create_date`, `update_date`, `status`) VALUES (8, 'couponListShowSelled', '券列表是否显示已售数量,0-不显示,1-显示', '2023-03-08 10:49:15', '2023-03-08 10:49:15', 0);
create table wx_coupon_batch_0 like wx_coupon_batch;
create table wx_coupon_batch_1 like wx_coupon_batch;
create table wx_coupon_batch_2 like wx_coupon_batch;
create table wx_coupon_batch_3 like wx_coupon_batch;
create table wx_coupon_batch_4 like wx_coupon_batch;
create table wx_coupon_batch_5 like wx_coupon_batch;
create table wx_coupon_batch_6 like wx_coupon_batch;
create table wx_coupon_batch_7 like wx_coupon_batch;
create table wx_coupon_batch_8 like wx_coupon_batch;
create table wx_coupon_batch_9 like wx_coupon_batch;
create table wx_coupon_batch_10 like wx_coupon_batch;
create table wx_coupon_batch_11 like wx_coupon_batch;
create table wx_coupon_batch_12 like wx_coupon_batch;
create table wx_coupon_batch_13 like wx_coupon_batch;
create table wx_coupon_batch_14 like wx_coupon_batch;
create table wx_coupon_batch_15 like wx_coupon_batch;
create table wx_coupon_batch_16 like wx_coupon_batch;
create table wx_coupon_batch_17 like wx_coupon_batch;
create table wx_coupon_batch_18 like wx_coupon_batch;
create table wx_coupon_batch_19 like wx_coupon_batch;
create table wx_coupon_batch_20 like wx_coupon_batch;
create table wx_coupon_batch_21 like wx_coupon_batch;
create table wx_coupon_batch_22 like wx_coupon_batch;
create table wx_coupon_batch_23 like wx_coupon_batch;
create table wx_coupon_batch_24 like wx_coupon_batch;
create table wx_coupon_batch_25 like wx_coupon_batch;
create table wx_coupon_batch_26 like wx_coupon_batch;
create table wx_coupon_batch_27 like wx_coupon_batch;
create table wx_coupon_batch_28 like wx_coupon_batch;
create table wx_coupon_batch_29 like wx_coupon_batch;
create table wx_coupon_batch_30 like wx_coupon_batch;
create table wx_coupon_batch_31 like wx_coupon_batch;
create table wx_coupon_batch_32 like wx_coupon_batch;
create table wx_coupon_batch_33 like wx_coupon_batch;
create table wx_coupon_batch_34 like wx_coupon_batch;
create table wx_coupon_batch_35 like wx_coupon_batch;
create table wx_coupon_batch_36 like wx_coupon_batch;
create table wx_coupon_batch_37 like wx_coupon_batch;
create table wx_coupon_batch_38 like wx_coupon_batch;
create table wx_coupon_batch_39 like wx_coupon_batch;
create table wx_coupon_batch_40 like wx_coupon_batch;
create table wx_coupon_batch_41 like wx_coupon_batch;
create table wx_coupon_batch_42 like wx_coupon_batch;
create table wx_coupon_batch_43 like wx_coupon_batch;
create table wx_coupon_batch_44 like wx_coupon_batch;
create table wx_coupon_batch_45 like wx_coupon_batch;
create table wx_coupon_batch_46 like wx_coupon_batch;
create table wx_coupon_batch_47 like wx_coupon_batch;
create table wx_coupon_batch_48 like wx_coupon_batch;
create table wx_coupon_batch_49 like wx_coupon_batch;
create table wx_coupon_batch_50 like wx_coupon_batch;
create table wx_coupon_batch_51 like wx_coupon_batch;
create table wx_coupon_batch_52 like wx_coupon_batch;
create table wx_coupon_batch_53 like wx_coupon_batch;
create table wx_coupon_batch_54 like wx_coupon_batch;
create table wx_coupon_batch_55 like wx_coupon_batch;
create table wx_coupon_batch_56 like wx_coupon_batch;
create table wx_coupon_batch_57 like wx_coupon_batch;
create table wx_coupon_batch_58 like wx_coupon_batch;
create table wx_coupon_batch_59 like wx_coupon_batch;
create table wx_coupon_batch_60 like wx_coupon_batch;
create table wx_coupon_batch_61 like wx_coupon_batch;
create table wx_coupon_batch_62 like wx_coupon_batch;
create table wx_coupon_batch_63 like wx_coupon_batch;
create table wx_coupon_batch_64 like wx_coupon_batch;
create table wx_coupon_batch_65 like wx_coupon_batch;
create table wx_coupon_batch_66 like wx_coupon_batch;
create table wx_coupon_batch_67 like wx_coupon_batch;
create table wx_coupon_batch_68 like wx_coupon_batch;
create table wx_coupon_batch_69 like wx_coupon_batch;
create table wx_coupon_batch_70 like wx_coupon_batch;
create table wx_coupon_batch_71 like wx_coupon_batch;
create table wx_coupon_batch_72 like wx_coupon_batch;
create table wx_coupon_batch_73 like wx_coupon_batch;
create table wx_coupon_batch_74 like wx_coupon_batch;
create table wx_coupon_batch_75 like wx_coupon_batch;
create table wx_coupon_batch_76 like wx_coupon_batch;
create table wx_coupon_batch_77 like wx_coupon_batch;
create table wx_coupon_batch_78 like wx_coupon_batch;
create table wx_coupon_batch_79 like wx_coupon_batch;
create table wx_coupon_batch_80 like wx_coupon_batch;
create table wx_coupon_batch_81 like wx_coupon_batch;
create table wx_coupon_batch_82 like wx_coupon_batch;
create table wx_coupon_batch_83 like wx_coupon_batch;
create table wx_coupon_batch_84 like wx_coupon_batch;
create table wx_coupon_batch_85 like wx_coupon_batch;
create table wx_coupon_batch_86 like wx_coupon_batch;
create table wx_coupon_batch_87 like wx_coupon_batch;
create table wx_coupon_batch_88 like wx_coupon_batch;
create table wx_coupon_batch_89 like wx_coupon_batch;
create table wx_coupon_batch_90 like wx_coupon_batch;
create table wx_coupon_batch_91 like wx_coupon_batch;
create table wx_coupon_batch_92 like wx_coupon_batch;
create table wx_coupon_batch_93 like wx_coupon_batch;
create table wx_coupon_batch_94 like wx_coupon_batch;
create table wx_coupon_batch_95 like wx_coupon_batch;
create table wx_coupon_batch_96 like wx_coupon_batch;
create table wx_coupon_batch_97 like wx_coupon_batch;
create table wx_coupon_batch_98 like wx_coupon_batch;
create table wx_coupon_batch_99 like wx_coupon_batch;

drop table wx_coupon_batch;

create table wx_coupon_batch_item_0 like wx_coupon_batch_item;
create table wx_coupon_batch_item_1 like wx_coupon_batch_item;
create table wx_coupon_batch_item_2 like wx_coupon_batch_item;
create table wx_coupon_batch_item_3 like wx_coupon_batch_item;
create table wx_coupon_batch_item_4 like wx_coupon_batch_item;
create table wx_coupon_batch_item_5 like wx_coupon_batch_item;
create table wx_coupon_batch_item_6 like wx_coupon_batch_item;
create table wx_coupon_batch_item_7 like wx_coupon_batch_item;
create table wx_coupon_batch_item_8 like wx_coupon_batch_item;
create table wx_coupon_batch_item_9 like wx_coupon_batch_item;
create table wx_coupon_batch_item_10 like wx_coupon_batch_item;
create table wx_coupon_batch_item_11 like wx_coupon_batch_item;
create table wx_coupon_batch_item_12 like wx_coupon_batch_item;
create table wx_coupon_batch_item_13 like wx_coupon_batch_item;
create table wx_coupon_batch_item_14 like wx_coupon_batch_item;
create table wx_coupon_batch_item_15 like wx_coupon_batch_item;
create table wx_coupon_batch_item_16 like wx_coupon_batch_item;
create table wx_coupon_batch_item_17 like wx_coupon_batch_item;
create table wx_coupon_batch_item_18 like wx_coupon_batch_item;
create table wx_coupon_batch_item_19 like wx_coupon_batch_item;
create table wx_coupon_batch_item_20 like wx_coupon_batch_item;
create table wx_coupon_batch_item_21 like wx_coupon_batch_item;
create table wx_coupon_batch_item_22 like wx_coupon_batch_item;
create table wx_coupon_batch_item_23 like wx_coupon_batch_item;
create table wx_coupon_batch_item_24 like wx_coupon_batch_item;
create table wx_coupon_batch_item_25 like wx_coupon_batch_item;
create table wx_coupon_batch_item_26 like wx_coupon_batch_item;
create table wx_coupon_batch_item_27 like wx_coupon_batch_item;
create table wx_coupon_batch_item_28 like wx_coupon_batch_item;
create table wx_coupon_batch_item_29 like wx_coupon_batch_item;
create table wx_coupon_batch_item_30 like wx_coupon_batch_item;
create table wx_coupon_batch_item_31 like wx_coupon_batch_item;
create table wx_coupon_batch_item_32 like wx_coupon_batch_item;
create table wx_coupon_batch_item_33 like wx_coupon_batch_item;
create table wx_coupon_batch_item_34 like wx_coupon_batch_item;
create table wx_coupon_batch_item_35 like wx_coupon_batch_item;
create table wx_coupon_batch_item_36 like wx_coupon_batch_item;
create table wx_coupon_batch_item_37 like wx_coupon_batch_item;
create table wx_coupon_batch_item_38 like wx_coupon_batch_item;
create table wx_coupon_batch_item_39 like wx_coupon_batch_item;
create table wx_coupon_batch_item_40 like wx_coupon_batch_item;
create table wx_coupon_batch_item_41 like wx_coupon_batch_item;
create table wx_coupon_batch_item_42 like wx_coupon_batch_item;
create table wx_coupon_batch_item_43 like wx_coupon_batch_item;
create table wx_coupon_batch_item_44 like wx_coupon_batch_item;
create table wx_coupon_batch_item_45 like wx_coupon_batch_item;
create table wx_coupon_batch_item_46 like wx_coupon_batch_item;
create table wx_coupon_batch_item_47 like wx_coupon_batch_item;
create table wx_coupon_batch_item_48 like wx_coupon_batch_item;
create table wx_coupon_batch_item_49 like wx_coupon_batch_item;
create table wx_coupon_batch_item_50 like wx_coupon_batch_item;
create table wx_coupon_batch_item_51 like wx_coupon_batch_item;
create table wx_coupon_batch_item_52 like wx_coupon_batch_item;
create table wx_coupon_batch_item_53 like wx_coupon_batch_item;
create table wx_coupon_batch_item_54 like wx_coupon_batch_item;
create table wx_coupon_batch_item_55 like wx_coupon_batch_item;
create table wx_coupon_batch_item_56 like wx_coupon_batch_item;
create table wx_coupon_batch_item_57 like wx_coupon_batch_item;
create table wx_coupon_batch_item_58 like wx_coupon_batch_item;
create table wx_coupon_batch_item_59 like wx_coupon_batch_item;
create table wx_coupon_batch_item_60 like wx_coupon_batch_item;
create table wx_coupon_batch_item_61 like wx_coupon_batch_item;
create table wx_coupon_batch_item_62 like wx_coupon_batch_item;
create table wx_coupon_batch_item_63 like wx_coupon_batch_item;
create table wx_coupon_batch_item_64 like wx_coupon_batch_item;
create table wx_coupon_batch_item_65 like wx_coupon_batch_item;
create table wx_coupon_batch_item_66 like wx_coupon_batch_item;
create table wx_coupon_batch_item_67 like wx_coupon_batch_item;
create table wx_coupon_batch_item_68 like wx_coupon_batch_item;
create table wx_coupon_batch_item_69 like wx_coupon_batch_item;
create table wx_coupon_batch_item_70 like wx_coupon_batch_item;
create table wx_coupon_batch_item_71 like wx_coupon_batch_item;
create table wx_coupon_batch_item_72 like wx_coupon_batch_item;
create table wx_coupon_batch_item_73 like wx_coupon_batch_item;
create table wx_coupon_batch_item_74 like wx_coupon_batch_item;
create table wx_coupon_batch_item_75 like wx_coupon_batch_item;
create table wx_coupon_batch_item_76 like wx_coupon_batch_item;
create table wx_coupon_batch_item_77 like wx_coupon_batch_item;
create table wx_coupon_batch_item_78 like wx_coupon_batch_item;
create table wx_coupon_batch_item_79 like wx_coupon_batch_item;
create table wx_coupon_batch_item_80 like wx_coupon_batch_item;
create table wx_coupon_batch_item_81 like wx_coupon_batch_item;
create table wx_coupon_batch_item_82 like wx_coupon_batch_item;
create table wx_coupon_batch_item_83 like wx_coupon_batch_item;
create table wx_coupon_batch_item_84 like wx_coupon_batch_item;
create table wx_coupon_batch_item_85 like wx_coupon_batch_item;
create table wx_coupon_batch_item_86 like wx_coupon_batch_item;
create table wx_coupon_batch_item_87 like wx_coupon_batch_item;
create table wx_coupon_batch_item_88 like wx_coupon_batch_item;
create table wx_coupon_batch_item_89 like wx_coupon_batch_item;
create table wx_coupon_batch_item_90 like wx_coupon_batch_item;
create table wx_coupon_batch_item_91 like wx_coupon_batch_item;
create table wx_coupon_batch_item_92 like wx_coupon_batch_item;
create table wx_coupon_batch_item_93 like wx_coupon_batch_item;
create table wx_coupon_batch_item_94 like wx_coupon_batch_item;
create table wx_coupon_batch_item_95 like wx_coupon_batch_item;
create table wx_coupon_batch_item_96 like wx_coupon_batch_item;
create table wx_coupon_batch_item_97 like wx_coupon_batch_item;
create table wx_coupon_batch_item_98 like wx_coupon_batch_item;
create table wx_coupon_batch_item_99 like wx_coupon_batch_item;

drop table wx_coupon_batch_item;

+ 0
- 18
mallinkAdmin/src/main/resources/db/migration/V2023030800001__upd_coupon_password.sql Просмотреть файл

@@ -1,18 +0,0 @@
UPDATE `mallink`.`wx_third_party_config` SET `type` = 4 WHERE `type` = 2;


--测试
--UPDATE `mallink`.`tt_merchant_poi` set `parent_tenant_id` = '1031' WHERE `tenant_id` in ('1032','1033','1034');

--生产
UPDATE `mallink`.`tt_merchant_poi` set `parent_tenant_id` = '1052' WHERE `tenant_id` in ('1049','1053','1054','1055','1056','1057','1058','1059');





ALTER TABLE `mallink`.`tt_order_push_error`
MODIFY COLUMN `id` bigint(20) NOT NULL FIRST,
ADD COLUMN `main_id` bigint(20) NOT NULL COMMENT '主要ID' AFTER `parent_tenant_id`,
ADD COLUMN `msg_type` smallint(2) NOT NULL COMMENT 'EnumMsgRecordType' AFTER `main_id`,
ADD COLUMN `third_type` smallint(2) COMMENT 'EnumThirdPartyConfigType' AFTER `msg_type`;

+ 7
- 0
mallinkAdmin/src/main/resources/db/migration/V2023030800002__upd_coupon_password.sql Просмотреть файл

@@ -0,0 +1,7 @@
ALTER TABLE `mallink`.`wx_coupon_password`
ADD COLUMN `pay_password` varchar(50) COMMENT '支付密码' AFTER `password`;


INSERT INTO `mallink`.`sys_config`(`id`, `config_item_key`, `config_item_remark`, `create_date`, `update_date`, `status`) VALUES (7, 'cardIsNeedPassword', '实体购物卡是否需要密码,0-不需要,1-需要', '2023-03-08 10:49:15', '2023-03-08 10:49:15', 0);

INSERT INTO `mallink`.`sys_config`(`id`, `config_item_key`, `config_item_remark`, `create_date`, `update_date`, `status`) VALUES (8, 'couponListShowSelled', '券列表是否显示已售数量,0-不显示,1-显示', '2023-03-08 10:49:15', '2023-03-08 10:49:15', 0);

Загрузка…
Отмена
Сохранить