Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop

This commit is contained in:
eson
2023-10-26 10:21:56 +08:00
4 changed files with 18 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package logic
import (
"encoding/json"
"errors"
"fmt"
"fusenapi/constants"
"fusenapi/model/gmodel"
"fusenapi/utils/auth"
@@ -64,6 +65,7 @@ func (l *GetRecommendProductListLogic) GetRecommendProductList(req *types.GetRec
recommendProductList = recommendProductList[:req.Num]
}
}
fmt.Println(recommendProductList)
//资源id集合
resourceIds := make([]string, 0, 50)
//需要填充时需要忽略的id

View File

@@ -81,7 +81,13 @@ func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendR
MysqlConn: l.svcCtx.MysqlConn,
AwsSession: l.svcCtx.AwsSession,
}
var resourceId string = hash.JsonHashKey(req.FileKey)
var resourceId string
if len(req.FileKey) == 64 {
resourceId = req.FileKey
} else {
resourceId = hash.JsonHashKey(req.FileKey)
}
uploadRes, err := upload.UploadFileByByte(&file.UploadBaseReq{
FileHash: resourceId,
FileByte: ioData,