56 lines
1.8 KiB
Plaintext
Executable File
56 lines
1.8 KiB
Plaintext
Executable File
syntax = "v1"
|
|
|
|
info(
|
|
desc: "review gateway服务接口定义"
|
|
)
|
|
|
|
import "git.ixiaochuan.cn/zeus/service_base/mtypes/reviewmtypes"
|
|
|
|
type (
|
|
PostReviewParam {
|
|
Pid int64 `json:"pid" validate:"gt=0"`
|
|
Localid interface{} `json:"localid"`
|
|
Videos []int64 `json:"videos,omitempty"`
|
|
Imgs []int64 `json:"imgs,omitempty"`
|
|
Audio *AudioSt `json:"audio,omitempty"`
|
|
Review string `json:"review,omitempty"`
|
|
BubbleId string `json:"bubble_id"` //新加字段,表示装饰气泡
|
|
BubbleKind int64 `json:"bubble_kind"` //气泡种类
|
|
AtUsers map[string]*reviewmtypes.AtUserInfo `json:"at_users"`
|
|
IsUseCloudRes bool `json:"is_use_cloud_res"`
|
|
Fid int64 `json:"fid"` // 斗视频播单id
|
|
}
|
|
AudioSt {
|
|
Dur int32 `json:"dur"`
|
|
Uri string `json:"uri"`
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
PostReviewData {}
|
|
)
|
|
|
|
@server(
|
|
prefix: /review
|
|
group: review
|
|
check_permission: true
|
|
check_freq: false
|
|
)
|
|
service gateway {
|
|
@handler PostReviewHandler
|
|
post /post_review (PostReviewParam) returns (PostReviewData)
|
|
}
|
|
|
|
dag PostReviewHandler (
|
|
// 请求参数预处理:基础参数检查、设备/用户/帖子/话题检查
|
|
RequestParamPreprocess (
|
|
dependency [comm_CheckPermission]
|
|
)
|
|
CreateReview (
|
|
dependency [RequestParamPreprocess]
|
|
)
|
|
// 数据后置更新:审核、计数更新、音频转码&图片更新、话题帖子feed留更新
|
|
DataProcess (
|
|
dependency [RequestParamPreprocess, CreateReview]
|
|
)
|
|
)
|