Compare commits

..

18 Commits

Author SHA1 Message Date
吕翠丽
12617dbaf7 feature/合利宝结算状态查询 2025-04-19 17:05:56 +08:00
7d54fbd31d Merge pull request 'feature/增加线下支付创建失败类型' (#2) from feature/增加线下支付创建失败类型 into master
Reviewed-on: #2
2025-03-14 14:29:10 +08:00
吕翠丽
f845aee1de feature/增加线下支付创建失败类型 2025-03-14 14:23:25 +08:00
1412fc67be Merge pull request '添加支付结构体' (#1) from feature/添加支付结构体 into master
Reviewed-on: #1
2025-03-11 16:41:22 +08:00
吕翠丽
c25a65488e 添加支付结构体 2025-03-11 16:39:01 +08:00
yuguojian
dd74c1b5c6 调整包头 2025-01-15 17:41:07 +08:00
yuguojian
959cb87ee2 调整包头 2025-01-15 17:19:18 +08:00
yuguojian
c1d08db044 Merge remote-tracking branch 'origin/fix/添加退款关单类型'
# Conflicts:
#	rabbitmq_order.go
2025-01-15 16:40:25 +08:00
吕翠丽
9edec35425 提交完整订单关闭类型 2025-01-15 16:37:56 +08:00
yuguojian
7c6e1ba3a8 更新日志信息 2025-01-14 15:10:34 +08:00
yuguojian
91324cd225 更换仓库 2025-01-13 17:09:05 +08:00
yuguojian
92e71475d3 增加参数兼容 2025-01-07 15:15:06 +08:00
LiHouse
48b3206053 第三方订单下单失败关单 2025-01-07 15:13:41 +08:00
吕翠丽
981dd3b98d 增加发货超时取消订单结构体 2024-12-26 16:19:05 +08:00
88dd6fbdf5 增加红包回退结构体 2024-12-17 15:16:52 +08:00
yuguojian
e0f73fc058 增加参数兼容 2024-12-12 14:59:13 +08:00
yuguojian
88ff5825ea 增加日志,修改命名 2024-12-11 18:53:32 +08:00
yuguojian
7b557072f3 订单减库存选项,下单时,发货时 2024-12-09 15:54:49 +08:00
5 changed files with 62 additions and 9 deletions

2
go.mod
View File

@@ -1,3 +1,3 @@
module gitee.com/shenzhen-jinhuatai-network/rabbitmq_common_structure module git.ssgfgtfy.com/public/common_structure
go 1.18.0 go 1.18.0

21
log.go Normal file
View File

@@ -0,0 +1,21 @@
package common_structure
import "time"
type LogInfoType = string
const (
LogInfoTypeOrder LogInfoType = "order"
LogInfoTypeProduct LogInfoType = "product"
)
type LogInfo struct {
InfoType LogInfoType `json:"info_type"` // 类型
ID int `json:"id"` // ID订单ID商品ID商品SKUID之类的id
Operator interface{} `json:"operator"` // 操作人商家用户对象admin对象或者是系统关闭订单消费队列等
Title string `json:"title"` // 标题,做什么事情
Param interface{} `json:"param"` // 参数,请求参数,函数、方法就是参数
Result interface{} `json:"result"` // 结果,返回值
ErrStr string `json:"err_str"` // 错误信息json转义error没有自动存储需要手动转义
At time.Time `json:"at"` // 记录时间
}

View File

@@ -1,4 +1,4 @@
package rabbitmq_common_structure package common_structure
type OrderCreate struct { type OrderCreate struct {
ID uint `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
@@ -8,8 +8,14 @@ type OrderCloseType = int
const ( const (
OrderCloseTypePayTimeout OrderCloseType = 10 // 支付超时 OrderCloseTypePayTimeout OrderCloseType = 10 // 支付超时
OrderCloseTypeRefundClose OrderCloseType = 20 // 退款关闭,判断商品是否仅退款 OrderCloseTypeRefundClose OrderCloseType = 20 // 售后完成关闭
OrderCloseTypeMerchantClose OrderCloseType = 30 // 商家关闭 OrderCloseTypeMerchantClose OrderCloseType = 30 // 商家关闭
OrderCloseTypeThirdOrderFailedClose OrderCloseType = 40 // 第三方订单下单失败关闭
OrderCloseTypeUser OrderCloseType = 50 // 用户主动关闭
OrderCloseTypeMerchantCancel OrderCloseType = 60 //商家取消订单关闭
OrderCloseTypeDeliveryTimeout OrderCloseType = 70 //发货超时关闭
OrderCloseTypePaymentFailed OrderCloseType = 80 //创建支付失败
) )
type OrderClose struct { type OrderClose struct {
@@ -69,3 +75,12 @@ type OrderUpdateSuccess struct {
type ThirdOrderRefund struct { type ThirdOrderRefund struct {
ID uint `json:"id"` // 订单ID ID uint `json:"id"` // 订单ID
} }
type RedPacketRefund struct {
ID uint `json:"id"` // 订单ID
OrderProductsID uint `json:"order_products_id"` // 订单商品ID
}
type OrderSentOvertime struct {
ID uint `json:"id"` // 订单ID
}

15
rabbitmq_pay.go Normal file
View File

@@ -0,0 +1,15 @@
package common_structure
type PayNotify struct {
PayID uint `json:"pay_id"` // 支付ID
PayNo string `json:"pay_no"` // 支付单号
RemainExecNum int `json:"num"` // 剩余执行次数
RemainRepeatNum int `json:"repeat_num"` // 剩余重复执行次数
}
type HelibaoSettlementQuery struct {
ID uint `json:"id"` // 提现ID
WithdrawNo string `json:"withdraw_no"` // 提现单号
RemainExecNum int `json:"num"` // 剩余执行次数
RemainRepeatNum int `json:"repeat_num"` // 剩余重复执行次数
}

View File

@@ -1,4 +1,4 @@
package rabbitmq_common_structure package common_structure
type ProductsIncreaseSoldType = int type ProductsIncreaseSoldType = int
@@ -24,15 +24,17 @@ const (
type ProductsChangeStockType = int type ProductsChangeStockType = int
const ( const (
ProductsChangeStockTypePaied ProductsChangeStockType = 10 // 已支付 ProductsChangeStockTypePlaced ProductsChangeStockType = 10 // 下单时
ProductsChangeStockTypeSent ProductsChangeStockType = 20 // 已发货 ProductsChangeStockTypeSent ProductsChangeStockType = 20 // 已发货
) )
type ProductsChangeStock struct { type ProductsChangeStock struct {
OrderId uint `json:"order_id"` OrderId uint `json:"order_id"`
State StockState `json:"state"` State StockState `json:"state"`
SkuItems []*SkuItem `json:"sku_items"`
DecreaseChangeStockType ProductsChangeStockType `json:"decrease_change_stock_type"` DecreaseChangeStockType ProductsChangeStockType `json:"decrease_change_stock_type"`
OrderProductsIDs []uint `json:"order_products_ids"` // 对应的订单商品ID集合加减库存如果为0整个订单商品加减库存
SkuItems []*SkuItem `json:"sku_items"` // 商家修改商品数量使用,旧逻辑兼容
} }
type SkuItem struct { type SkuItem struct {