feat: center

master
howell 3 years ago
parent fe4eddc137
commit 5d1f1e3d5a

@ -34,19 +34,23 @@ func SaleCenter(userId uint) (waitPay, waitSend, waitRecv, waitDeal int) {
if orderInfo.ExpressStatus == 0 && orderInfo.Status == 1 {
// 待发货 = 已支付 + 未发货
waitSend++
continue
}
if orderInfo.Status == 0 && orderInfo.CanPay {
// 待支付 = 未支付 + 可支付
waitPay++
}
if !orderInfo.CanPay {
// 待处理 = 不可支付
waitDeal++
continue
}
if orderInfo.ExpressStatus == 1 && orderInfo.Status == 1 {
// 待收货 = 已支付 + 已发货
waitRecv++
continue
}
if !orderInfo.CanPay {
// 待处理 = 不可支付
waitDeal++
continue
}
}
return

@ -137,6 +137,11 @@ func (o *orderLogic) GuideLists(userId, status uint, page bean.Page, isSale bool
case 3: // 已收货
query += " and status = ? and express_status = ?"
queryArgs = append(queryArgs, manage.RecookOrderInfoStatusSuc, manage.RecookOrderInfoExpressStatusComp)
case 4:
if isSale {
query += " and status = 0 and can_pay = 0"
queryArgs = append(queryArgs, manage.RecookOrderInfoStatusSuc, manage.RecookOrderInfoExpressStatusComp)
}
}
}
total = recookOrderInfoModel.ListCount(query, queryArgs...)

Loading…
Cancel
Save