同步历史版本代码

This commit is contained in:
2026-03-03 09:32:22 -08:00
parent 7d46b31866
commit 4d8516b2e1
140 changed files with 8399 additions and 489 deletions
+9
View File
@@ -12,6 +12,7 @@ type customPaymentLogicModel interface {
FindAll(ctx context.Context) ([]*Payment, error)
FindListByPage(ctx context.Context, page, size int, req *Filter) (int64, []*Payment, error)
FindAvailableMethods(ctx context.Context) ([]*Payment, error)
FindListByPlatform(ctx context.Context, platform string) ([]*Payment, error)
}
// NewModel returns a model for the database table.
@@ -67,3 +68,11 @@ func (m *customPaymentModel) FindListByPage(ctx context.Context, page, size int,
})
return total, resp, err
}
func (m *customPaymentModel) FindListByPlatform(ctx context.Context, platform string) ([]*Payment, error) {
var resp []*Payment
err := m.QueryNoCacheCtx(ctx, &resp, func(conn *gorm.DB, v interface{}) error {
return conn.Model(&Payment{}).Where("mark = ?", platform).Find(v).Error
})
return resp, err
}