1
This commit is contained in:
@@ -327,6 +327,7 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
|
||||
var idList []int
|
||||
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -339,7 +340,6 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
|
||||
return pagedInfo, err
|
||||
}
|
||||
pagedInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
Commit(db, txDB)
|
||||
|
||||
sql = `
|
||||
SELECT
|
||||
@@ -784,6 +784,7 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, (offset-1)*pageSize)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -795,7 +796,6 @@ func GetActMtwmVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
pageInfo.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
pageInfo.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return pageInfo, err
|
||||
}
|
||||
|
||||
@@ -848,6 +848,7 @@ func GetActMtwmVendorSkuPage(db *DaoDB, storeID int, keyword string, actType, of
|
||||
`
|
||||
sqlParams = append(sqlParams, (offset-1)*pageSize, pageSize)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -858,7 +859,6 @@ func GetActMtwmVendorSkuPage(db *DaoDB, storeID int, keyword string, actType, of
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
@@ -903,6 +903,7 @@ func GetActEbaiVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -913,7 +914,6 @@ func GetActEbaiVendorPage(db *DaoDB, storeIDs, skuIDs []int, keyword string, beg
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
@@ -936,6 +936,7 @@ func GetActEbaiVendorSkuPage(db *DaoDB, actID, keyword string, offset, pageSize
|
||||
`
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
txDB, _ := Begin(db)
|
||||
defer Commit(db, txDB)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db, txDB)
|
||||
@@ -946,6 +947,5 @@ func GetActEbaiVendorSkuPage(db *DaoDB, actID, keyword string, offset, pageSize
|
||||
page.TotalCount = GetLastTotalRowCount2(db, txDB)
|
||||
page.Data = acts
|
||||
}
|
||||
Commit(db, txDB)
|
||||
return page, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user