fix:购物车下单
This commit is contained in:
parent
143421557f
commit
359e67e281
@ -115,44 +115,12 @@ type OrderProduct struct {
|
|||||||
ProductName string `json:"product_name"` // 商品名称
|
ProductName string `json:"product_name"` // 商品名称
|
||||||
ItemPrice AmountInfo `json:"product_price"` // 商品单价
|
ItemPrice AmountInfo `json:"product_price"` // 商品单价
|
||||||
ProductSnapshot map[string]interface{} `json:"product_snapshot"` // 商品快照
|
ProductSnapshot map[string]interface{} `json:"product_snapshot"` // 商品快照
|
||||||
ShoppingCartSnapshot *FsShoppingCart `json:"shopping_cart_snapshot"` // 购物车快照
|
ShoppingCartSnapshot FsShoppingCart `json:"shopping_cart_snapshot"` // 购物车快照
|
||||||
DiyInformation *DiyInformation `json:"diy_information"`
|
DiyInformation UserDiyInformation `json:"diy_information"`
|
||||||
FittingInfo *FittingInfo `json:"fitting_info"`
|
FittingInfo FittingInfo `json:"fitting_info"`
|
||||||
ProductCover string `json:"product_cover"` // 商品封面
|
ProductCover string `json:"product_cover"` // 商品封面
|
||||||
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
||||||
ProductSn string `json:"product_sn"` // 商品编码
|
ProductSn string `json:"product_sn"` // 商品编码
|
||||||
SizeInfo *SizeInfo `json:"size_info"`
|
SizeInfo SizeInfo `json:"size_info"`
|
||||||
StepNum []int `json:"step_num"` // 阶梯数量
|
StepNum []int `json:"step_num"` // 阶梯数量
|
||||||
}
|
}
|
||||||
type SizeInfo struct {
|
|
||||||
SizeID int64 `json:"size_id"`
|
|
||||||
Capacity string `json:"capacity"`
|
|
||||||
Title TitleInfo `json:"title"`
|
|
||||||
}
|
|
||||||
type TitleInfo struct {
|
|
||||||
CM string `json:"cm"`
|
|
||||||
Inch string `json:"inch"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// 缩略图结构
|
|
||||||
type ProductCoverMetadata struct {
|
|
||||||
Height int64 `json:"height"` // 高度
|
|
||||||
ResourceID string `json:"resource_id"` // 资源ID
|
|
||||||
ResourceURL string `json:"resource_url"` // 资源链接
|
|
||||||
Width int64 `json:"width"` // 宽度
|
|
||||||
}
|
|
||||||
|
|
||||||
// DIY数据
|
|
||||||
type DiyInformation struct {
|
|
||||||
Address string `json:"address"` // 地址
|
|
||||||
Phone string `json:"phone"` // 电话
|
|
||||||
Qrcode string `json:"qrcode"` // 二维码
|
|
||||||
Slogan string `json:"slogan"` // slogan
|
|
||||||
Website string `json:"website"` // 网站
|
|
||||||
}
|
|
||||||
|
|
||||||
// 配件信息
|
|
||||||
type FittingInfo struct {
|
|
||||||
FittingJson int64 `json:"fitting_json"` // 配件id
|
|
||||||
FittingName string `json:"fitting_name"` // 配件名称
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: order
|
Name: order
|
||||||
Host: 0.0.0.0
|
Host: 0.0.0.0
|
||||||
Port: 9921
|
Port: 9907
|
||||||
Timeout: 15000 #服务超时时间(毫秒)
|
Timeout: 15000 #服务超时时间(毫秒)
|
||||||
SourceMysql: fsreaderwriter:XErSYmLELKMnf3Dh@tcp(fusen.cdmigcvz3rle.us-east-2.rds.amazonaws.com:3306)/fusen
|
SourceMysql: fsreaderwriter:XErSYmLELKMnf3Dh@tcp(fusen.cdmigcvz3rle.us-east-2.rds.amazonaws.com:3306)/fusen
|
||||||
SourceRabbitMq:
|
SourceRabbitMq:
|
||||||
|
@ -280,23 +280,11 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
|||||||
OriginalCurrency: in.OriginalCurrency,
|
OriginalCurrency: in.OriginalCurrency,
|
||||||
}),
|
}),
|
||||||
ProductSnapshot: productSnapshot,
|
ProductSnapshot: productSnapshot,
|
||||||
ShoppingCartSnapshot: &shoppingCart.FsShoppingCart,
|
ShoppingCartSnapshot: shoppingCart.FsShoppingCart,
|
||||||
ProductSn: *shoppingCart.ShoppingCartProduct.Sn,
|
ProductSn: *shoppingCart.ShoppingCartProduct.Sn,
|
||||||
DiyInformation: &gmodel.DiyInformation{
|
DiyInformation: shoppingCartSnapshot.UserDiyInformation,
|
||||||
Address: shoppingCartSnapshot.UserDiyInformation.Address,
|
FittingInfo: shoppingCartSnapshot.FittingInfo,
|
||||||
Phone: shoppingCartSnapshot.UserDiyInformation.Phone,
|
SizeInfo: shoppingCartSnapshot.SizeInfo,
|
||||||
Qrcode: shoppingCartSnapshot.UserDiyInformation.Qrcode,
|
|
||||||
Slogan: shoppingCartSnapshot.UserDiyInformation.Slogan,
|
|
||||||
Website: shoppingCartSnapshot.UserDiyInformation.Website,
|
|
||||||
},
|
|
||||||
FittingInfo: &gmodel.FittingInfo{
|
|
||||||
FittingID: *shoppingCart.FittingId,
|
|
||||||
FittingName: shoppingCartSnapshot.FittingInfo.FittingName,
|
|
||||||
},
|
|
||||||
SizeInfo: &gmodel.SizeInfo{
|
|
||||||
SizeID: *shoppingCart.SizeId,
|
|
||||||
Capacity: shoppingCartSnapshot.SizeInfo.Capacity,
|
|
||||||
},
|
|
||||||
StepNum: stepNum,
|
StepNum: stepNum,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user