aa
This commit is contained in:
@@ -81,10 +81,10 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
|
||||
offset = jxutils.FormalizePageOffset(offset)
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
var shopList []*PageShopWithPlaceName
|
||||
Begin(db)
|
||||
txDB, _ := Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Rollback(db)
|
||||
Rollback(db, txDB)
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
@@ -93,9 +93,9 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
|
||||
TotalCount: GetLastTotalRowCount(db),
|
||||
Data: shopList,
|
||||
}
|
||||
Commit(db)
|
||||
Commit(db, txDB)
|
||||
} else {
|
||||
Rollback(db)
|
||||
Rollback(db, txDB)
|
||||
}
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user