|
|
|
@ -9,7 +9,7 @@ import (
|
|
|
|
|
|
|
|
|
|
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).Where("order_type = 1").Find(&orderInfos)
|
|
|
|
|
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++
|
|
|
|
@ -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).Where("order_type = 1").Find(&orderInfos)
|
|
|
|
|
dbc.DB.Select("id, status, express_status").Where("order_type = 2").Where("user_id = ?", userId).Find(&orderInfos)
|
|
|
|
|
for _, orderInfo := range orderInfos {
|
|
|
|
|
if orderInfo.ExpressStatus == 0 && orderInfo.Status == 1 {
|
|
|
|
|
// 待发货 = 已支付 + 未发货
|
|
|
|
|