This commit is contained in:
邹宗楠
2023-07-17 16:16:44 +08:00
parent e509133d5e
commit 09b2e45f7d

View File

@@ -728,11 +728,11 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
sqlParams = append(sqlParams, keyword, keyword, "%"+keyword+"%", "%"+keyword+"%")
}
if !utils.IsTimeZero(beginAt) {
sql += " AND a.begin_at <= ?"
sql += " AND a.begin_at >= ?"
sqlParams = append(sqlParams, beginAt)
}
if !utils.IsTimeZero(endAt) {
sql += " AND a.end_at >= ?"
sql += " AND a.end_at <= ?"
sqlParams = append(sqlParams, endAt)
}
if actType != 0 {
@@ -752,11 +752,8 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
}
}()
globals.SugarLogger.Debugf("sql := %s", sql)
globals.SugarLogger.Debugf("sql := %s", utils.Format4Output(sqlParams, false))
if err = GetRowsTx(txDB, &acts, sql, sqlParams...); err == nil && len(acts) != 0 {
aa := GetLastTotalRowCount2(db, txDB)
pageInfo.TotalCount = aa
pageInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
pageInfo.Data = acts
}
Commit(db, txDB)