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

@@ -94,8 +94,8 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs, userID2s, mobile
}
sql += " LIMIT ? OFFSET ?"
sqlParams = append(sqlParams, pageSize, offset)
Begin(db)
defer Commit(db)
txDB, _ := Begin(db)
defer Commit(db, txDB)
if err = GetRows(db, &userList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount(db)
}
@@ -211,8 +211,8 @@ func QueryUserDeliveryAddress(db *DaoDB, addressID int64, userIDs []string, offs
LIMIT ? OFFSET ?`
sqlParams = append(sqlParams, pageSize, offset)
Begin(db)
defer Commit(db)
txDB, _ := Begin(db)
defer Commit(db, txDB)
if err = GetRows(db, &addressList, sql, sqlParams...); err == nil {
totalCount = GetLastTotalRowCount(db)
}