From 1d2d8b1cc5bf6e5e96bcb29aa5dc92fcadd029ae Mon Sep 17 00:00:00 2001 From: Leufolium Date: Tue, 21 May 2024 22:12:59 +0800 Subject: [PATCH] by Robin at 20240521 --- api/errcode/errcode.go | 2 ++ app/mix/service/business_validator/auth.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/errcode/errcode.go b/api/errcode/errcode.go index 5643d0a1..597e6d4f 100644 --- a/api/errcode/errcode.go +++ b/api/errcode/errcode.go @@ -17,6 +17,7 @@ var ErrCodeMsgMap = map[ErrCode]string{ ErrCodeBadParam: "参数错误", ErrCodeFunctionBlocked: "功能封禁中,截止时间:%s", ErrCodeFunctionBlockedPermanently: "该功能已被永久封禁", + ErrCodeMediaUploadFailPleaseCheck: "媒体上传失败,请检查网络或文件大小后重试", ErrCodeProductSrvFail: "商品服务错误", ErrCodeProductNotExist: "商品不存在", @@ -227,6 +228,7 @@ const ( ErrCodeBadParam ErrCode = -30 // 参数错误 ErrCodeFunctionBlocked ErrCode = -40 // 功能封禁中 ErrCodeFunctionBlockedPermanently ErrCode = -41 // 功能永久封禁 + ErrCodeMediaUploadFailPleaseCheck ErrCode = -50 // 媒体上传失败,请检查网络或文件大小后重试 // Product: 1xxx ErrCodeProductSrvOk ErrCode = ErrCodeOk diff --git a/app/mix/service/business_validator/auth.go b/app/mix/service/business_validator/auth.go index f8a866e7..5d917529 100644 --- a/app/mix/service/business_validator/auth.go +++ b/app/mix/service/business_validator/auth.go @@ -574,7 +574,7 @@ func (l *AuthBusinessValidator) EnsureMediaIsSuccessfullyUploaded(media *dbstruc } for _, imageId := range media.GetImageIds() { if int64(imageIdForUploadFail) == imageId { - l.ec = errcode.ErrCodeMediaUploadFail + l.ec = errcode.ErrCodeMediaUploadFailPleaseCheck return } } @@ -589,7 +589,7 @@ func (l *AuthBusinessValidator) EnsureMediaIsSuccessfullyUploaded(media *dbstruc } for _, videoId := range media.GetVideoIds() { if int64(videoIdForUploadFail) == videoId { - l.ec = errcode.ErrCodeMediaUploadFail + l.ec = errcode.ErrCodeMediaUploadFailPleaseCheck return } }