初始化提交
This commit is contained in:
		| @ -0,0 +1,49 @@ | ||||
| spring: | ||||
|   main: | ||||
|     lazy-initialization: true # 开启懒加载,加快速度 | ||||
|     banner-mode: off # 单元测试,禁用 Banner | ||||
|  | ||||
| --- #################### 数据库相关配置 #################### | ||||
|  | ||||
| spring: | ||||
|   # 数据源配置项 | ||||
|   datasource: | ||||
|     name: ruoyi-vue-pro | ||||
|     url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 | ||||
|     driver-class-name: org.h2.Driver | ||||
|     username: sa | ||||
|     password: | ||||
|     druid: | ||||
|       async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 | ||||
|       initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ||||
|   sql: | ||||
|     init: | ||||
|       schema-locations: classpath:/sql/create_tables.sql | ||||
|  | ||||
|   # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | ||||
|   redis: | ||||
|     host: 127.0.0.1 # 地址 | ||||
|     port: 16379 # 端口(单元测试,使用 16379 端口) | ||||
|     database: 0 # 数据库索引 | ||||
|  | ||||
| mybatis: | ||||
|   lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试 | ||||
|  | ||||
| --- #################### 定时任务相关配置 #################### | ||||
|  | ||||
| --- #################### 配置中心相关配置 #################### | ||||
|  | ||||
| --- #################### 服务保障相关配置 #################### | ||||
|  | ||||
| # Lock4j 配置项(单元测试,禁用 Lock4j) | ||||
|  | ||||
| # Resilience4j 配置项 | ||||
|  | ||||
| --- #################### 监控相关配置 #################### | ||||
|  | ||||
| --- #################### 芋道相关配置 #################### | ||||
|  | ||||
| # 芋道配置项,设置当前项目所有自定义的配置 | ||||
| yudao: | ||||
|   info: | ||||
|     base-package: cn.iocoder.yudao.module | ||||
| @ -0,0 +1,4 @@ | ||||
| <configuration> | ||||
|     <!-- 引用 Spring Boot 的 logback 基础配置 --> | ||||
|     <include resource="org/springframework/boot/logging/logback/defaults.xml" /> | ||||
| </configuration> | ||||
| @ -0,0 +1,12 @@ | ||||
| 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 "promotion_combination_activity"; | ||||
| DELETE FROM "promotion_article_category"; | ||||
| DELETE FROM "promotion_article"; | ||||
| DELETE FROM "promotion_diy_template"; | ||||
| DELETE FROM "promotion_diy_page"; | ||||
| @ -0,0 +1,256 @@ | ||||
| CREATE TABLE IF NOT EXISTS "market_activity" | ||||
| ( | ||||
|     "id"                    bigint(20)  NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "title"                 varchar(50) NOT NULL, | ||||
|     "activity_type"         tinyint(4)  NOT NULL, | ||||
|     "status"                tinyint(4)  NOT NULL, | ||||
|     "start_time"            datetime    NOT NULL, | ||||
|     "end_time"              datetime    NOT NULL, | ||||
|     "invalid_time"          datetime, | ||||
|     "delete_time"           datetime, | ||||
|     "time_limited_discount" varchar(2000), | ||||
|     "full_privilege"        varchar(2000), | ||||
|     "creator"               varchar(64)          DEFAULT '', | ||||
|     "create_time"           datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||||
|     "updater"               varchar(64)          DEFAULT '', | ||||
|     "update_time"           datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||||
|     "deleted"               bit         NOT NULL DEFAULT FALSE, | ||||
|     "tenant_id"             bigint(20)  NOT NULL, | ||||
|     PRIMARY KEY ("id") | ||||
| ) COMMENT '促销活动'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_coupon_template" | ||||
| ( | ||||
|     "id"                   bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "name"                 varchar  NOT NULL, | ||||
|     "status"               int      NOT NULL, | ||||
|     "total_count"          int      NOT NULL, | ||||
|     "take_limit_count"     int      NOT NULL, | ||||
|     "take_type"            int      NOT NULL, | ||||
|     "use_price"            int      NOT NULL, | ||||
|     "product_scope"        int      NOT NULL, | ||||
|     "product_spu_ids"      varchar, | ||||
|     "validity_type"        int      NOT NULL, | ||||
|     "valid_start_time"     datetime, | ||||
|     "valid_end_time"       datetime, | ||||
|     "fixed_start_term"     int, | ||||
|     "fixed_end_term"       int, | ||||
|     "discount_type"        int      NOT NULL, | ||||
|     "discount_percent"     int, | ||||
|     "discount_price"       int, | ||||
|     "discount_limit_price" int, | ||||
|     "take_count"           int      NOT NULL DEFAULT 0, | ||||
|     "use_count"            int      NOT NULL DEFAULT 0, | ||||
|     "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_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 '满减送活动'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_discount_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, | ||||
|     "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_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 '秒杀时段配置'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_combination_activity" | ||||
| ( | ||||
|     "id"                 bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "name"               varchar  NOT NULL, | ||||
|     "spu_id"             bigint, | ||||
|     "total_limit_count"  int      NOT NULL, | ||||
|     "single_limit_count" int      NOT NULL, | ||||
|     "start_time"         varchar  NOT NULL, | ||||
|     "end_time"           varchar  NOT NULL, | ||||
|     "user_size"          int      NOT NULL, | ||||
|     "total_num"          int      NOT NULL, | ||||
|     "success_num"        int      NOT NULL, | ||||
|     "order_user_count"   int      NOT NULL, | ||||
|     "virtual_group"      int      NOT NULL, | ||||
|     "status"             int      NOT NULL, | ||||
|     "limit_duration"     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 '拼团活动'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_article_category" | ||||
| ( | ||||
|     "id"          bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "name"        varchar  NOT NULL, | ||||
|     "pic_url"     varchar, | ||||
|     "status"      int      NOT NULL, | ||||
|     "sort"        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 '文章分类表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_article" | ||||
| ( | ||||
|     "id"               bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "category_id"      bigint   NOT NULL, | ||||
|     "title"            varchar  NOT NULL, | ||||
|     "author"           varchar, | ||||
|     "pic_url"          varchar  NOT NULL, | ||||
|     "introduction"     varchar, | ||||
|     "browse_count"     varchar, | ||||
|     "sort"             int      NOT NULL, | ||||
|     "status"           int      NOT NULL, | ||||
|     "spu_id"           bigint   NOT NULL, | ||||
|     "recommend_hot"    bit      NOT NULL, | ||||
|     "recommend_banner" bit      NOT NULL, | ||||
|     "content"          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 '文章管理表'; | ||||
|  | ||||
| CREATE TABLE IF NOT EXISTS "promotion_diy_template" | ||||
| ( | ||||
|     "id"                 bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "name"               varchar  NOT NULL, | ||||
|     "used"               bit      NOT NULL, | ||||
|     "used_time"          varchar, | ||||
|     "remark"             varchar, | ||||
|     "preview_pic_urls"   varchar, | ||||
|     "property"           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 DEFAULT 0, | ||||
|     PRIMARY KEY ("id") | ||||
| ) COMMENT '装修模板'; | ||||
| CREATE TABLE IF NOT EXISTS "promotion_diy_page" | ||||
| ( | ||||
|     "id"                 bigint   NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||||
|     "template_id"        bigint   NOT NULL, | ||||
|     "name"               varchar  NOT NULL, | ||||
|     "remark"             varchar, | ||||
|     "preview_pic_urls"   varchar, | ||||
|     "property"           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, | ||||
|     "tenant_id"          bigint   NOT NULL, | ||||
|     PRIMARY KEY ("id") | ||||
| ) COMMENT '装修页面'; | ||||
		Reference in New Issue
	
	Block a user
	 YangJ
					YangJ