You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package payment
|
|
|
|
|
|
|
|
import (
|
|
|
|
"cls/pkg/util/page"
|
|
|
|
"xorm.io/builder"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Repository 支付订单仓储接口
|
|
|
|
type PaymentRepository interface {
|
|
|
|
// Create 创建支付订单
|
|
|
|
Create(payment *Payment) error
|
|
|
|
// GetByID 根据ID获取支付订单
|
|
|
|
GetByID(id uint64) (*Payment, error)
|
|
|
|
// GetByOrderNo 根据订单号获取支付订单
|
|
|
|
GetByOrderNo(orderNo string) (*Payment, error)
|
|
|
|
// GetByTransactionID 根据交易号获取支付订单
|
|
|
|
GetByTransactionID(transactionID string) (*Payment, error)
|
|
|
|
// ListByUserID 获取用户支付订单列表
|
|
|
|
ListByUserID(userID uint64, page *page.Page, conds []builder.Cond) error
|
|
|
|
FindAll(page *page.Page, conds []builder.Cond) error
|
|
|
|
// Update 更新支付订单
|
|
|
|
Update(payment *Payment) error
|
|
|
|
// UpdateStatus 更新支付状态
|
|
|
|
UpdateStatus(id uint64, status PaymentStatus) error
|
|
|
|
// Delete 删除支付订单
|
|
|
|
Delete(id uint64) error
|
|
|
|
}
|