Merge branch 'conf' of http://121.41.31.146:3000/wishpal_ironfan/service into conf
This commit is contained in:
commit
acb3e2fc24
|
@ -17,6 +17,7 @@ var ErrCodeMsgMap = map[ErrCode]string{
|
||||||
ErrCodeBadParam: "参数错误",
|
ErrCodeBadParam: "参数错误",
|
||||||
ErrCodeFunctionBlocked: "功能封禁中,截止时间:%s",
|
ErrCodeFunctionBlocked: "功能封禁中,截止时间:%s",
|
||||||
ErrCodeFunctionBlockedPermanently: "该功能已被永久封禁",
|
ErrCodeFunctionBlockedPermanently: "该功能已被永久封禁",
|
||||||
|
ErrCodeMediaUploadFailPleaseCheck: "媒体上传失败,请检查网络或文件大小后重试",
|
||||||
|
|
||||||
ErrCodeProductSrvFail: "商品服务错误",
|
ErrCodeProductSrvFail: "商品服务错误",
|
||||||
ErrCodeProductNotExist: "商品不存在",
|
ErrCodeProductNotExist: "商品不存在",
|
||||||
|
@ -228,6 +229,7 @@ const (
|
||||||
ErrCodeBadParam ErrCode = -30 // 参数错误
|
ErrCodeBadParam ErrCode = -30 // 参数错误
|
||||||
ErrCodeFunctionBlocked ErrCode = -40 // 功能封禁中
|
ErrCodeFunctionBlocked ErrCode = -40 // 功能封禁中
|
||||||
ErrCodeFunctionBlockedPermanently ErrCode = -41 // 功能永久封禁
|
ErrCodeFunctionBlockedPermanently ErrCode = -41 // 功能永久封禁
|
||||||
|
ErrCodeMediaUploadFailPleaseCheck ErrCode = -50 // 媒体上传失败,请检查网络或文件大小后重试
|
||||||
|
|
||||||
// Product: 1xxx
|
// Product: 1xxx
|
||||||
ErrCodeProductSrvOk ErrCode = ErrCodeOk
|
ErrCodeProductSrvOk ErrCode = ErrCodeOk
|
||||||
|
|
|
@ -668,7 +668,7 @@ func (l *AuthBusinessValidator) EnsureMediaIsSuccessfullyUploaded(media *dbstruc
|
||||||
}
|
}
|
||||||
for _, imageId := range media.GetImageIds() {
|
for _, imageId := range media.GetImageIds() {
|
||||||
if int64(imageIdForUploadFail) == imageId {
|
if int64(imageIdForUploadFail) == imageId {
|
||||||
l.ec = errcode.ErrCodeMediaUploadFail
|
l.ec = errcode.ErrCodeMediaUploadFailPleaseCheck
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,7 +683,7 @@ func (l *AuthBusinessValidator) EnsureMediaIsSuccessfullyUploaded(media *dbstruc
|
||||||
}
|
}
|
||||||
for _, videoId := range media.GetVideoIds() {
|
for _, videoId := range media.GetVideoIds() {
|
||||||
if int64(videoIdForUploadFail) == videoId {
|
if int64(videoIdForUploadFail) == videoId {
|
||||||
l.ec = errcode.ErrCodeMediaUploadFail
|
l.ec = errcode.ErrCodeMediaUploadFailPleaseCheck
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,4 +142,8 @@ elastic_search:
|
||||||
uri: "http://172.31.37.67:9200"
|
uri: "http://172.31.37.67:9200"
|
||||||
username: "elastic"
|
username: "elastic"
|
||||||
password: "Wishpal@2024"
|
password: "Wishpal@2024"
|
||||||
sniff: false
|
sniff: false
|
||||||
|
|
||||||
|
sd:
|
||||||
|
host: "http://172.31.37.68:8500"
|
||||||
|
service_name: "mix_online"
|
||||||
|
|
|
@ -146,5 +146,5 @@ elastic_search:
|
||||||
sniff: false
|
sniff: false
|
||||||
|
|
||||||
sd:
|
sd:
|
||||||
host: "https://consul.tiefen.fun"
|
host: "http://172.31.37.68:8500"
|
||||||
service_name: "mix_test"
|
service_name: "mix_test"
|
||||||
|
|
|
@ -91,7 +91,7 @@ func registerSD(ip string, port int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setServerStatusFD(status string) {
|
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))
|
cmd := exec.Command("sh", "-c", fmt.Sprintf("echo %s > %s", status, serverStatusFdPath))
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue