|
|
@@ -112,9 +112,12 @@ local DB_DATA = { }
|
|
|
function dbSave(human)
|
|
|
if not human.lostTemple then return end
|
|
|
if not human.db then return end
|
|
|
+ QueryByUuid._id = human.db._id
|
|
|
+ -- 设置upsert为true 如果未找到则插入
|
|
|
+ LuaMongo.update(DB.db_lost_temple, QueryByUuid, human.lostTemple,true)
|
|
|
|
|
|
- DB_DATA = { }
|
|
|
- LuaMongo.find(DB.db_lost_temple, QueryByUuid)
|
|
|
+ --DB_DATA = { }
|
|
|
+ --[[LuaMongo.find(DB.db_lost_temple, QueryByUuid)
|
|
|
if not LuaMongo.next(DB_DATA) then
|
|
|
human.lostTemple._id = human.db._id
|
|
|
LuaMongo.insert(DB.db_lost_temple, human.lostTemple)
|
|
|
@@ -122,7 +125,8 @@ function dbSave(human)
|
|
|
end
|
|
|
|
|
|
QueryByUuid._id = human.db._id
|
|
|
- LuaMongo.update(DB.db_lost_temple, QueryByUuid, human.lostTemple)
|
|
|
+ LuaMongo.update(DB.db_lost_temple, QueryByUuid, human.lostTemple)]]
|
|
|
+
|
|
|
end
|
|
|
|
|
|
-- db
|