Files
ruoyi-java/sql/jd_order_refund_fields.sql
2025-11-15 00:45:52 +08:00

17 lines
808 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 为jd_order表添加退款相关字段
-- 执行日期2025-01-XX
ALTER TABLE jd_order
ADD COLUMN is_refunded INT DEFAULT 0 COMMENT '是否退款0否 1是',
ADD COLUMN refund_date DATETIME NULL COMMENT '退款日期',
ADD COLUMN is_refund_received INT DEFAULT 0 COMMENT '是否退款到账0否 1是',
ADD COLUMN refund_received_date DATETIME NULL COMMENT '退款到账日期',
ADD COLUMN is_rebate_received INT DEFAULT 0 COMMENT '后返到账0否 1是',
ADD COLUMN rebate_received_date DATETIME NULL COMMENT '后返到账日期';
-- 添加索引(可选,根据查询需求)
-- CREATE INDEX idx_is_refunded ON jd_order(is_refunded);
-- CREATE INDEX idx_is_refund_received ON jd_order(is_refund_received);
-- CREATE INDEX idx_is_rebate_received ON jd_order(is_rebate_received);