mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-12 17:21:52 +08:00
fix:修复 mall product promotion 测试 sql
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
DELETE
|
||||
FROM "market_activity";
|
||||
DELETE
|
||||
FROM "promotion_coupon_template";
|
||||
DELETE
|
||||
FROM "promotion_coupon";
|
||||
DELETE
|
||||
FROM "promotion_reward_activity";
|
||||
DELETE
|
||||
FROM "promotion_discount_activity";
|
||||
DELETE
|
||||
FROM "promotion_discount_product";
|
||||
DELETE
|
||||
FROM "promotion_seckill_config";
|
||||
DELETE FROM "market_activity";
|
||||
DELETE FROM "promotion_coupon_template";
|
||||
DELETE FROM "promotion_coupon";
|
||||
DELETE FROM "promotion_reward_activity";
|
||||
DELETE FROM "promotion_discount_activity";
|
||||
DELETE FROM "promotion_discount_product";
|
||||
DELETE FROM "promotion_seckill_config";
|
||||
|
@@ -107,123 +107,45 @@ CREATE TABLE IF NOT EXISTS "promotion_discount_activity" (
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '限时折扣活动';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "promotion_discount_product" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"activity_id" bigint NOT NULL,
|
||||
"spu_id" bigint NOT NULL,
|
||||
"sku_id" bigint NOT NULL,
|
||||
"discount_type" int NOT NULL,
|
||||
"discount_percent"
|
||||
int,
|
||||
"discount_price"
|
||||
int,
|
||||
"creator"
|
||||
varchar
|
||||
DEFAULT
|
||||
'',
|
||||
"create_time"
|
||||
datetime
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
CURRENT_TIMESTAMP,
|
||||
"updater"
|
||||
varchar
|
||||
DEFAULT
|
||||
'',
|
||||
"update_time"
|
||||
datetime
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
CURRENT_TIMESTAMP
|
||||
ON
|
||||
UPDATE
|
||||
CURRENT_TIMESTAMP,
|
||||
"deleted"
|
||||
bit
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
FALSE,
|
||||
PRIMARY
|
||||
KEY
|
||||
(
|
||||
"id"
|
||||
)
|
||||
) COMMENT '限时折扣活动';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "promotion_seckill_config"
|
||||
(
|
||||
"id"
|
||||
bigint
|
||||
NOT
|
||||
NULL
|
||||
GENERATED
|
||||
BY
|
||||
DEFAULT AS
|
||||
IDENTITY,
|
||||
"name"
|
||||
varchar
|
||||
NOT
|
||||
NULL,
|
||||
"start_time"
|
||||
varchar
|
||||
NOT
|
||||
NULL,
|
||||
"end_time"
|
||||
varchar
|
||||
NOT
|
||||
NULL,
|
||||
"seckill_activity_count"
|
||||
int
|
||||
NOT
|
||||
NULL,
|
||||
"pic_url"
|
||||
varchar
|
||||
NOT
|
||||
NULL,
|
||||
"status"
|
||||
varchar
|
||||
NOT
|
||||
NULL,
|
||||
"creator"
|
||||
varchar
|
||||
DEFAULT
|
||||
'',
|
||||
"create_time"
|
||||
datetime
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
CURRENT_TIMESTAMP,
|
||||
"updater"
|
||||
varchar
|
||||
DEFAULT
|
||||
'',
|
||||
"update_time"
|
||||
datetime
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
CURRENT_TIMESTAMP
|
||||
ON
|
||||
UPDATE
|
||||
CURRENT_TIMESTAMP,
|
||||
"deleted"
|
||||
bit
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
FALSE,
|
||||
"tenant_id"
|
||||
bigint
|
||||
NOT
|
||||
NULL,
|
||||
PRIMARY
|
||||
KEY
|
||||
(
|
||||
"id"
|
||||
)
|
||||
) COMMENT '秒杀时段配置';
|
||||
-- 将该建表 SQL 语句,添加到 yudao-module-promotion-biz 模块的 test/resources/sql/create_tables.sql 文件里
|
||||
CREATE TABLE IF NOT EXISTS "promotion_seckill_activity" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"spu_id" bigint NOT NULL,
|
||||
"name" varchar NOT NULL,
|
||||
"status" int NOT NULL,
|
||||
"remark" varchar,
|
||||
"start_time" varchar NOT NULL,
|
||||
"end_time" varchar NOT NULL,
|
||||
"sort" int NOT NULL,
|
||||
"config_ids" varchar NOT NULL,
|
||||
"order_count" int NOT NULL,
|
||||
"user_count" int NOT NULL,
|
||||
"total_price" int NOT NULL,
|
||||
"total_limit_count" int,
|
||||
"single_limit_count" int,
|
||||
"stock" int,
|
||||
"total_stock" int,
|
||||
"creator" varchar DEFAULT '',
|
||||
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updater" varchar DEFAULT '',
|
||||
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '秒杀活动';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "promotion_seckill_config" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"name" varchar NOT NULL,
|
||||
"start_time" varchar NOT NULL,
|
||||
"end_time" varchar NOT NULL,
|
||||
"pic_url" varchar NOT NULL,
|
||||
"status" int NOT NULL,
|
||||
"creator" varchar DEFAULT '',
|
||||
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updater" varchar DEFAULT '',
|
||||
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '秒杀时段配置';
|
||||
|
Reference in New Issue
Block a user