diff --git a/server/shopping-cart/internal/logic/getcartslogic.go b/server/shopping-cart/internal/logic/getcartslogic.go index 8240ba5c..973b5c6a 100644 --- a/server/shopping-cart/internal/logic/getcartslogic.go +++ b/server/shopping-cart/internal/logic/getcartslogic.go @@ -155,6 +155,10 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo productCoverMetadata = metadata } } + templateTag := "" + if templateInfo, ok := mapTemplate[*cart.TemplateId]; ok { + templateTag = *templateInfo.TemplateTag + } item := types.CartItem{ CartId: cart.Id, ProductInfo: types.ProductInfo{ @@ -190,7 +194,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo StepPurchaseQuantity: stepPurchaseQuantity, IsHighlyCustomized: *cart.IsHighlyCustomized > 0, IsSelected: *cart.IsSelected > 0, - TemplateTag: *mapTemplate[*cart.TemplateId].TemplateTag, + TemplateTag: templateTag, Logo: snapShot.Logo, } //是否有失效的