This commit is contained in:
邹宗楠
2025-08-22 12:45:33 +08:00
parent 4b234723f9
commit 125dc3a77d
5 changed files with 10 additions and 9 deletions

View File

@@ -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
}