diff --git a/server/shopping-cart/internal/logic/getcartslogic.go b/server/shopping-cart/internal/logic/getcartslogic.go index e2e4c9ef..9ebdb738 100644 --- a/server/shopping-cart/internal/logic/getcartslogic.go +++ b/server/shopping-cart/internal/logic/getcartslogic.go @@ -207,6 +207,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo StepNum: stepQuantityList, IsInvalid: false, InvalidDescription: "", + IsHighlyCustomized: *cart.IsHighlyCustomized > 0, } //是否有失效的 if description, ok := mapCartChange[cart.Id]; ok { diff --git a/server/shopping-cart/internal/types/types.go b/server/shopping-cart/internal/types/types.go index 1a2832fe..2ff85906 100644 --- a/server/shopping-cart/internal/types/types.go +++ b/server/shopping-cart/internal/types/types.go @@ -41,16 +41,17 @@ type GetCartsRsp struct { type CartItem struct { CartId int64 `json:"cart_id"` - ProductInfo ProductInfo `json:"product_info"` //产品信息 - SizeInfo SizeInfo `json:"size_info"` //尺寸信息 - FittingInfo FittingInfo `json:"fitting_info"` //配件信息 - ItemPrice string `json:"item_price"` //单价 - TotalPrice string `json:"total_price"` //单价X数量=总价 - DiyInformation DiyInformation `json:"diy_information"` //diy信息 - StepNum []int64 `json:"step_num"` //阶梯数量 - PurchaseQuantity int64 `json:"purchase_quantity"` //当前购买数量 - IsInvalid bool `json:"is_invalid"` //是否无效 - InvalidDescription string `json:"invalid_description"` //无效原因 + ProductInfo ProductInfo `json:"product_info"` //产品信息 + SizeInfo SizeInfo `json:"size_info"` //尺寸信息 + FittingInfo FittingInfo `json:"fitting_info"` //配件信息 + ItemPrice string `json:"item_price"` //单价 + TotalPrice string `json:"total_price"` //单价X数量=总价 + DiyInformation DiyInformation `json:"diy_information"` //diy信息 + StepNum []int64 `json:"step_num"` //阶梯数量 + PurchaseQuantity int64 `json:"purchase_quantity"` //当前购买数量 + IsHighlyCustomized bool `json:"is_highly_customized"` //是否高度定制 + IsInvalid bool `json:"is_invalid"` //是否无效 + InvalidDescription string `json:"invalid_description"` //无效原因 } type ProductInfo struct { diff --git a/server_api/shopping-cart.api b/server_api/shopping-cart.api index 0722912a..cb441d90 100644 --- a/server_api/shopping-cart.api +++ b/server_api/shopping-cart.api @@ -58,16 +58,17 @@ type GetCartsRsp { } type CartItem { CartId int64 `json:"cart_id"` - ProductInfo ProductInfo `json:"product_info"` //产品信息 - SizeInfo SizeInfo `json:"size_info"` //尺寸信息 - FittingInfo FittingInfo `json:"fitting_info"` //配件信息 - ItemPrice string `json:"item_price"` //单价 - TotalPrice string `json:"total_price"` //单价X数量=总价 - DiyInformation DiyInformation `json:"diy_information"` //diy信息 - StepNum []int64 `json:"step_num"` //阶梯数量 - PurchaseQuantity int64 `json:"purchase_quantity"` //当前购买数量 - IsInvalid bool `json:"is_invalid"` //是否无效 - InvalidDescription string `json:"invalid_description"` //无效原因 + ProductInfo ProductInfo `json:"product_info"` //产品信息 + SizeInfo SizeInfo `json:"size_info"` //尺寸信息 + FittingInfo FittingInfo `json:"fitting_info"` //配件信息 + ItemPrice string `json:"item_price"` //单价 + TotalPrice string `json:"total_price"` //单价X数量=总价 + DiyInformation DiyInformation `json:"diy_information"` //diy信息 + StepNum []int64 `json:"step_num"` //阶梯数量 + PurchaseQuantity int64 `json:"purchase_quantity"` //当前购买数量 + IsHighlyCustomized bool `json:"is_highly_customized"` //是否高度定制 + IsInvalid bool `json:"is_invalid"` //是否无效 + InvalidDescription string `json:"invalid_description"` //无效原因 } type ProductInfo { ProductId int64 `json:"product_id"` //产品id