This commit is contained in:
邹宗楠
2026-02-10 10:35:36 +08:00
parent 70465e283e
commit 7c44c939b9
3 changed files with 17 additions and 12 deletions

View File

@@ -229,9 +229,10 @@ var (
)
const (
OrderTypeOrder = 1 // 新订单
OrderTypeWaybill = 2 // 运单
OrderTypeAfsOrder = 3 // 售后单
OrderTypeOrder = 1 // 新订单
OrderTypeWaybill = 2 // 运单
OrderTypeAfsOrder = 3 // 售后单
OrderTypePrintAfsOrder = 4 // 售后打印
)
// https://blog.csdn.net/a13570320979/article/details/51366355

View File

@@ -2106,14 +2106,11 @@ type StoreOrderRank struct {
TotalOrders int `json:"total_orders"`
}
func GetOrderStatusList(vendorOrderId string, orderType, vendorId int) ([]*model.OrderStatus, error) {
sql := ` SELECT * FROM order_status WHERE ref_vendor_order_id = ? AND vendor_id = ? AND order_type = ? `
func GetOrderStatusList(vendorOrderId string, orderType, vendorId int) (orderStatus []*model.OrderStatus, err error) {
sql := ` SELECT * FROM order_status WHERE ref_vendor_order_id = ? AND vendor_id = ? AND order_type = ? ORDER BY status_time asc `
param := []interface{}{vendorOrderId, vendorId, orderType}
orderStatus := make([]*model.OrderStatus, 0, 0)
if err := GetRows(GetDB(), &orderStatus, sql, param); err != nil {
if err = GetRows(GetDB(), &orderStatus, sql, param); err != nil {
return nil, err
}
return orderStatus, nil
}