This commit is contained in:
aozhiwei 2024-06-05 14:08:15 +08:00
parent effa2d3257
commit bf1664b48b

View File

@ -206,7 +206,9 @@ func (this *dbPool) Upsert(
return
}
if ds.Next() {
this.Update(dataSource, tblName, whereKv, updateKv, cb)
if len(updateKv) > 0 {
this.Update(dataSource, tblName, whereKv, updateKv, cb)
}
} else {
this.Insert(dataSource, tblName, insertKv, cb)
}