fix:重构合图模块

This commit is contained in:
Hiven 2023-08-15 16:14:12 +08:00
parent e8f7bda7b2
commit 10b4b6656f
3 changed files with 14 additions and 18 deletions

View File

@ -15,8 +15,8 @@ AWS:
Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm
Token: Token:
BLMService: BLMService:
Url: "http://18.119.109.254:8999" # Url: "http://18.119.109.254:8999"
# Url: "http://192.168.1.7:8999" Url: "http://192.168.1.7:8999"
LogoCombine: LogoCombine:
#Url: "http://192.168.1.7:8999/LogoCombine" #Url: "http://192.168.1.7:8999/LogoCombine"
Url: "http://18.119.109.254:8999/LogoCombine" Url: "http://18.119.109.254:8999/LogoCombine"

View File

@ -16,5 +16,5 @@ AWS:
Token: Token:
BLMService: BLMService:
ImageProcess: ImageProcess:
#Url: "http://192.168.1.7:45678/FeatureExtraction" Url: "http://192.168.1.7:8999/FeatureExtraction"
Url: "http://18.119.109.254:8999/FeatureExtraction" # Url: "http://18.119.109.254:8999/FeatureExtraction"

View File

@ -44,22 +44,18 @@ func NewUploadFileBackendLogic(r *http.Request, svcCtx *svc.ServiceContext) *Upl
func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendReq, userinfo *auth.UserInfo) (resp *basic.Response) { func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendReq, userinfo *auth.UserInfo) (resp *basic.Response) {
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
// userinfo 传入值时, 一定不为null // userinfo 传入值时, 一定不为null
if userinfo.IsOnlooker() { var userId int64 = 0
// 如果是,返回未授权的错误码 var guestId int64 = 0
return resp.SetStatus(basic.CodeUnAuth)
}
// 定义用户ID和S3键名格式
var userId int64
var guestId int64
// 检查用户是否是游客 // 检查用户是否是游客
if userinfo.IsGuest() { if userinfo != nil {
// 如果是使用游客ID和游客键名格式 if userinfo.IsGuest() {
guestId = userinfo.GuestId // 如果是使用游客ID和游客键名格式
} else { guestId = userinfo.GuestId
// 否则使用用户ID和用户键名格式 } else {
userId = userinfo.UserId // 否则使用用户ID和用户键名格式
userId = userinfo.UserId
}
} }
//设置内存大小 //设置内存大小