|
|
|
@ -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++
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|