Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8d6f2b31f2 | ||
![]() |
777f826a32 | ||
![]() |
3d8b82f0fd | ||
![]() |
de3277c085 | ||
![]() |
bf2a135f00 | ||
![]() |
4ec702af0b | ||
![]() |
bd2af34fb8 | ||
![]() |
6eb2bb09bf | ||
![]() |
301cbac8c1 |
32
order.go
32
order.go
@@ -4,8 +4,17 @@ type OrderCreate struct {
|
|||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderCloseType = int
|
||||||
|
|
||||||
|
const (
|
||||||
|
OrderCloseTypePayTimeout OrderCloseType = 10 // 支付超时
|
||||||
|
OrderCloseTypeRefundClose OrderCloseType = 20 // 退款关闭,判断商品是否仅退款
|
||||||
|
OrderCloseTypeMerchantClose OrderCloseType = 30 // 商家关闭
|
||||||
|
)
|
||||||
|
|
||||||
type OrderClose struct {
|
type OrderClose struct {
|
||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
|
CloseType OrderCloseType `json:"close_type"` // 关闭类型
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderPay struct {
|
type OrderPay struct {
|
||||||
@@ -13,10 +22,11 @@ type OrderPay struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type OrderSent struct {
|
type OrderSent struct {
|
||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
|
OrderProductsID uint `json:"order_products_id"` // 订单商品ID
|
||||||
}
|
}
|
||||||
|
|
||||||
type CloseRefund struct {
|
type OrderCloseRefund struct {
|
||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,3 +53,19 @@ type OrderConsumptionAwardRedPacketQualification struct {
|
|||||||
type OrderConsumptionAwardRedPacketMoney struct {
|
type OrderConsumptionAwardRedPacketMoney struct {
|
||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderVoucher struct {
|
||||||
|
ID uint `json:"id"` // 订单ID
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderFinishedAfter struct {
|
||||||
|
ID uint `json:"id"` // 订单ID
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderUpdateSuccess struct {
|
||||||
|
ID uint `json:"id"` // 订单ID
|
||||||
|
}
|
||||||
|
|
||||||
|
type ThirdOrderRefund struct {
|
||||||
|
ID uint `json:"id"` // 订单ID
|
||||||
|
}
|
||||||
|
28
product.go
28
product.go
@@ -1,8 +1,16 @@
|
|||||||
package rabbitmq_common_structure
|
package rabbitmq_common_structure
|
||||||
|
|
||||||
|
type ProductsIncreaseSoldType = int
|
||||||
|
|
||||||
|
const (
|
||||||
|
ProductsIncreaseSoldTypePaied ProductsIncreaseSoldType = 10 // 已支付
|
||||||
|
ProductsIncreaseSoldTypeSent ProductsIncreaseSoldType = 20 // 已发货
|
||||||
|
)
|
||||||
|
|
||||||
type ProductsIncreaseSold struct {
|
type ProductsIncreaseSold struct {
|
||||||
ID uint `json:"id"` // 订单ID
|
ID uint `json:"id"` // 订单ID
|
||||||
ProductID uint `json:"product_id"` // 商品ID
|
ProductID uint `json:"product_id"` // 商品ID
|
||||||
|
IncreaseSoldType ProductsIncreaseSoldType `json:"increase_sold_type"` // 增加销量类型
|
||||||
}
|
}
|
||||||
|
|
||||||
// StockState 库存增减标识
|
// StockState 库存增减标识
|
||||||
@@ -13,10 +21,18 @@ const (
|
|||||||
StockStateDecrease StockState = "reduce_inventory" //减少库存
|
StockStateDecrease StockState = "reduce_inventory" //减少库存
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProductsChange struct {
|
type ProductsChangeStockType = int
|
||||||
OrderId uint `json:"order_id"`
|
|
||||||
State StockState `json:"state"`
|
const (
|
||||||
SkuItems []*SkuItem
|
ProductsChangeStockTypePaied ProductsChangeStockType = 10 // 已支付
|
||||||
|
ProductsChangeStockTypeSent ProductsChangeStockType = 20 // 已发货
|
||||||
|
)
|
||||||
|
|
||||||
|
type ProductsChangeStock struct {
|
||||||
|
OrderId uint `json:"order_id"`
|
||||||
|
State StockState `json:"state"`
|
||||||
|
SkuItems []*SkuItem `json:"sku_items"`
|
||||||
|
DecreaseChangeStockType ProductsChangeStockType `json:"decrease_change_stock_type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SkuItem struct {
|
type SkuItem struct {
|
||||||
|
Reference in New Issue
Block a user