2024-07-02 05:49:27 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"service/api/errcode"
|
|
|
|
streamerauthapprovalbasicproto "service/api/proto/streamerauthapprovalbasic/proto"
|
|
|
|
"service/app/mix/service"
|
|
|
|
"service/bizcommon/util"
|
|
|
|
"service/library/logger"
|
|
|
|
"service/library/mediafiller"
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ApiCreateStreamerAuthApprovalBasic(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*streamerauthapprovalbasicproto.ApiCreateReq)
|
|
|
|
ec := service.DefaultService.ApiCreateStreamerAuthApprovalBasic(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeStreamerAuthApprovalBasicSrvOk {
|
|
|
|
logger.Error("ApiCreateStreamerAuthApproval fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ApiDeleteStreamerAuthApprovalBasic(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*streamerauthapprovalbasicproto.ApiDeleteReq)
|
|
|
|
ec := service.DefaultService.ApiDeleteStreamerAuthApprovalBasic(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeStreamerAuthApprovalBasicSrvOk {
|
|
|
|
logger.Error("ApiDeleteStreamerAuthApproval fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ApiGetStreamerAuthApprovalBasicList(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*streamerauthapprovalbasicproto.ApiListReq)
|
|
|
|
|
|
|
|
streamerauthapprovalbasic, ec := service.DefaultService.ApiGetStreamerAuthApprovalBasicList(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeStreamerAuthApprovalBasicSrvOk {
|
|
|
|
logger.Error("ApiGetStreamerAuthApprovalList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//填充媒体切片
|
2024-07-09 21:02:18 +08:00
|
|
|
objectMediaNum := 2 // 单个女神认证审批服务总共3个媒体类
|
2024-07-02 05:49:27 +08:00
|
|
|
mediaFillableList := make([]mediafiller.MediaFillable, objectMediaNum)
|
|
|
|
mediaFillableList[0] = streamerauthapprovalbasic.Avatar
|
|
|
|
mediaFillableList[1] = streamerauthapprovalbasic.AccountShot
|
|
|
|
mediafiller.FillList(ctx, mediaFillableList)
|
|
|
|
|
|
|
|
data := &streamerauthapprovalbasicproto.ApiListData{
|
|
|
|
StreamerAuthApprovalBasicApiVO: streamerauthapprovalbasic,
|
|
|
|
}
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|