新增产品公共内容模板

This commit is contained in:
张锐 committed 2026-11-26 11:00:45 +08:00
1 parent 4345bef876
commit f26b663e46
30 files changed
+1069 -18

No files matched your search

@@ -0,0 +1,22 @@
CREATE TABLE product_content_template (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '数据库内部主键',
template_code VARCHAR(16) NOT NULL COMMENT '产品内容模板业务编号',
site_code VARCHAR(16) NOT NULL COMMENT '所属站点业务编号',
template_name VARCHAR(100) NOT NULL COMMENT '模板名称',
description VARCHAR(500) NULL COMMENT '模板用途说明',
template_content LONGTEXT NOT NULL COMMENT '模板英文富文本内容',
status VARCHAR(20) NOT NULL COMMENT '状态:DRAFT草稿,PUBLISHED已发布,OFFLINE已下线',
sort_no INT NOT NULL DEFAULT 0 COMMENT '模板排序值',
deleted TINYINT NOT NULL DEFAULT 0 COMMENT '逻辑删除状态:0未删除,1已删除',
create_time BIGINT NOT NULL DEFAULT (ROUND(UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000)) COMMENT '创建毫秒时间戳',
update_time BIGINT NOT NULL DEFAULT (ROUND(UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000)) COMMENT '更新毫秒时间戳',
PRIMARY KEY (id),
UNIQUE KEY uk_product_content_template_code (template_code),
UNIQUE KEY uk_product_content_template_site_name (site_code, template_name),
KEY idx_product_content_template_site_status_sort (site_code, status, sort_no)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='产品公共富文本内容模板';
ALTER TABLE product
ADD COLUMN content_template_code VARCHAR(16) NOT NULL DEFAULT '' COMMENT '关联产品内容模板业务编号,为空表示未关联' AFTER product_content,
ADD COLUMN template_position VARCHAR(20) NOT NULL DEFAULT 'AFTER' COMMENT '模板插入位置:BEFORE产品详情前,AFTER产品详情后' AFTER content_template_code,
ADD KEY idx_product_content_template (site_code, content_template_code);
@@ -2,3 +2,8 @@ social.channel.platform.duplicated=The same social platform cannot be configured
social.channel.save.failed=Failed to save social channel configuration.
social.channel.access.denied=You do not have access to this store.
social.channel.account.not.found=Administrator account was not found.
product.template.not-found=Product content template was not found.
product.template.save-failed=Failed to save the product content template.
product.template.delete-failed=Failed to delete the product content template.
product.template.in-use=The template is in use by a product and cannot be deleted.
product.template.unavailable=The selected product content template is unavailable.
@@ -2,3 +2,8 @@ social.channel.platform.duplicated=同一社媒平台不能重复配置。
social.channel.save.failed=社媒渠道配置保存失败。
social.channel.access.denied=无权访问该店铺。
social.channel.account.not.found=管理员账户不存在。
product.template.not-found=产品内容模板不存在。
product.template.save-failed=产品内容模板保存失败。
product.template.delete-failed=产品内容模板删除失败。
product.template.in-use=该模板已被产品使用,无法删除。
product.template.unavailable=所选产品内容模板不可用。
@@ -2,3 +2,8 @@ social.channel.platform.duplicated=同一社媒平台不能重複配置。
social.channel.save.failed=社媒渠道配置儲存失敗。
social.channel.access.denied=無權存取該商店。
social.channel.account.not.found=管理員帳戶不存在。
product.template.not-found=產品內容範本不存在。
product.template.save-failed=產品內容範本儲存失敗。
product.template.delete-failed=產品內容範本刪除失敗。
product.template.in-use=該範本已被產品使用,無法刪除。
product.template.unavailable=所選產品內容範本不可用。