From d36d34fe04725b5be121d2877f6251da9cc6089b Mon Sep 17 00:00:00 2001 From: v03413 Date: Thu, 15 Oct 2026 18:06:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=20URL=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=94=B9=E4=B8=BA=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit return_url/notify_url 原为 varchar(255),超长时 PostgreSQL 写入订单报错 (SQLSTATE 22001),由 AutoMigrate 自动变更列类型。 Fix #234 --- app/model/order.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/model/order.go b/app/model/order.go index 7ccdb74..ab49b74 100644 --- a/app/model/order.go +++ b/app/model/order.go @@ -79,8 +79,8 @@ type Order struct { Status int `gorm:"column:status;not null;default:1;index;index:idx_order_notify_retry,priority:1;comment:交易状态" json:"status"` Name string `gorm:"column:name;type:varchar(64);not null;default:'';comment:商品名称" json:"name"` ApiType string `gorm:"column:api_type;type:varchar(20);not null;default:'epusdt';comment:API类型" json:"api_type"` - ReturnUrl string `gorm:"column:return_url;type:varchar(255);not null;default:'';comment:同步地址" json:"return_url"` - NotifyUrl string `gorm:"column:notify_url;type:varchar(255);not null;default:'';comment:异步地址" json:"notify_url"` + ReturnUrl string `gorm:"column:return_url;type:text;not null;default:'';comment:同步地址" json:"return_url"` + NotifyUrl string `gorm:"column:notify_url;type:text;not null;default:'';comment:异步地址" json:"notify_url"` NotifyNum int `gorm:"column:notify_num;not null;default:0;index:idx_order_notify_retry,priority:3;comment:回调次数" json:"notify_num"` NotifyState int `gorm:"column:notify_state;not null;default:0;index:idx_order_notify_retry,priority:2;comment:回调状态 1:成功 0:失败" json:"notify_state"` RefHash string `gorm:"column:ref_hash;type:varchar(128);not null;default:'';index;comment:交易哈希" json:"ref_hash"`