fix: canpay

master
howell 3 years ago
parent e0f97dc59e
commit 05c41adde8

@ -29,7 +29,7 @@ func Center(userId uint) (waitPay, waitSend, waitRecv, afterSalesCount int) {
func SaleCenter(userId uint) (waitPay, waitSend, waitRecv, waitDeal int) {
var orderInfos []order.Information
dbc.DB.Select("id, status, express_status").Where("order_type = 2").Where("user_id = ?", userId).Find(&orderInfos)
dbc.DB.Select("id, status, express_status, can_pay").Where("order_type = 2").Where("user_id = ?", userId).Find(&orderInfos)
for _, orderInfo := range orderInfos {
if orderInfo.ExpressStatus == 0 && orderInfo.Status == 1 {
// 待发货 = 已支付 + 未发货
@ -47,7 +47,7 @@ func SaleCenter(userId uint) (waitPay, waitSend, waitRecv, waitDeal int) {
waitRecv++
continue
}
if !orderInfo.CanPay {
if orderInfo.Status == 0 && !orderInfo.CanPay {
// 待处理 = 不可支付
waitDeal++
continue

Loading…
Cancel
Save