fix:支付
This commit is contained in:
@@ -7,17 +7,24 @@ import (
|
||||
|
||||
// fs_order 订单表
|
||||
type FsOrder struct {
|
||||
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 订单ID
|
||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
||||
DeliveryMethod *int64 `gorm:"index;default:0;" json:"delivery_method"` // 物流类型
|
||||
OrderSn *string `gorm:"unique_key;default:'';" json:"order_sn"` //
|
||||
OrderSource *string `gorm:"default:'';" json:"order_source"` //
|
||||
Status *int64 `gorm:"index;default:0;" json:"status"` // 订单状态
|
||||
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:0=否,1=是
|
||||
PayStatus *int64 `gorm:"default:0;" json:"pay_status"` // 支付状态
|
||||
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 订单ID
|
||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
||||
DeliveryMethod *int64 `gorm:"index;default:0;" json:"delivery_method"` // 物流类型
|
||||
OrderSn *string `gorm:"unique_key;default:'';" json:"order_sn"` //
|
||||
OrderSource *string `gorm:"default:'';" json:"order_source"` //
|
||||
Status *int64 `gorm:"index;default:0;" json:"status"` // 订单状态
|
||||
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:0=否,1=是
|
||||
PayStatus *int64 `gorm:"default:0;" json:"pay_status"` // 支付状态
|
||||
StatusLink *[]byte `gorm:"default:'';" json:"status_link"` //
|
||||
OrderProduct *[]byte `gorm:"default:'';" json:"order_product"` //
|
||||
OrderAddress *[]byte `gorm:"default:'';" json:"order_address"` //
|
||||
OrderAmount *[]byte `gorm:"default:'';" json:"order_amount"` //
|
||||
PayStatusLink *[]byte `gorm:"default:'';" json:"pay_status_link"` //
|
||||
ShoppingCartSnapshot *[]byte `gorm:"default:'';" json:"shopping_cart_snapshot"` //
|
||||
ShoppingProductSnapshot *[]byte `gorm:"default:'';" json:"shopping_product_snapshot"` //
|
||||
}
|
||||
type FsOrderModel struct {
|
||||
db *gorm.DB
|
||||
|
||||
@@ -73,6 +73,7 @@ type PayStatus struct {
|
||||
|
||||
// 订单信息
|
||||
type OrderInfo struct {
|
||||
UserId int64 `json:"user_id"` // 物流类型
|
||||
Ctime *time.Time `json:"ctime"` // 创建日期
|
||||
DeliveryMethod int64 `json:"delivery_method"` // 物流类型
|
||||
Metadata map[string]interface{} `json:"metadata"` // 额外参数
|
||||
@@ -95,21 +96,22 @@ type OrderStatus struct {
|
||||
|
||||
// 订单商品
|
||||
type OrderProduct struct {
|
||||
TotalPrice AmountInfo `json:"total_price"` // 商品总价
|
||||
ExpectedDeliveryTime *time.Time `json:"expected_delivery_time"` // 预计到货时间
|
||||
PurchaseQuantity PurchaseQuantity `json:"purchase_quantity"` // 购买数量
|
||||
ProductID int64 `json:"product_id"` // 商品ID
|
||||
ProductName string `json:"product_name"` // 商品名称
|
||||
ItemPrice AmountInfo `json:"item_price"` // 商品单价
|
||||
ProductSnapshot interface{} `json:"product_snapshot"` // 商品快照
|
||||
ShoppingCartSnapshot *FsShoppingCartData `json:"shopping_cart_snapshot"` // 购物车快照
|
||||
ProductCover string `json:"product_cover"` // 商品封面
|
||||
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
||||
ProductSn string `json:"product_sn"` // 商品编码
|
||||
DiyInformation *UserDiyInformation `json:"diy_information"`
|
||||
SizeInfo *OrderProductSizeInfo `json:"size_info"`
|
||||
FittingInfo *OrderProductFittingInfo `json:"fitting_info"`
|
||||
IsHighlyCustomized int64 `json:"is_highly_customized"`
|
||||
TotalPrice AmountInfo `json:"total_price"` // 商品总价
|
||||
ItemPrice AmountInfo `json:"item_price"` // 商品单价
|
||||
ExpectedDeliveryTime *time.Time `json:"expected_delivery_time"` // 预计到货时间
|
||||
PurchaseQuantity PurchaseQuantity `json:"purchase_quantity"` // 购买数量
|
||||
ProductId int64 `json:"product_id"` // 商品ID
|
||||
ProductSn string `json:"product_sn"` // 商品编码
|
||||
ProductName string `json:"product_name"` // 商品名称
|
||||
ProductCover string `json:"product_cover"` // 商品封面
|
||||
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
||||
ProductSnapshot interface{} `json:"product_snapshot"` // 商品快照
|
||||
ShoppingCartSnapshot *FsShoppingCartData `json:"shopping_cart_snapshot"` // 购物车快照
|
||||
|
||||
DiyInformation *UserDiyInformation `json:"diy_information"`
|
||||
SizeInfo *OrderProductSizeInfo `json:"size_info"`
|
||||
FittingInfo *OrderProductFittingInfo `json:"fitting_info"`
|
||||
IsHighlyCustomized int64 `json:"is_highly_customized"`
|
||||
}
|
||||
type PurchaseQuantity struct {
|
||||
Current interface{} `json:"current"`
|
||||
@@ -131,3 +133,24 @@ type OrderProductFittingInfo struct {
|
||||
FittingID int64 `json:"fitting_id"` //配件ID
|
||||
FittingName string `json:"fitting_name"` //配件名称
|
||||
}
|
||||
|
||||
type ExpectedDelivery struct {
|
||||
Current time.Time `json:"current"`
|
||||
Initiate time.Time `json:"initiate"`
|
||||
}
|
||||
|
||||
type OrderProductInter struct {
|
||||
TotalPrice AmountInfo `json:"total_price"` // 商品总价
|
||||
ItemPrice AmountInfo `json:"item_price"` // 商品单价
|
||||
ExpectedDelivery *ExpectedDelivery `json:"expected_delivery"` // 预计到货
|
||||
PurchaseQuantity *PurchaseQuantity `json:"purchase_quantity"` // 购买数量
|
||||
ProductId int64 `json:"product_id"` // 商品ID
|
||||
ProductName string `json:"product_name"` // 商品名称
|
||||
ProductCover string `json:"product_cover"` // 商品封面
|
||||
ProductCoverMetadata map[string]interface{} `json:"product_cover_metadata"` // 商品封面
|
||||
ProductSn string `json:"product_sn"` // 商品编码
|
||||
DiyInformation *UserDiyInformation `json:"diy_information"`
|
||||
SizeInfo *OrderProductSizeInfo `json:"size_info"`
|
||||
FittingInfo *OrderProductFittingInfo `json:"fitting_info"`
|
||||
IsHighlyCustomized int64 `json:"is_highly_customized"`
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ type FsProductModel3d struct {
|
||||
Status *int64 `gorm:"default:0;" json:"status"` // 状态位 显示 删除
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
OptionTemplate *int64 `gorm:"default:0;" json:"option_template"` // 配件绑定的公共模板
|
||||
Price *int64 `gorm:"default:0;" json:"price"` //
|
||||
Price *int64 `gorm:"default:0;" json:"price"` // 仅配件用,配件的价格, 单位:0.1美分
|
||||
Sku *string `gorm:"default:'';" json:"sku"` // sku
|
||||
IsHot *int64 `gorm:"default:0;" json:"is_hot"` // 是否热门
|
||||
IsCloudRender *int64 `gorm:"default:0;" json:"is_cloud_render"` // 是否设置为云渲染模型
|
||||
|
||||
@@ -27,7 +27,6 @@ type FsShoppingCartData struct {
|
||||
FittingId *int64 `gorm:"default:0;" json:"fitting_id"` // 配件id
|
||||
PurchaseQuantity *int64 `gorm:"default:0;" json:"purchase_quantity"` // 购买数量
|
||||
Snapshot *map[string]interface{} `gorm:"default:'';" json:"snapshot"` //
|
||||
SnapshotData *string `gorm:"default:'';" json:"snapshot_data"` //
|
||||
IsSelected *int64 `gorm:"default:0;" json:"is_selected"` // 是否被选中 0非 1是
|
||||
IsHighlyCustomized *int64 `gorm:"default:0;" json:"is_highly_customized"` // 是否高度定制 0非 1是(针对客人高度定制只能后台增加如购物车)
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
|
||||
Reference in New Issue
Block a user