mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-16 11:11:53 +08:00
promotion:增加满减送活动的排重校验、单元测试
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
DELETE FROM "market_activity";
|
||||
DELETE FROM "promotion_coupon_template";
|
||||
DELETE FROM "promotion_coupon";
|
||||
DELETE FROM "promotion_reward_activity";
|
||||
|
@@ -46,3 +46,48 @@ CREATE TABLE IF NOT EXISTS "promotion_coupon_template" (
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '优惠劵模板';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "promotion_coupon" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"template_id" bigint NOT NULL,
|
||||
"name" varchar NOT NULL,
|
||||
"status" int NOT NULL,
|
||||
"user_id" bigint NOT NULL,
|
||||
"take_type" int NOT NULL,
|
||||
"useprice" int NOT NULL,
|
||||
"valid_start_time" datetime NOT NULL,
|
||||
"valid_end_time" datetime NOT NULL,
|
||||
"product_scope" int NOT NULL,
|
||||
"product_spu_ids" varchar,
|
||||
"discount_type" int NOT NULL,
|
||||
"discount_percent" int,
|
||||
"discount_price" int,
|
||||
"discount_limit_price" int,
|
||||
"use_order_id" bigint,
|
||||
"use_time" datetime,
|
||||
"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_reward_activity" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"name" varchar NOT NULL,
|
||||
"status" int NOT NULL,
|
||||
"start_time" datetime NOT NULL,
|
||||
"end_time" datetime NOT NULL,
|
||||
"remark" varchar,
|
||||
"condition_type" int NOT NULL,
|
||||
"product_scope" int NOT NULL,
|
||||
"product_spu_ids" varchar,
|
||||
"rules" varchar,
|
||||
"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 '满减送活动';
|
||||
|
Reference in New Issue
Block a user