diff --git a/order.go b/order.go index 96320c6..f1b6e5f 100644 --- a/order.go +++ b/order.go @@ -4,8 +4,17 @@ type OrderCreate struct { ID uint `json:"id"` // 订单ID } +type OrderCloseType = int + +const ( + OrderCloseTypePayTimeout OrderCloseType = 10 // 支付超时 + OrderCloseTypeRefundClose OrderCloseType = 20 // 退款关闭,判断商品是否仅退款 + OrderCloseTypeMerchantClose OrderCloseType = 30 // 商家关闭 +) + type OrderClose struct { - ID uint `json:"id"` // 订单ID + ID uint `json:"id"` // 订单ID + CloseType OrderCloseType `json:"close_type"` // 关闭类型 } type OrderPay struct { diff --git a/product.go b/product.go index 8991f73..610faac 100644 --- a/product.go +++ b/product.go @@ -1,8 +1,16 @@ package rabbitmq_common_structure +type ProductsIncreaseSoldType = int + +const ( + ProductsIncreaseSoldTypePaied ProductsIncreaseSoldType = 10 // 已支付 + ProductsIncreaseSoldTypeSent ProductsIncreaseSoldType = 20 // 已发货 +) + type ProductsIncreaseSold struct { - ID uint `json:"id"` // 订单ID - ProductID uint `json:"product_id"` // 商品ID + ID uint `json:"id"` // 订单ID + ProductID uint `json:"product_id"` // 商品ID + IncreaseSoldType ProductsIncreaseSoldType `json:"increase_sold_type"` // 增加销量类型 } // StockState 库存增减标识