From a8b1e9002d286ab5b979df0278f3d438e3991c2f Mon Sep 17 00:00:00 2001 From: flswld Date: Wed, 11 Sep 2024 22:03:34 +0800 Subject: [PATCH] *** --- gs/dao/player_mongo.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gs/dao/player_mongo.go b/gs/dao/player_mongo.go index 5b1fca23..9fb24f29 100644 --- a/gs/dao/player_mongo.go +++ b/gs/dao/player_mongo.go @@ -441,7 +441,7 @@ func (d *Dao) DeleteAllUpdateChatMsgByUid(uid uint32) error { return nil } -func (d *Dao) LoadSceneBlockByUidAndBlockId(uid uint32, blockId uint32) (*model.SceneBlock, error) { +func (d *Dao) QuerySceneBlockByUidAndBlockId(uid uint32, blockId uint32) (*model.SceneBlock, error) { db := d.db.Collection("player_scene_block") result := db.FindOne( context.TODO(), @@ -458,11 +458,3 @@ func (d *Dao) LoadSceneBlockByUidAndBlockId(uid uint32, blockId uint32) (*model. } return sceneBlock, nil } - -func (d *Dao) SaveSceneBlock(sceneBlock *model.SceneBlock) error { - if sceneBlock.IsNew { - return d.InsertSceneBlock(sceneBlock) - } else { - return d.UpdateSceneBlock(sceneBlock) - } -}