aa
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user