# wechat-payment **Repository Path**: Ferryup/wechat-payment ## Basic Information - **Project Name**: wechat-payment - **Description**: 尚硅谷-微信支付案例 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2021-12-24 - **Last Updated**: 2024-05-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 尚硅谷-微信支付课程学习 ## 1.视频地址 https://www.bilibili.com/video/BV1US4y1D77m?p=1 ## 2.sql脚本 ```sql USE `payment_demo`; /*Table structure for table `t_order_info` */ CREATE TABLE `t_order_info` ( `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单id', `title` varchar(256) DEFAULT NULL COMMENT '订单标题', `order_no` varchar(50) DEFAULT NULL COMMENT '商户订单编号', `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `product_id` bigint(20) DEFAULT NULL COMMENT '支付产品id', `total_fee` int(11) DEFAULT NULL COMMENT '订单金额(分)', `code_url` varchar(50) DEFAULT NULL COMMENT '订单二维码连接', `order_status` varchar(10) DEFAULT NULL COMMENT '订单状态', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; /*Table structure for table `t_payment_info` */ CREATE TABLE `t_payment_info` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '支付记录id', `order_no` varchar(50) DEFAULT NULL COMMENT '商户订单编号', `transaction_id` varchar(50) DEFAULT NULL COMMENT '支付系统交易编号', `payment_type` varchar(20) DEFAULT NULL COMMENT '支付类型', `trade_type` varchar(20) DEFAULT NULL COMMENT '交易类型', `trade_state` varchar(50) DEFAULT NULL COMMENT '交易状态', `payer_total` int(11) DEFAULT NULL COMMENT '支付金额(分)', `content` text COMMENT '通知参数', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; /*Table structure for table `t_product` */ CREATE TABLE `t_product` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '商品id', `title` varchar(20) DEFAULT NULL COMMENT '商品名称', `price` int(11) DEFAULT NULL COMMENT '价格(分)', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; /*Data for the table `t_product` */ insert into `t_product`(`title`,`price`) values ('Java课程',1); insert into `t_product`(`title`,`price`) values ('大数据课程',1); insert into `t_product`(`title`,`price`) values ('前端课程',1); insert into `t_product`(`title`,`price`) values ('UI课程',1); /*Table structure for table `t_refund_info` */ CREATE TABLE `t_refund_info` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '退款单id', `order_no` varchar(50) DEFAULT NULL COMMENT '商户订单编号', `refund_no` varchar(50) DEFAULT NULL COMMENT '商户退款单编号', `refund_id` varchar(50) DEFAULT NULL COMMENT '支付系统退款单号', `total_fee` int(11) DEFAULT NULL COMMENT '原订单金额(分)', `refund` int(11) DEFAULT NULL COMMENT '退款金额(分)', `reason` varchar(50) DEFAULT NULL COMMENT '退款原因', `refund_status` varchar(10) DEFAULT NULL COMMENT '退款状态', `content_return` text COMMENT '申请退款返回参数', `content_notify` text COMMENT '退款结果通知参数', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; ```