wangchuanjin %!s(int64=4) %!d(string=hai) anos
pai
achega
8604291bce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mysql/mysql.go

+ 1 - 1
mysql/mysql.go

@@ -110,7 +110,7 @@ func (m *Mysql) InsertBatchByTx(tx *sql.Tx, tableName string, fields []string, v
 
 //批量更新
 func (m *Mysql) ReplaceBatch(tableName string, fields []string, values []interface{}) (int64, int64) {
-	return m.InsertBatchByTx(nil, tableName, fields, values)
+	return m.ReplaceBatchByTx(nil, tableName, fields, values)
 }
 
 //带事务的批量更新