package controller import ( "service/api/errcode" realname_authenticationproto "service/api/proto/realname_authentication/proto" "service/app/mix/service" "service/bizcommon/util" "service/library/logger" "github.com/gin-gonic/gin" ) func ApiCreateRealNameAuthentication(ctx *gin.Context) { req := ctx.MustGet("client_req").(*realname_authenticationproto.ApiCreateReq) ec := service.DefaultService.ApiCreateRealNameAuthentication(ctx, req) if ec != errcode.ErrCodeRealNameAuthenticationSrvOk { logger.Error("OpCreateRealNameAuthentication fail, req: %v, ec: %v", util.ToJson(req), ec) ReplyErrCodeMsg(ctx, ec) return } ReplyOk(ctx, nil) } func ApiGetRealNameAuthenticationList(ctx *gin.Context) { req := ctx.MustGet("client_req").(*realname_authenticationproto.ApiListReq) vo, ec := service.DefaultService.ApiGetRealNameAuthenticationListByMid(ctx, req) if ec != errcode.ErrCodeRealNameAuthenticationSrvOk { logger.Error("ApiGetRealNameAuthenticationListByMid fail, req: %v, ec: %v", util.ToJson(req), ec) ReplyErrCodeMsg(ctx, ec) return } data := &realname_authenticationproto.ApiListData{ RealNameAuthenticationApiVO: vo, } ReplyOk(ctx, data) }