diff --git a/mallinkAdmin/src/main/resources/db/migration/V201908101840__POS_CHANGED.sql b/mallinkAdmin/src/main/resources/db/migration/V201908101840__POS_CHANGED.sql new file mode 100644 index 000000000..fdeb56b35 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201908101840__POS_CHANGED.sql @@ -0,0 +1,45 @@ +CREATE TABLE `th_dev_info` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `dev_id` varchar(30) NOT NULL COMMENT '开发者ID', + `name` varchar(30) NOT NULL COMMENT '名称', + `type` smallint(2) NOT NULL COMMENT '类型(0:自用, 1:东软POS)', + `req_key` varchar(128) NOT NULL COMMENT '请求私钥', + `res_key` varchar(128) NOT NULL COMMENT '响应私钥', + `state` tinyint(6) NOT NULL DEFAULT '0' COMMENT '商户状态,0-使用中,1-禁用', + `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='第三方开发者信息表'; +ALTER TABLE `th_dev_info` ADD INDEX `idx_DevId` (`dev_id` ASC); + +create table pos_coupon_order_verify ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(10) NOT NULL COMMENT '租户ID', + `coupon_order_id` bigint(20) NOT NULL COMMENT '券包ID', + `pos_order_id` bigint(20) NULL COMMENT 'POS订单ID', + `state` tinyint(6) NOT NULL DEFAULT '0' COMMENT '状态,0-使用中,1-禁用', + `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='POS核销记录'; + +alter table wx_order +add `pos_order_id` bigint(20) NULL COMMENT 'POS订单ID', +change `type` `type` tinyint(6) NOT NULL DEFAULT '0' COMMENT '支付类型(0:券1:付款码支付,2:C扫码支付,3,储值卡,4积分支付 9:B端POS支付 10:东软POS支付)'; + +alter table wx_pay_order +add `type` tinyint(6) NOT NULL DEFAULT '0' COMMENT '支付类型(0:微信支付, 9:B端POS支付 10:东软POS同步)', +add `pos_pay_id` bigint(20) NULL COMMENT 'POS支付订单ID'; + +create table pos_mall_config ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(10) NOT NULL COMMENT '租户ID', + `discount` tinyint(6) NOT NULL DEFAULT '0' COMMENT '会员折扣状态,0-使用中,1-禁用', + `coupon` tinyint(6) NOT NULL DEFAULT '0' COMMENT '会员优惠券状态,0-使用中,1-禁用', + `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='POS优惠设置'; + +alter table wx_mall +add column `pos_qrcode_rule` varchar(50) DEFAULT '' COMMENT 'pos小票二维码规则'; \ No newline at end of file