同步历史版本代码
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user