diff --git a/internal/service/app/orders/center.go b/internal/service/app/orders/center.go index 638546b..3547d75 100644 --- a/internal/service/app/orders/center.go +++ b/internal/service/app/orders/center.go @@ -11,15 +11,17 @@ func Center(userId uint) (waitPay, waitSend, waitRecv, afterSalesCount int) { var orderInfos []order.Information dbc.DB.Select("id, status, express_status").Where("order_type = 1").Where("user_id = ?", userId).Find(&orderInfos) for _, orderInfo := range orderInfos { - if orderInfo.ExpressStatus == 0 && orderInfo.Status == 1 { - waitSend++ - } - if orderInfo.Status == 0 { - waitPay++ - } + if !orderInfo.IsSplit { + if orderInfo.ExpressStatus == 0 && orderInfo.Status == 1 { + waitSend++ + } + if orderInfo.Status == 0 { + waitPay++ + } - if orderInfo.ExpressStatus == 1 && orderInfo.Status == 1 { - waitRecv++ + if orderInfo.ExpressStatus == 1 && orderInfo.Status == 1 { + waitRecv++ + } } }