96 lines
2.9 KiB
Plaintext
Executable File
96 lines
2.9 KiB
Plaintext
Executable File
syntax = "v1"
|
|
|
|
info(
|
|
desc: "misc服务接口定义"
|
|
)
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// ai_drawing AI画板
|
|
type (
|
|
GetTodayAiDrawingCountParam {
|
|
Mid []int64 `json:"mid"`
|
|
Dt int `json:"dt"`
|
|
}
|
|
GetTodayAiDrawingCountData {
|
|
Count int64 `json:"count"`
|
|
Buy int64 `json:"buy"`
|
|
ShareData json.RawMessage `json:"share_data"`
|
|
Product *Product `json:"product"`
|
|
Received int64 `json:"received"` // 今日获赠次数
|
|
}
|
|
Product {
|
|
StrId string `json:"str_id"` //产品名
|
|
Price string `json:"price"` //价格
|
|
DayTimes int64 `json:"day_times"` //每日次数
|
|
Days int64 `json:"days"` // 有效时间
|
|
}
|
|
|
|
GetAiDrawingByBriefStrokesParam {
|
|
Mid int64 `json:"mid"`
|
|
SketchId int64 `json:"sketch_id"` //草图id
|
|
Pay int64 `json:"pay"` //首次购买标识
|
|
}
|
|
GetAiDrawingByBriefStrokesData {
|
|
Count int64 `json:"count"`
|
|
Received int64 `json:"received"`
|
|
HCPaintID int64 `json:"hc_paint_id"`
|
|
AiPaintID int64 `json:"ai_paint_id"`
|
|
HCPaintIDUrl string `json:"hc_paint_id_url"`
|
|
AiPaintIDUrl string `json:"ai_paint_id_url"`
|
|
|
|
Status int64 `json:"status"` //-1: 失败 1: 成功获取到结果 2:绘画中 3:排队中
|
|
QueueInfo *QueueInfo `json:"queue_info"` //status = 3时返回
|
|
Buy bool `json:"buy"` //是否购买
|
|
}
|
|
QueueInfo {
|
|
Wait int64 `json:"wait"` //当前排队人数
|
|
Now int64 `json:"now"` //当前我排多少
|
|
T int64 `json:"t"` //大概等待时间
|
|
}
|
|
|
|
AiDrawingInviteInfoParam {
|
|
Uid string `json:"uid"`
|
|
Mid int64 `json:"mid"`
|
|
}
|
|
AiDrawingInviteInfoData {
|
|
LastSketchId int64 `json:"last_sketch_id"`
|
|
}
|
|
|
|
AiDrawingHelpParam {
|
|
Uid string `json:"uid"`
|
|
Mid int64 `json:"mid"`
|
|
}
|
|
AiDrawingHelpData {
|
|
Status int64 `json:"status"`
|
|
}
|
|
)
|
|
|
|
@server(
|
|
prefix: /misc/httpapi
|
|
group: ai_drawing
|
|
)
|
|
service misc {
|
|
@handler GetTodayAiDrawingCountHandler
|
|
post /get_today_ai_drawing_count,/xxx (GetTodayAiDrawingCountParam) returns (GetTodayAiDrawingCountData)
|
|
|
|
@handler GetAiDrawingByBriefStrokesHandler
|
|
post /get_ai_drawing_by_brief_strokes (GetAiDrawingByBriefStrokesParam) returns (GetAiDrawingByBriefStrokesData)
|
|
|
|
@handler AiDrawingInviteInfoHandler
|
|
post /ai_drawing_invite_info (AiDrawingInviteInfoParam) returns (AiDrawingInviteInfoData)
|
|
|
|
@handler AiDrawingHelpHandler
|
|
post /ai_drawing_help (AiDrawingHelpParam) returns (AiDrawingHelpData)
|
|
}
|
|
|
|
@server(
|
|
prefix: /misc/httpapia
|
|
group: xx
|
|
)
|
|
service misc {
|
|
@handler GetTodayAiDrawingCount1Handler
|
|
post /xxx (GetTodayAiDrawingCountParam) returns (GetTodayAiDrawingCountData) opts (is_resp: true)
|
|
} |