20260825_hd_refund_mall_apply.sql 1006 B

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