Files

31 lines
534 B
Go
Raw Permalink Normal View History

2025-10-13 11:27:38 +08:00
package model
type NotifyRecord struct {
Id
Txid string `gorm:"type:varchar(128);uniqueIndex;not null;comment:交易哈希"`
2025-10-13 11:27:38 +08:00
AutoTimeAt
}
func (nr NotifyRecord) TableName() string {
return "bep_notify"
}
func IsNeedNotifyByTxid(txid string) bool {
2026-01-04 22:11:01 +08:00
var record NotifyRecord
var res = Db.Where("txid = ?", txid).Limit(1).Find(&record)
2025-10-13 11:27:38 +08:00
if res.RowsAffected > 0 {
return false
}
2026-01-04 22:11:01 +08:00
var order Order
var res2 = Db.Where("ref_hash = ?", txid).Limit(1).Find(&order)
2025-10-13 11:27:38 +08:00
if res2.RowsAffected > 0 {
return false
}
return true
}