Compare commits

...

8 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
yuguojian
4ec702af0b 重命名商品库存结构体 2024-12-06 16:50:52 +08:00
yuguojian
bd2af34fb8 重命名订单关闭退款结构体 2024-12-06 16:44:56 +08:00
yuguojian
6eb2bb09bf 增加订单完成结构体 2024-12-06 16:42:11 +08:00
yuguojian
301cbac8c1 增加消费奖励结构体 2024-12-06 16:31:51 +08:00
yuguojian
49e4a8f520 修改id数据类型 2024-12-06 16:25:33 +08:00
2 changed files with 51 additions and 17 deletions

View File

@@ -1,45 +1,71 @@
package rabbitmq_common_structure package rabbitmq_common_structure
type OrderCreate struct { type OrderCreate struct {
ID string `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 string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
CloseType OrderCloseType `json:"close_type"` // 关闭类型
} }
type OrderPay struct { type OrderPay struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderSent struct { type OrderSent struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
ProductID uint `json:"product_id"` // 商品ID
} }
type CloseRefund struct { type OrderCloseRefund struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderFinished struct { type OrderFinished struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderReconciliationPrecheck struct { type OrderReconciliationPrecheck struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderReconciliation struct { type OrderReconciliation struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderConsumptionAward struct { type OrderConsumptionAward struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderConsumptionAwardRedPacketQualification struct { type OrderConsumptionAwardRedPacketQualification struct {
ID string `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type OrderConsumptionAwardRedPacketMoney struct { type OrderConsumptionAwardRedPacketMoney struct {
ID string `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
} }

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 库存增减标识
@@ -13,8 +21,8 @@ const (
StockStateDecrease StockState = "reduce_inventory" //减少库存 StockStateDecrease StockState = "reduce_inventory" //减少库存
) )
type ProductsChange struct { type ProductsChangeStock struct {
OrderId int64 `json:"order_id"` OrderId uint `json:"order_id"`
State StockState `json:"state"` State StockState `json:"state"`
SkuItems []*SkuItem SkuItems []*SkuItem
} }
@@ -26,5 +34,5 @@ type SkuItem struct {
} }
type ProductsStockWarn struct { type ProductsStockWarn struct {
ID string `json:"id"` // skuID ID uint `json:"id"` // skuID
} }