fix
This commit is contained in:
parent
2578d6e4da
commit
947f4c3f17
|
@ -243,8 +243,8 @@ func (l *AddToCartLogic) AddToCart(req *types.AddToCartReq, userinfo *auth.UserI
|
||||||
ProductName: *productInfo.Title,
|
ProductName: *productInfo.Title,
|
||||||
ProductSn: *productInfo.Sn,
|
ProductSn: *productInfo.Sn,
|
||||||
ProductWebsiteUnit: gmodel.ProductWebsiteUnit{
|
ProductWebsiteUnit: gmodel.ProductWebsiteUnit{
|
||||||
Singular: "",
|
Singular: req.ProductWebsiteUnit.Singular,
|
||||||
Complex: "",
|
Complex: req.ProductWebsiteUnit.Complex,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
UserDiyInformation: gmodel.UserDiyInformation{
|
UserDiyInformation: gmodel.UserDiyInformation{
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
type AddToCartReq struct {
|
type AddToCartReq struct {
|
||||||
ProductId int64 `json:"product_id"` //产品id
|
ProductId int64 `json:"product_id"` //产品id
|
||||||
ProductWebsiteUnit string `json:"product_website_unit,optional"` //产品单位
|
ProductWebsiteUnit ProductWebsiteUnit `json:"product_website_unit,optional"` //产品单位
|
||||||
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
|
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
|
||||||
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
|
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
|
||||||
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引
|
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引
|
||||||
|
@ -21,6 +21,11 @@ type AddToCartReq struct {
|
||||||
DiyInfo DiyInfo `json:"diy_info,optional"` //用户diy数据(可选)
|
DiyInfo DiyInfo `json:"diy_info,optional"` //用户diy数据(可选)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProductWebsiteUnit struct {
|
||||||
|
Singular string `json:"singular"`
|
||||||
|
Complex string `json:"complex"`
|
||||||
|
}
|
||||||
|
|
||||||
type DiyInfo struct {
|
type DiyInfo struct {
|
||||||
Phone string `json:"phone,optional"` //电话(可选)
|
Phone string `json:"phone,optional"` //电话(可选)
|
||||||
Address string `json:"address,optional"` //地址 (可选)
|
Address string `json:"address,optional"` //地址 (可选)
|
||||||
|
|
|
@ -29,7 +29,7 @@ service shopping-cart {
|
||||||
//加入购物车
|
//加入购物车
|
||||||
type AddToCartReq {
|
type AddToCartReq {
|
||||||
ProductId int64 `json:"product_id"` //产品id
|
ProductId int64 `json:"product_id"` //产品id
|
||||||
ProductWebsiteUnit string `json:"product_website_unit,optional"` //产品单位
|
ProductWebsiteUnit ProductWebsiteUnit `json:"product_website_unit,optional"` //产品单位
|
||||||
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
|
TemplateId int64 `json:"template_id,optional"` //模板id(不可定制的不传)
|
||||||
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
|
IsHighlyCustomized int64 `json:"is_highly_customized"` //是否高度定制
|
||||||
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引
|
SelectColorIndex int64 `json:"select_color_index"` //选择的颜色索引
|
||||||
|
@ -42,6 +42,10 @@ type AddToCartReq {
|
||||||
SwitchInfo map[string]interface{} `json:"switch_info,optional"` //开关信息
|
SwitchInfo map[string]interface{} `json:"switch_info,optional"` //开关信息
|
||||||
DiyInfo DiyInfo `json:"diy_info,optional"` //用户diy数据(可选)
|
DiyInfo DiyInfo `json:"diy_info,optional"` //用户diy数据(可选)
|
||||||
}
|
}
|
||||||
|
type ProductWebsiteUnit {
|
||||||
|
Singular string `json:"singular"`
|
||||||
|
Complex string `json:"complex"`
|
||||||
|
}
|
||||||
type DiyInfo {
|
type DiyInfo {
|
||||||
Phone string `json:"phone,optional"` //电话(可选)
|
Phone string `json:"phone,optional"` //电话(可选)
|
||||||
Address string `json:"address,optional"` //地址 (可选)
|
Address string `json:"address,optional"` //地址 (可选)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user