This commit is contained in:
laodaming 2023-11-08 16:56:52 +08:00
parent daeea52d64
commit 2578d6e4da
2 changed files with 13 additions and 6 deletions

View File

@ -48,9 +48,13 @@ type CartSnapshot struct {
LightInfo LightInfo `json:"light_info"` //灯光数据 LightInfo LightInfo `json:"light_info"` //灯光数据
} }
type ProductInfo struct { type ProductInfo struct {
ProductName string `json:"product_name"` //产品名 ProductName string `json:"product_name"` //产品名
ProductSn string `json:"product_sn"` //产品sn ProductSn string `json:"product_sn"` //产品sn
ProductWebsiteUnit string `json:"product_website_unit"` //产品前台网站单位 ProductWebsiteUnit ProductWebsiteUnit `json:"product_website_unit"` //产品前台网站单位
}
type ProductWebsiteUnit struct {
Singular string `json:"singular"`
Complex string `json:"complex"`
} }
type ModelInfo struct { type ModelInfo struct {
ModelJson interface{} `json:"model_json"` //模型设计json数据 ModelJson interface{} `json:"model_json"` //模型设计json数据

View File

@ -240,9 +240,12 @@ func (l *AddToCartLogic) AddToCart(req *types.AddToCartReq, userinfo *auth.UserI
}, },
SizeInfo: sizeKeyInfo, SizeInfo: sizeKeyInfo,
ProductInfo: gmodel.ProductInfo{ ProductInfo: gmodel.ProductInfo{
ProductName: *productInfo.Title, ProductName: *productInfo.Title,
ProductSn: *productInfo.Sn, ProductSn: *productInfo.Sn,
ProductWebsiteUnit: req.ProductWebsiteUnit, ProductWebsiteUnit: gmodel.ProductWebsiteUnit{
Singular: "",
Complex: "",
},
}, },
UserDiyInformation: gmodel.UserDiyInformation{ UserDiyInformation: gmodel.UserDiyInformation{
Phone: req.DiyInfo.Phone, Phone: req.DiyInfo.Phone,