接口对接

This commit is contained in:
2026-04-21 13:31:10 +08:00
parent adb6da1d70
commit 33cb945846
8 changed files with 119 additions and 47 deletions

View File

@@ -20,13 +20,14 @@ type CreateAnchorReq struct {
// CreateAnchorRes 创建主播响应
type CreateAnchorRes struct {
Id int64 `json:"id" dc:"主播ID"`
Id int64 `json:"id,string" dc:"主播ID"`
}
// ListAnchorReq 获取主播列表请求
type ListAnchorReq struct {
g.Meta `path:"/listAnchors" method:"get" tags:"主播管理" summary:"获取主播列表" dc:"分页查询主播列表"`
*beans.Page
Id int64 `json:"id,string" dc:"主播ID"`
Name string `json:"name" dc:"主播姓名"`
Phone string `json:"phone" dc:"联系电话"`
Code string `json:"code" dc:"工号"`
@@ -56,7 +57,7 @@ type AnchorItem struct {
// GetAnchorReq 获取主播详情请求
type GetAnchorReq struct {
g.Meta `path:"/getAnchor" method:"get" tags:"主播管理" summary:"获取主播详情" dc:"获取主播详情"`
Id int64 `json:"id" v:"required" dc:"主播ID"`
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
}
// GetAnchorRes 获取主播详情响应
@@ -67,7 +68,7 @@ type GetAnchorRes struct {
// UpdateAnchorReq 更新主播请求
type UpdateAnchorReq struct {
g.Meta `path:"/updateAnchor" method:"put" tags:"主播管理" summary:"更新主播" dc:"更新主播信息"`
Id int64 `json:"id" v:"required" dc:"主播ID"`
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
Name string `json:"name" dc:"主播姓名"`
Phone string `json:"phone" dc:"联系电话"`
Code string `json:"code" dc:"工号"`
@@ -78,12 +79,12 @@ type UpdateAnchorReq struct {
// DeleteAnchorReq 删除主播请求
type DeleteAnchorReq struct {
g.Meta `path:"/deleteAnchor" method:"delete" tags:"主播管理" summary:"删除主播" dc:"删除主播"`
Id int64 `json:"id" v:"required" dc:"主播ID"`
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
}
// UpdateAnchorStatusReq 更新主播状态请求
type UpdateAnchorStatusReq struct {
g.Meta `path:"/updateAnchorStatus" method:"put" tags:"主播管理" summary:"更新主播状态" dc:"更新主播状态"`
Id int64 `json:"id" v:"required" dc:"主播ID"`
Id int64 `json:"id,string" v:"required" dc:"主播ID"`
Status data.AnchorStatus `json:"status" v:"required" dc:"状态0停用 1正常"`
}