20260825_hd_refund_mall_apply.sql 998 B

1234567891011121314
  1. -- 商城顾客售后并入零售退款主表 xhHdRefund
  2. -- 用途:顾客申请落待审核记录(status=0),商家审核通过后再走资金/库存
  3. -- 执行前请确认 xhHdRefund 尚无 userId/hdId/product/rejectReason 字段
  4. ALTER TABLE `xhHdRefund`
  5. MODIFY COLUMN `status` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '0待审核 1已通过 2已驳回 3已取消',
  6. ADD COLUMN `userId` int(11) NOT NULL DEFAULT 0 COMMENT '商城用户id,商家发起为0' AFTER `customId`,
  7. ADD COLUMN `hdId` int(11) NOT NULL DEFAULT 0 COMMENT '花店客户id(xhHd)' AFTER `userId`,
  8. ADD COLUMN `product` varchar(2000) NOT NULL DEFAULT '' COMMENT '待审核阶段勾选商品/花材JSON快照,通过后转 xhHdRefundItem/Goods' AFTER `refundType`,
  9. ADD COLUMN `rejectReason` varchar(255) NOT NULL DEFAULT '' COMMENT '驳回原因' AFTER `remark`,
  10. ADD KEY `idx_userId_status` (`userId`,`status`),
  11. ADD KEY `idx_shop_status` (`shopId`,`status`);
  12. DROP TABLE IF EXISTS `xhMallRefundApply`;