v1.0.0
This commit is contained in:
@@ -8,6 +8,12 @@ type ListSubscriptionsQuery struct {
|
||||
Keyword string `json:"keyword"`
|
||||
SortBy string `json:"sort_by"`
|
||||
SortOrder string `json:"sort_order"`
|
||||
|
||||
// 新增筛选字段
|
||||
CompanyName string `json:"company_name"` // 企业名称
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
StartTime string `json:"start_time"` // 订阅开始时间
|
||||
EndTime string `json:"end_time"` // 订阅结束时间
|
||||
}
|
||||
|
||||
// GetSubscriptionQuery 获取订阅详情查询
|
||||
|
||||
@@ -22,6 +22,7 @@ type SubscriptionRepository interface {
|
||||
// 统计方法
|
||||
CountByUser(ctx context.Context, userID string) (int64, error)
|
||||
CountByProduct(ctx context.Context, productID string) (int64, error)
|
||||
GetTotalRevenue(ctx context.Context) (float64, error)
|
||||
|
||||
// 乐观锁更新方法
|
||||
IncrementAPIUsageWithOptimisticLock(ctx context.Context, subscriptionID string, increment int64) error
|
||||
|
||||
Reference in New Issue
Block a user