1
This commit is contained in:
@@ -3,6 +3,7 @@ package dao
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -1692,10 +1693,14 @@ func StatisticsIncome(db *DaoDB, startTime, endTime time.Time, storeId int, bran
|
|||||||
parma = append(parma, vendorId)
|
parma = append(parma, vendorId)
|
||||||
}
|
}
|
||||||
|
|
||||||
sql += ` GROUP BY t1.jx_store_id ORDER BY order_count desc `
|
sql += ` GROUP BY t1.jx_store_id`
|
||||||
|
|
||||||
|
sql2 := ` select settle.id,count(settle.vendor_order_id) order_count,settle.name name,sum(settle.total_income) total_income,sum(settle.jx_income) jx_income,sum(settle.market_income) market_income, sum(settle.order_sku_price) order_sku_price from ( ` + sql + `) AS settle GROUP BY id ORDER BY order_count desc`
|
||||||
|
|
||||||
|
globals.SugarLogger.Debugf("-----sql := %s", sql2)
|
||||||
|
globals.SugarLogger.Debugf("-----parma := %s", utils.Format4Output(parma, false))
|
||||||
incomeInfo := make([]*StatisticsIncomeInfo, 0, 0)
|
incomeInfo := make([]*StatisticsIncomeInfo, 0, 0)
|
||||||
if err := GetRows(db, &incomeInfo, sql, parma...); err != nil {
|
if err := GetRows(db, &incomeInfo, sql2, parma...); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user