fix:购物车下单
This commit is contained in:
parent
143421557f
commit
359e67e281
|
@ -115,44 +115,12 @@ type OrderProduct struct {
|
|||
ProductName string `json:"product_name"` // 商品名称
|
||||
ItemPrice AmountInfo `json:"product_price"` // 商品单价
|
||||
ProductSnapshot map[string]interface{} `json:"product_snapshot"` // 商品快照
|
||||
ShoppingCartSnapshot *FsShoppingCart `json:"shopping_cart_snapshot"` // 购物车快照
|
||||
DiyInformation *DiyInformation `json:"diy_information"`
|
||||
FittingInfo *FittingInfo `json:"fitting_info"`
|
||||
ShoppingCartSnapshot FsShoppingCart `json:"shopping_cart_snapshot"` // 购物车快照
|
||||
DiyInformation UserDiyInformation `json:"diy_information"`
|
||||
FittingInfo FittingInfo `json:"fitting_info"`
|
||||
ProductCover string `json:"product_cover"` // 商品封面
|
||||
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
||||
ProductSn string `json:"product_sn"` // 商品编码
|
||||
SizeInfo *SizeInfo `json:"size_info"`
|
||||
SizeInfo SizeInfo `json:"size_info"`
|
||||
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
|
||||
Host: 0.0.0.0
|
||||
Port: 9921
|
||||
Port: 9907
|
||||
Timeout: 15000 #服务超时时间(毫秒)
|
||||
SourceMysql: fsreaderwriter:XErSYmLELKMnf3Dh@tcp(fusen.cdmigcvz3rle.us-east-2.rds.amazonaws.com:3306)/fusen
|
||||
SourceRabbitMq:
|
||||
|
|
|
@ -280,24 +280,12 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
|||
OriginalCurrency: in.OriginalCurrency,
|
||||
}),
|
||||
ProductSnapshot: productSnapshot,
|
||||
ShoppingCartSnapshot: &shoppingCart.FsShoppingCart,
|
||||
ShoppingCartSnapshot: shoppingCart.FsShoppingCart,
|
||||
ProductSn: *shoppingCart.ShoppingCartProduct.Sn,
|
||||
DiyInformation: &gmodel.DiyInformation{
|
||||
Address: shoppingCartSnapshot.UserDiyInformation.Address,
|
||||
Phone: shoppingCartSnapshot.UserDiyInformation.Phone,
|
||||
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,
|
||||
DiyInformation: shoppingCartSnapshot.UserDiyInformation,
|
||||
FittingInfo: shoppingCartSnapshot.FittingInfo,
|
||||
SizeInfo: shoppingCartSnapshot.SizeInfo,
|
||||
StepNum: stepNum,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user