This commit is contained in:
laodaming 2023-11-01 17:10:53 +08:00
parent f6f305f0f3
commit b868ef19ae
4 changed files with 32 additions and 28 deletions
model/gmodel
server/shopping-cart/internal
server_api

View File

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

View File

@ -242,6 +242,7 @@ func (l *AddToCartLogic) AddToCart(req *types.AddToCartReq, userinfo *auth.UserI
ProductInfo: gmodel.ProductInfo{
ProductName: *productInfo.Title,
ProductSn: *productInfo.Sn,
ProductWebsiteUnit: req.ProductWebsiteUnit,
},
UserDiyInformation: gmodel.UserDiyInformation{
Phone: req.DiyInfo.Phone,

View File

@ -7,6 +7,7 @@ import (
type AddToCartReq struct {
ProductId int64 `json:"product_id"` //产品id
ProductWebsiteUnit string `json:"product_website_unit,optional"` //产品单位
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引

View File

@ -29,6 +29,7 @@ service shopping-cart {
//加入购物车
type AddToCartReq {
ProductId int64 `json:"product_id"` //产品id
ProductWebsiteUnit string `json:"product_website_unit,optional"` //产品单位
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引