Compare commits

...

3 Commits

Author SHA1 Message Date
余国健
3d8b82f0fd 增加关闭订单类型,增加增加商品销量类型 2024-12-08 01:51:41 +08:00
余国健
de3277c085 更新订单发送结构体 2024-12-07 21:57:37 +08:00
余国健
bf2a135f00 增加两个订单结构体 2024-12-07 00:00:27 +08:00
2 changed files with 30 additions and 4 deletions

View File

@@ -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,7 +22,8 @@ type OrderPay struct {
} }
type OrderSent struct { type OrderSent struct {
ID uint `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
ProductID uint `json:"product_id"` // 商品ID
} }
type OrderCloseRefund struct { type OrderCloseRefund struct {
@@ -51,3 +61,11 @@ type OrderVoucher struct {
type OrderFinishedAfter struct { type OrderFinishedAfter struct {
ID uint `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderUpdateSuccess struct {
ID uint `json:"id"` // 订单ID
}
type ThirdOrderRefund struct {
ID uint `json:"id"` // 订单ID
}

View File

@@ -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 库存增减标识