完善任务接口逻辑以及Eran事件上报接入
This commit is contained in:
@@ -20,22 +20,22 @@ service novatask {
|
||||
}
|
||||
|
||||
type GetTaskListReq {
|
||||
CommunityId uint `form:"community_id"`
|
||||
CommunityId uint `form:"community_id,optional"` // 所属社区ID
|
||||
}
|
||||
|
||||
type Task {
|
||||
Id uint `json:"id"`
|
||||
CommunityId uint `json:"community_id"`
|
||||
Title string `json:"title"`
|
||||
SubTitle string `json:"sub_title"`
|
||||
Description string `json:"description"`
|
||||
Points int `json:"points"`
|
||||
ButtonText string `json:"button_text"`
|
||||
Type int8 `json:"type"`
|
||||
Url string `json:"url"`
|
||||
Status int8 `json:"status"`
|
||||
StartAt string `json:"start_at"`
|
||||
EndAt string `json:"end_at"`
|
||||
Id uint `json:"id"` // 任务ID
|
||||
CommunityId uint `json:"community_id"` // 所属社区ID
|
||||
Title string `json:"title"` // 任务标题
|
||||
SubTitle string `json:"sub_title"` // 副标题
|
||||
Description string `json:"description"` // 任务描述
|
||||
Points int `json:"points"` // 任务积分
|
||||
ButtonText string `json:"button_text"` // 按钮文字
|
||||
Type int8 `json:"type"` // 任务类型: 0=follow_twitter,1=bind_twitter,2=cast_twitter,3=publish_twitter,4=repost_twitter,5=watch_youtube,6=follow_youtube,7=bind_discord,8=join_telegram,9=daily_pay
|
||||
Url string `json:"url"` // 跳转链接
|
||||
Status int8 `json:"status"` // 任务状态: 0=不启用,1=启用
|
||||
StartAt string `json:"start_at"` // 开始时间
|
||||
EndAt string `json:"end_at"` // 结束时间
|
||||
FinishState int8 `json:"finish_state"` // 0:未完成 1:待校验 2:已完成未领取 3:已领取
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ type GetTaskListResp {
|
||||
}
|
||||
|
||||
type TaskIdPath {
|
||||
ID uint `path:"id"`
|
||||
ID uint `path:"id"` // 任务ID
|
||||
}
|
||||
|
||||
type VerifyTaskResultResp {
|
||||
Finish bool `json:"finish"`
|
||||
Finish bool `json:"finish"` // 是否完成
|
||||
}
|
||||
|
||||
type GetTaskRewardResp {
|
||||
Points int `json:"points"`
|
||||
Points int `json:"points"` // 积分
|
||||
}
|
||||
|
||||
|
||||
@@ -90,8 +90,9 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "community_id",
|
||||
"description": " 所属社区ID",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "uint32"
|
||||
}
|
||||
@@ -116,13 +117,11 @@
|
||||
"properties": {
|
||||
"community_id": {
|
||||
"type": "integer",
|
||||
"format": "uint32"
|
||||
"format": "uint32",
|
||||
"description": " 所属社区ID"
|
||||
}
|
||||
},
|
||||
"title": "GetTaskListReq",
|
||||
"required": [
|
||||
"community_id"
|
||||
]
|
||||
"title": "GetTaskListReq"
|
||||
},
|
||||
"GetTaskListResp": {
|
||||
"type": "object",
|
||||
@@ -144,7 +143,8 @@
|
||||
"properties": {
|
||||
"points": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"format": "int32",
|
||||
"description": " 积分"
|
||||
}
|
||||
},
|
||||
"title": "GetTaskRewardResp",
|
||||
@@ -157,44 +157,56 @@
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "uint32"
|
||||
"format": "uint32",
|
||||
"description": " 任务ID"
|
||||
},
|
||||
"community_id": {
|
||||
"type": "integer",
|
||||
"format": "uint32"
|
||||
"format": "uint32",
|
||||
"description": " 所属社区ID"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 任务标题"
|
||||
},
|
||||
"sub_title": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 副标题"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 任务描述"
|
||||
},
|
||||
"points": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"format": "int32",
|
||||
"description": " 任务积分"
|
||||
},
|
||||
"button_text": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 按钮文字"
|
||||
},
|
||||
"type": {
|
||||
"type": "integer",
|
||||
"format": "int8"
|
||||
"format": "int8",
|
||||
"description": " 任务类型: 0=follow_twitter,1=bind_twitter,2=cast_twitter,3=publish_twitter,4=repost_twitter,5=watch_youtube,6=follow_youtube,7=bind_discord,8=join_telegram,9=daily_pay"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 跳转链接"
|
||||
},
|
||||
"status": {
|
||||
"type": "integer",
|
||||
"format": "int8"
|
||||
"format": "int8",
|
||||
"description": " 任务状态: 0=不启用,1=启用"
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 开始时间"
|
||||
},
|
||||
"end_at": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": " 结束时间"
|
||||
},
|
||||
"finish_state": {
|
||||
"type": "integer",
|
||||
@@ -228,7 +240,8 @@
|
||||
"properties": {
|
||||
"finish": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
"format": "boolean",
|
||||
"description": " 是否完成"
|
||||
}
|
||||
},
|
||||
"title": "VerifyTaskResultResp",
|
||||
|
||||
Reference in New Issue
Block a user