This commit is contained in:
Leufolium 2024-05-21 23:16:20 +08:00
commit acb3e2fc24
5 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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
}
}

View File

@ -142,4 +142,8 @@ elastic_search:
uri: "http://172.31.37.67:9200"
username: "elastic"
password: "Wishpal@2024"
sniff: false
sniff: false
sd:
host: "http://172.31.37.68:8500"
service_name: "mix_online"

View File

@ -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"

View File

@ -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 {