fix
This commit is contained in:
parent
aafcbfcf50
commit
d113ef1c6e
|
@ -146,6 +146,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||||
productSn := snapShot.ProductInfo.ProductSn
|
productSn := snapShot.ProductInfo.ProductSn
|
||||||
//产品封面图资源元数据
|
//产品封面图资源元数据
|
||||||
var productCoverMetadata interface{}
|
var productCoverMetadata interface{}
|
||||||
|
cartIsSelected := *cart.IsSelected > 0
|
||||||
//产品信息
|
//产品信息
|
||||||
if productInfo, ok := mapProduct[*cart.ProductId]; ok {
|
if productInfo, ok := mapProduct[*cart.ProductId]; ok {
|
||||||
productCover = *productInfo.Cover
|
productCover = *productInfo.Cover
|
||||||
|
@ -154,6 +155,10 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||||
if metadata, ok := mapResourceMetadata[*productInfo.Cover]; ok {
|
if metadata, ok := mapResourceMetadata[*productInfo.Cover]; ok {
|
||||||
productCoverMetadata = metadata
|
productCoverMetadata = metadata
|
||||||
}
|
}
|
||||||
|
//产品下架了
|
||||||
|
if *productInfo.IsShelf == 0 {
|
||||||
|
cartIsSelected = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
templateTag := ""
|
templateTag := ""
|
||||||
if templateInfo, ok := mapTemplate[*cart.TemplateId]; ok {
|
if templateInfo, ok := mapTemplate[*cart.TemplateId]; ok {
|
||||||
|
@ -193,7 +198,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||||
MinPurchaseQuantity: stepPrice.MinBuyUnitsNum,
|
MinPurchaseQuantity: stepPrice.MinBuyUnitsNum,
|
||||||
StepPurchaseQuantity: stepPurchaseQuantity,
|
StepPurchaseQuantity: stepPurchaseQuantity,
|
||||||
IsHighlyCustomized: *cart.IsHighlyCustomized > 0,
|
IsHighlyCustomized: *cart.IsHighlyCustomized > 0,
|
||||||
IsSelected: *cart.IsSelected > 0,
|
IsSelected: cartIsSelected,
|
||||||
TemplateTag: templateTag,
|
TemplateTag: templateTag,
|
||||||
Logo: snapShot.Logo,
|
Logo: snapShot.Logo,
|
||||||
RenderImage: snapShot.RenderImage,
|
RenderImage: snapShot.RenderImage,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user