feat(quota): enhance quota task management with new request structures and processing logic
This commit is contained in:
+31
-31
@@ -53,9 +53,9 @@ type (
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
GetPreSendEmailCountRequest {
|
||||
Scope string `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time,omitempty"`
|
||||
RegisterEndTime int64 `json:"register_end_time,omitempty"`
|
||||
Scope int8 `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time,omitempty"`
|
||||
RegisterEndTime int64 `json:"register_end_time,omitempty"`
|
||||
}
|
||||
GetPreSendEmailCountResponse {
|
||||
Count int64 `json:"count"`
|
||||
@@ -70,33 +70,38 @@ type (
|
||||
Errors string `json:"errors"`
|
||||
}
|
||||
CreateQuotaTaskRequest {
|
||||
Scope int8 `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time"`
|
||||
RegisterEndTime int64 `json:"register_end_time"`
|
||||
QuotaType uint8 `json:"quota_type"`
|
||||
Days uint64 `json:"days"` // Number of days for the quota
|
||||
Gift uint8 `json:"gift"` // Invoice amount ratio(%) to gift amount for quota
|
||||
Subscribers []int64 `json:"subscribers"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
EndTime int64 `json:"end_time"`
|
||||
ResetTraffic bool `json:"reset_traffic"`
|
||||
Days uint64 `json:"days"`
|
||||
GiftType uint8 `json:"gift_type"`
|
||||
GiftValue uint64 `json:"gift_value"`
|
||||
}
|
||||
QuotaTask {
|
||||
Id int64 `json:"id"`
|
||||
Scope int8 `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time"`
|
||||
RegisterEndTime int64 `json:"register_end_time"`
|
||||
QuotaType uint8 `json:"quota_type"`
|
||||
Days uint64 `json:"days"` // Number of days for the quota
|
||||
Gift uint8 `json:"gift"` // Invoice amount ratio(%) to gift
|
||||
Recipients []int64 `json:"recipients"` // UserSubscribe IDs of recipients
|
||||
Status uint8 `json:"status"`
|
||||
Total int64 `json:"total"`
|
||||
Current int64 `json:"current"`
|
||||
Errors string `json:"errors"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
Id int64 `json:"id"`
|
||||
Subscribers []int64 `json:"subscribers"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
EndTime int64 `json:"end_time"`
|
||||
ResetTraffic bool `json:"reset_traffic"`
|
||||
Days uint64 `json:"days"`
|
||||
GiftType uint8 `json:"gift_type"`
|
||||
GiftValue uint64 `json:"gift_value"`
|
||||
Objects []int64 `json:"objects"` // UserSubscribe IDs
|
||||
Status uint8 `json:"status"`
|
||||
Total int64 `json:"total"`
|
||||
Current int64 `json:"current"`
|
||||
Errors string `json:"errors"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
QueryQuotaTaskPreCountRequest {
|
||||
Scope uint8 `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time"`
|
||||
RegisterEndTime int64 `json:"register_end_time"`
|
||||
Subscribers []int64 `json:"subscribers"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
EndTime int64 `json:"end_time"`
|
||||
}
|
||||
QueryQuotaTaskPreCountResponse {
|
||||
Count int64 `json:"count"`
|
||||
@@ -104,7 +109,6 @@ type (
|
||||
QueryQuotaTaskListRequest {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Scope *uint8 `form:"scope,omitempty"`
|
||||
Status *uint8 `form:"status,omitempty"`
|
||||
}
|
||||
QueryQuotaTaskListResponse {
|
||||
@@ -159,9 +163,5 @@ service ppanel {
|
||||
@doc "Query quota task list"
|
||||
@handler QueryQuotaTaskList
|
||||
get /quota/list (QueryQuotaTaskListRequest) returns (QueryQuotaTaskListResponse)
|
||||
|
||||
@doc "Query quota task status"
|
||||
@handler QueryQuotaTaskStatus
|
||||
post /quota/status (QueryQuotaTaskStatusRequest) returns (QueryQuotaTaskStatusResponse)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user