This commit is contained in:
aozhiwei 2024-04-12 16:12:33 +08:00
parent b1c82ecb4f
commit 7ebe70aba4

View File

@ -184,8 +184,8 @@ func (this *dbPool) OrmSelectOne(
func (this *dbPool) Update(
dataSource string,
tblName string,
fieldsKv [][]string,
whereKv [][]string,
fieldsKv [][]string,
cb ExecResultCb) {
params := []string{}
sql := "UPDATE `" + tblName + "` SET " + this.joinUpdateFields(fieldsKv, &params) +
@ -228,7 +228,7 @@ func (this *dbPool) Upsert(
return
}
if ds.Next() {
this.Update(dataSource, tblName, updateKv, whereKv, cb)
this.Update(dataSource, tblName, whereKv, updateKv, cb)
} else {
this.Insert(dataSource, tblName, insertKv, cb)
}