diff --git a/api/errcode/errcode.go b/api/errcode/errcode.go index b1b1a0f5..8968009f 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: "商品不存在", @@ -228,6 +229,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 81a5a4b9..335c7a31 100644 --- a/app/mix/service/business_validator/auth.go +++ b/app/mix/service/business_validator/auth.go @@ -668,7 +668,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 } } @@ -683,7 +683,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 } } diff --git a/etc/mix/mix-prod.yaml b/etc/mix/mix-prod.yaml index a1b66eb1..62c076a4 100644 --- a/etc/mix/mix-prod.yaml +++ b/etc/mix/mix-prod.yaml @@ -142,4 +142,8 @@ elastic_search: uri: "http://172.31.37.67:9200" username: "elastic" password: "Wishpal@2024" - sniff: false \ No newline at end of file + sniff: false + +sd: + host: "http://172.31.37.68:8500" + service_name: "mix_online" diff --git a/etc/mix/mix-test.yaml b/etc/mix/mix-test.yaml index ffe0d223..8d55ea7f 100644 --- a/etc/mix/mix-test.yaml +++ b/etc/mix/mix-test.yaml @@ -146,5 +146,5 @@ elastic_search: sniff: false sd: - host: "https://consul.tiefen.fun" + host: "http://172.31.37.68:8500" service_name: "mix_test" diff --git a/library/httpserver/httpserver.go b/library/httpserver/httpserver.go index 06675ecc..6ed1e7fa 100644 --- a/library/httpserver/httpserver.go +++ b/library/httpserver/httpserver.go @@ -91,7 +91,7 @@ func registerSD(ip string, port int) error { } func setServerStatusFD(status string) { - serverStatusFdPath := "/Users/erwin/SERVER_STATUS_FD" + serverStatusFdPath := "/app/SERVER_STATUS_FD" cmd := exec.Command("sh", "-c", fmt.Sprintf("echo %s > %s", status, serverStatusFdPath)) err := cmd.Run() if err != nil {