Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop
This commit is contained in:
@@ -70,6 +70,9 @@ func (l *GetFittingByPidLogic) GetFittingByPid(req *types.GetFittingByPidReq, us
|
||||
}
|
||||
partIds := make([]int64, 0, len(modelList))
|
||||
for _, v := range modelList {
|
||||
if v.PartId == nil {
|
||||
continue
|
||||
}
|
||||
partIds = append(partIds, *v.PartId)
|
||||
}
|
||||
//获取配件数据
|
||||
|
||||
@@ -160,8 +160,8 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||
Sn: *v.Sn,
|
||||
Title: *v.Title,
|
||||
TitleCn: *v.TitleCn,
|
||||
Cover: *productInfo.Cover,
|
||||
CoverImg: *productInfo.CoverImg,
|
||||
Cover: *v.Cover,
|
||||
CoverImg: *v.CoverImg,
|
||||
CoverDefault: []types.CoverDefaultItem{},
|
||||
Intro: *v.Intro,
|
||||
IsRecommend: isRecommend,
|
||||
|
||||
@@ -51,6 +51,7 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
|
||||
OrderBy: "`sort` DESC",
|
||||
WithChild: true, //需要子集
|
||||
Category: 1, //前台网站用的
|
||||
Level: 2, //等级是2的
|
||||
}
|
||||
//传入分类id
|
||||
if req.Cid > 0 {
|
||||
@@ -63,8 +64,8 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get tag info")
|
||||
}
|
||||
//前台用的分类是1
|
||||
if *tagData.Category != 1 {
|
||||
//前台用的分类是1,且等级是2
|
||||
if *tagData.Category != 1 && *tagData.Level != 2 {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "invalid tag")
|
||||
}
|
||||
tReq.LevelPrefixLeftLike = *tagData.LevelPrefix
|
||||
|
||||
@@ -10,9 +10,6 @@ import (
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/encryption_decryption"
|
||||
"fusenapi/utils/id_generator"
|
||||
"github.com/google/uuid"
|
||||
"github.com/nfnt/resize"
|
||||
"gorm.io/gorm"
|
||||
"image"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
@@ -22,6 +19,10 @@ import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/nfnt/resize"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"context"
|
||||
|
||||
"fusenapi/server/product/internal/svc"
|
||||
@@ -77,7 +78,7 @@ func (l *SaveDesignLogic) SaveDesign(req *types.SaveDesignReq, userinfo *auth.Us
|
||||
}
|
||||
infoBytes, _ := json.Marshal(postInfo.Data)
|
||||
info := string(infoBytes)
|
||||
now := time.Now()
|
||||
now := time.Now().UTC()
|
||||
logoColorBytes, _ := json.Marshal(postInfo.Data.Logo.Colors)
|
||||
logoColor := string(logoColorBytes)
|
||||
saveData := gmodel.FsProductDesign{
|
||||
|
||||
Reference in New Issue
Block a user