package web_playlet import ( "hkdj-web-server/pub/common" "hkdj-web-server/pub/common/srvdef" "hkdj-web-server/web/api/proto" "hkdj-web-server/web/service/srv_playlet" "github.com/gin-gonic/gin" ) // Sales web端短剧销售数据 // @Tags web短剧相关接口 // @Summary web端短剧销售数据 // @Description 按北京时间区间汇总金币解锁、短剧点赞、短剧收藏,最多返回前50条 // @Accept json // @Produce json // @Param params query proto.PlayletSalesReq true "销售数据筛选" // @Success 200 {object} proto.PlayletSalesResp "成功" // @Failure 400 {string} string "失败" // @Security ApiKeyAuth // @Router /api/web/playlet/sales [get] func Sales(ctx *gin.Context) { var req proto.PlayletSalesReq if err := ctx.ShouldBindQuery(&req); err != nil { common.ServerJSON(ctx, srvdef.ErrParamError, nil) return } resp, err := srv_playlet.ListPlayletSales(ctx, &req) if err != nil { common.ServerJSON(ctx, err.Code, err.Tips) return } common.ServerJSON(ctx, srvdef.Success, resp) }