更新小程序API基础地址,启用真实后端URL并注释掉本地开发地址。同时,完善环境变量示例,增加管理端登录相关配置,删除不再使用的商家转账说明文档,优化提现逻辑以支持状态同步和日志记录,提升系统的可维护性和用户体验。

This commit is contained in:
乘风
2026-02-10 14:15:32 +08:00
parent e295f55fd9
commit 3ca7d38318
27 changed files with 2207 additions and 96 deletions

View File

@@ -0,0 +1,21 @@
package model
import "time"
// WechatCallbackLog 微信回调日志(转账结果通知、支付通知等)
// 表名 wechat_callback_logs
type WechatCallbackLog struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
CallbackType string `gorm:"column:callback_type;size:32;index" json:"callbackType"` // transfer | pay
OutBatchNo string `gorm:"column:out_batch_no;size:64;index" json:"outBatchNo"` // 商家批次单号
OutDetailNo string `gorm:"column:out_detail_no;size:64;index" json:"outDetailNo"` // 商家明细单号(转账即 out_bill_no
TransferBillNo string `gorm:"column:transfer_bill_no;size:64" json:"transferBillNo"` // 微信转账单号
State string `gorm:"column:state;size:32" json:"state"` // SUCCESS | FAIL | CANCELLED 等
FailReason string `gorm:"column:fail_reason;size:500" json:"failReason"`
HandlerResult string `gorm:"column:handler_result;size:20" json:"handlerResult"` // success | fail
HandlerError string `gorm:"column:handler_error;size:1000" json:"handlerError"` // 业务处理错误信息
RequestBody string `gorm:"column:request_body;type:text" json:"-"` // 原始/解密后 body可选不输出 JSON
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
}
func (WechatCallbackLog) TableName() string { return "wechat_callback_logs" }