功能:重建指尖管理师规划系统

This commit is contained in:
xiaowang
2026-06-04 16:39:06 +08:00
parent 73483e7b0c
commit 677890f518
413 changed files with 9602 additions and 795 deletions
@@ -1684,6 +1684,36 @@ ON DUPLICATE KEY UPDATE
is_delete = 0,
update_time = NOW();
CALL sp_add_column_if_not_exists('t_order', 'customer_remark', 'varchar(500) NULL COMMENT ''用户询价预约备注''');
CALL sp_add_column_if_not_exists('t_order', 'quote_status', 'varchar(32) NULL COMMENT ''报价状态:CONFIRMING/CONFIRMED/EXPIRED''');
CALL sp_add_column_if_not_exists('t_order', 'quote_user_confirmed', 'tinyint unsigned NOT NULL DEFAULT 0 COMMENT ''用户是否确认当前报价''');
CALL sp_add_column_if_not_exists('t_order', 'quote_shop_confirmed', 'tinyint unsigned NOT NULL DEFAULT 0 COMMENT ''店长是否确认当前报价''');
CALL sp_add_column_if_not_exists('t_order', 'quote_expire_time', 'datetime NULL COMMENT ''询价报价过期时间''');
CALL sp_add_column_if_not_exists('t_order', 'quote_confirmed_time', 'datetime NULL COMMENT ''双方确认报价时间''');
CALL sp_add_index_if_not_exists('t_order', 'idx_t_order_quote_status_expire', '(`quote_status`, `quote_expire_time`)');
CALL sp_add_column_if_not_exists('t_order_item', 'reference_price', 'decimal(10,2) NULL COMMENT ''作品参考价快照''');
CALL sp_add_column_if_not_exists('t_order_item', 'quoted_price', 'decimal(10,2) NULL COMMENT ''当前报价''');
CALL sp_add_column_if_not_exists('t_order_item', 'confirmed_price', 'decimal(10,2) NULL COMMENT ''最终确认价''');
CREATE TABLE IF NOT EXISTS t_order_quote_message
(
id bigint unsigned auto_increment comment '报价交互消息主键'
primary key,
order_id bigint unsigned not null comment '订单ID',
actor_id bigint unsigned null comment '操作人ID',
actor_type varchar(32) not null comment '操作人类型:USER/SHOP/SYSTEM',
action varchar(32) not null comment '动作:CREATE/SHOP_QUOTE/USER_REPLY/USER_CONFIRM/SHOP_CONFIRM/SYSTEM_CONFIRM/SYSTEM_EXPIRE',
remark varchar(500) null comment '备注',
items_snapshot text null comment '订单项报价快照JSON',
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
is_delete tinyint unsigned default 0 null comment '逻辑删除:0-未删,1-已删'
)
comment '订单询价报价交互消息表';
CALL sp_add_index_if_not_exists('t_order_quote_message', 'idx_order_quote_message_order_id', '(`order_id`, `is_delete`, `create_time`)');
CREATE TABLE IF NOT EXISTS `t_messagehub_push_config` (
`id` bigint unsigned NOT NULL COMMENT '主键ID',
`scene_code` varchar(80) NOT NULL COMMENT '业务场景编码',