| 1234567891011121314151617181920212223242526272829303132 |
- -- 商城顾客自助售后申请表
- -- 用途:mallApp 顾客提交售后申请(待审核),商家在 hdApp 人工通过/驳回后再执行资金退款
- -- 执行前请确认线上库无同名表
- CREATE TABLE IF NOT EXISTS `xhMallRefundApply` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mainId` int(11) NOT NULL DEFAULT 0 COMMENT '中央id',
- `shopId` int(11) NOT NULL DEFAULT 0 COMMENT '门店id',
- `hdId` int(11) NOT NULL DEFAULT 0 COMMENT '花店客户id(xhHd)',
- `customId` int(11) NOT NULL DEFAULT 0 COMMENT '客户id(xhCustom)',
- `userId` int(11) NOT NULL DEFAULT 0 COMMENT '商城用户id',
- `orderId` int(11) NOT NULL DEFAULT 0 COMMENT '零售订单id(xhOrder)',
- `orderSn` varchar(64) NOT NULL DEFAULT '' COMMENT '零售订单号',
- `refundType` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1退货并退款 2仅退款',
- `product` text COMMENT '勾选商品/花材JSON快照',
- `refundPrice` decimal(15,2) NOT NULL DEFAULT 0.00 COMMENT '申请退款金额',
- `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '顾客备注',
- `hbId` int(11) NOT NULL DEFAULT 0 COMMENT '下单红包id快照',
- `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0待审核 1已通过 2已驳回 3已取消',
- `rejectReason` varchar(255) NOT NULL DEFAULT '' COMMENT '驳回原因',
- `auditAdminId` int(11) NOT NULL DEFAULT 0 COMMENT '审核人id',
- `auditAdminName` varchar(64) NOT NULL DEFAULT '' COMMENT '审核人姓名',
- `auditTime` datetime DEFAULT NULL COMMENT '审核时间',
- `hdRefundId` int(11) NOT NULL DEFAULT 0 COMMENT '通过后关联xhHdRefund.id',
- `addTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
- `updateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `idx_orderId` (`orderId`),
- KEY `idx_shop_status` (`shopId`,`status`),
- KEY `idx_customId` (`customId`),
- KEY `idx_userId` (`userId`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商城顾客售后申请';
|