来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 lines
854 B
Go
32 lines
854 B
Go
package usercenterapi
|
|
|
|
import (
|
|
"hkdj-web-server/app/api/proto"
|
|
"hkdj-web-server/app/service/usercenterser"
|
|
"hkdj-web-server/pub/common"
|
|
"hkdj-web-server/pub/common/srvdef"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// Data app个人中心数据
|
|
// @Tags app个人中心相关接口
|
|
// @Summary app个人中心数据 --by 王鸣
|
|
// @Description 返回当前用户观看、收藏、追剧中、已购剧集统计
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Success 200 {object} proto.UserCenterDataResp "成功"
|
|
// @Failure 400 {string} string "失败"
|
|
// @Security ApiKeyAuth
|
|
// @Router /api/app/user/center/data [get]
|
|
func Data(ctx *gin.Context) {
|
|
resp, err := usercenterser.Data(ctx, common.GetUserId(ctx))
|
|
if err != nil {
|
|
common.ServerJSON(ctx, err.Code, err.Tips)
|
|
return
|
|
}
|
|
common.ServerJSON(ctx, srvdef.Success, resp)
|
|
}
|
|
|
|
var _ = proto.UserCenterDataResp{}
|