This commit is contained in:
苏尹岚
2021-03-31 17:00:41 +08:00
parent b784fa92ca
commit 999765eb08
14 changed files with 54 additions and 54 deletions

View File

@@ -153,8 +153,8 @@ func GetActStoreSkuVendorList(db *DaoDB, actID int, vendorIDs, storeIDs, skuIDs
// globals.SugarLogger.Debug(utils.Format4Output(actStoreSkuList, false))
txDB, _ := Begin(db)
defer Commit(db, txDB)
if err = GetRows(db, &actStoreSkuList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount(db)
if err = GetRowsTx(txDB, &actStoreSkuList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount2(db, txDB)
}
return totalCount, actStoreSkuList, err
}
@@ -300,11 +300,11 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
}
}()
// globals.SugarLogger.Debug(sql)
if err = GetRows(db, &idList, sql, sqlParams...); err != nil || len(idList) == 0 {
if err = GetRowsTx(txDB, &idList, sql, sqlParams...); err != nil || len(idList) == 0 {
Rollback(db, txDB)
return pagedInfo, err
}
pagedInfo.TotalCount = GetLastTotalRowCount(db)
pagedInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
Commit(db, txDB)
sql = `