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

This commit is contained in:
eson
2023-08-08 14:18:45 +08:00
115 changed files with 3189 additions and 504 deletions

6
server/product/Dockerfile Executable file
View File

@@ -0,0 +1,6 @@
FROM alpine
WORKDIR /www/fusenapi/
COPY ./bin/api-product-srv /www/fusenapi/
COPY ./etc /www/fusenapi/etc
CMD ["/www/fusenapi/api-product-srv"]

View File

@@ -50,6 +50,7 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
Status: &tStatus,
OrderBy: "`sort` DESC",
WithChild: true, //需要子集
Category: 1, //前台网站用的
}
//传入分类id
if req.Cid > 0 {
@@ -62,6 +63,9 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get tag info")
}
if *tagData.Category != 1 {
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "invalid tag")
}
tReq.LevelPrefixLeftLike = *tagData.LevelPrefix
}
tagList, err := l.svcCtx.AllModels.FsTags.GetAllTagByParams(l.ctx, tReq)
@@ -220,7 +224,7 @@ func (l *GetTagProductListLogic) dealWithTagMenuData(req dealWithTagMenuDataReq)
*req.MinLevel = lenLevel
}
tagTem := types.TagItem{
TagProductList: nil,
TagProductList: []interface{}{},
TypeName: *tagInfo.Title,
TypeId: tagInfo.Id,
Icon: *tagInfo.Icon,