20260513-arrive-shop.sql
882 Bytes
-- 骑手到店节点字段
ALTER TABLE `orders`
ADD COLUMN `arrive_shop_time` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '骑手到店时间' AFTER `pick_time`,
ADD COLUMN `arrive_shop_lng` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '骑手到店经度' AFTER `arrive_shop_time`,
ADD COLUMN `arrive_shop_lat` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '骑手到店纬度' AFTER `arrive_shop_lng`,
ADD COLUMN `arrive_shop_distance` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '骑手到店距离门店距离,单位米' AFTER `arrive_shop_lat`;
-- 示例开放平台应用订阅新增到店事件。
-- 如生产环境已有 open_app 数据,请按实际 app_key 更新 webhook_events。
UPDATE `open_app`
SET `webhook_events` = '["order.created","order.accepted","order.arrived_shop","order.picking","order.completed","order.cancelled"]'
WHERE `app_key` = 'TESTAPPKEY00001';