This commit is contained in:
苏尹岚
2021-03-30 17:39:07 +08:00
parent b9f7d7f53a
commit 0dd7235485
49 changed files with 579 additions and 582 deletions

View File

@@ -151,8 +151,8 @@ func GetActStoreSkuVendorList(db *DaoDB, actID int, vendorIDs, storeIDs, skuIDs
// globals.SugarLogger.Debug(sql)
// globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false))
// globals.SugarLogger.Debug(utils.Format4Output(actStoreSkuList, false))
Begin(db)
defer Commit(db)
txDB, _ := Begin(db)
defer Commit(db, txDB)
if err = GetRows(db, &actStoreSkuList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount(db)
}
@@ -292,20 +292,20 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
sqlParams = append(sqlParams, pageSize, offset)
var idList []int
Begin(db)
txDB, _ := Begin(db)
defer func() {
if r := recover(); r != nil {
Rollback(db)
Rollback(db, txDB)
panic(r)
}
}()
// globals.SugarLogger.Debug(sql)
if err = GetRows(db, &idList, sql, sqlParams...); err != nil || len(idList) == 0 {
Rollback(db)
Rollback(db, txDB)
return pagedInfo, err
}
pagedInfo.TotalCount = GetLastTotalRowCount(db)
Commit(db)
Commit(db, txDB)
sql = `
SELECT