This commit is contained in:
laodaming 2023-07-19 16:51:08 +08:00
parent e24fc4825c
commit 7ebc7f8476

View File

@ -187,7 +187,7 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
//map tag菜单
mapTagLevel := make(map[string]*types.TagItem)
//处理tags数据
l.delWithTagMenuData(delWithTagMenuDataReq{
if err = l.dealWithTagMenuData(dealWithTagMenuDataReq{
TagList: tagList,
WithProduct: req.WithProduct,
WithRecommendProduct: req.WithRecommendProduct,
@ -199,7 +199,10 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
MapProduct: mapProduct,
Size: req.Size,
user: user,
})
});err != nil{
logx.Error(err)
return resp.SetStatusAddMessage(basic.CodeServiceErr,"failed to dealwith ")
}
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetTagProductListRsp{
TotalCategory: len(mapTagLevel),
TagList: l.organizationLevelRelation(mapTagLevel),//组装等级从属关系
@ -211,7 +214,7 @@ type sortRecommendProduct struct {
Sort int64
}
//处理tag菜单数据
type delWithTagMenuDataReq struct {
type dealWithTagMenuDataReq struct {
TagList []gmodel.FsTags
WithProduct bool
WithRecommendProduct bool
@ -224,7 +227,7 @@ type delWithTagMenuDataReq struct {
Size uint32
user gmodel.FsUser
}
func (l *GetTagProductListLogic)delWithTagMenuData(req delWithTagMenuDataReq)error{
func (l *GetTagProductListLogic)dealWithTagMenuData(req dealWithTagMenuDataReq)error{
for _, tagInfo := range req.TagList {
tagTem := types.TagItem{
TagProductList: nil,