package controller import ( "github.com/gin-gonic/gin" "service/api/errcode" previewsproto "service/api/proto/previews/proto" "service/app/mix/service" "service/bizcommon/util" "service/library/logger" ) func ApiGetOriginalImage(ctx *gin.Context) { req := ctx.MustGet("client_req").(*previewsproto.ApiOriginalImageReq) if req.ImageId <= 0 { logger.Error(" ApiGetOriginalImage, invalid param, req: %v", util.ToJson(req)) ReplyErrCodeMsg(ctx, errcode.ErrCodeBadParam) } data, err, ec := service.DefaultService.ApiGetOriginalImage(ctx, req) if err != nil { logger.Error("image ApiGetOriginalImage ApiGetOriginalImage err, req: %v", util.ToJson(req)) ReplyErrCodeMsg(ctx, ec) } ReplyOk(ctx, data) }