Initial commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-09-29 11:47:47 +07:00
co-authored by Claude Opus 5.5
commit 0fbdba5ccf
622 changed files with 72105 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
package playletser
import (
"fmt"
"videoweb/app/service/upstream"
"github.com/gin-gonic/gin"
)
const forwardHeatPath = "/api/app/playlet/forward/heat"
// PlayletForwardHeatReq 对应 swagger proto.PlayletForwardHeatReq
type PlayletForwardHeatReq struct {
ID int64 `json:"id"`
}
// PlayletForwardHeatResp 对应 swagger proto.PlayletForwardHeatResp
type PlayletForwardHeatResp struct {
ID int64 `json:"id"`
HeatValue int64 `json:"heatValue"`
}
// ForwardHeat 短剧转发增加热度。
func ForwardHeat(c *gin.Context, req PlayletForwardHeatReq) (*APIEnvelope[PlayletForwardHeatResp], error) {
if req.ID <= 0 {
return nil, fmt.Errorf("playlet forward heat invalid id")
}
var env APIEnvelope[PlayletForwardHeatResp]
if _, err := upstream.PostJSON(c, forwardHeatPath, req, &env); err != nil {
return nil, err
}
return &env, nil
}