diff --git a/business/model/dao/act.go b/business/model/dao/act.go index e70e6bd21..7e777fa06 100644 --- a/business/model/dao/act.go +++ b/business/model/dao/act.go @@ -149,6 +149,8 @@ func GetActStoreSkuVendorList(db *DaoDB, actID int, vendorIDs, storeIDs, skuIDs sqlParams = append(sqlParams, pageSize, offset) txDB, _ := Begin(db) defer Commit(db, txDB) + globals.SugarLogger.Debugf("-----------sql := %s", sql) + globals.SugarLogger.Debugf("-----------sqlParams := %s", utils.Format4Output(sqlParams, false)) if err = GetRowsTx(txDB, &actStoreSkuList, sql, sqlParams...); err == nil { totalCount = GetLastTotalRowCount2(db, txDB) } @@ -160,7 +162,8 @@ func GetActStoreSkuVendorList(db *DaoDB, actID int, vendorIDs, storeIDs, skuIDs storeAndSkuMap[v.StoreID] = append(storeAndSkuMap[v.StoreID], v.SkuID) storeActMap[v.StoreID] = append(storeActMap[v.StoreID], v) } - + globals.SugarLogger.Debugf("-----------storeAndSkuMap := %s", utils.Format4Output(storeAndSkuMap, false)) + globals.SugarLogger.Debugf("-----------storeActMap := %s", utils.Format4Output(storeActMap, false)) for storeID, skuIds := range storeAndSkuMap { settleSkuCountSql := ` SELECT sum(s.count) count,s.sku_id FROM order_sku_financial s WHERE s.jx_store_id = ? AND s.created_at >= ? ` settleSkuCountParam := []interface{}{storeID, time.Now().AddDate(0, -1, 0)}