Initial commit: web_hghl_server

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 16:28:14 +08:00
co-authored by Claude Opus 4.7
commit 65fca60622
653 changed files with 135901 additions and 0 deletions
+78
View File
@@ -0,0 +1,78 @@
package web_app
import (
"github.com/gin-gonic/gin"
"videoweb/pub/common"
"videoweb/pub/common/log"
"videoweb/pub/common/srvdef"
"videoweb/pub/pubdef"
"videoweb/web/service/srv_app"
)
func AppSyncReq(c *gin.Context) {
var in srv_app.AppVideoInfoSyncReq
if err := c.ShouldBindJSON(&in); err != nil {
common.ServerJSON(c, srvdef.ErrParamError, nil)
return
}
if in.AppId != pubdef.AppId {
common.ServerJSON(c, srvdef.APPIDError, nil)
}
data, err := srv_app.AppVideoInfoSync(c, &in)
if err != nil {
log.Error("AppSyncReq AppVideoInfoSyncReq Failed", log.Any("err", err))
common.ServerJSON(c, err.Code, "")
return
}
common.ServerJSON(c, srvdef.Success, data)
}
func AppCollectionSyncReq(c *gin.Context) {
var in srv_app.AppVideoCollectionSyncReq
if err := c.ShouldBindJSON(&in); err != nil {
common.ServerJSON(c, srvdef.ErrParamError, nil)
return
}
if in.AppId != pubdef.AppId {
common.ServerJSON(c, srvdef.APPIDError, nil)
}
data, err := srv_app.AppVideoCollectionSync(c, &in)
if err != nil {
log.Error("AppCollectionSyncReq AppVideoCollectionSync Failed", log.Any("err", err))
common.ServerJSON(c, err.Code, "")
return
}
common.ServerJSON(c, srvdef.Success, data)
}
func AppGetVideoCategory(c *gin.Context) {
data, err := srv_app.AppCategoryList(c)
if err != nil {
log.Error("AppGetVideoCategory AppCategoryList Failed", log.Any("err", err))
common.ServerJSON(c, err.Code, "")
return
}
common.ServerJSON(c, srvdef.Success, data)
}
func AppGetVideoCreator(c *gin.Context) {
data, err := srv_app.AppCreatorList(c)
if err != nil {
log.Error("AppGetVideoCreator AppCategoryList Failed", log.Any("err", err))
common.ServerJSON(c, err.Code, "")
return
}
common.ServerJSON(c, srvdef.Success, data)
}
func AppGetVideoTag(c *gin.Context) {
data, err := srv_app.AppTagList(c)
if err != nil {
log.Error("AppGetVideoTag AppCategoryList Failed", log.Any("err", err))
common.ServerJSON(c, err.Code, "")
return
}
common.ServerJSON(c, srvdef.Success, data)
}