From 65c263ba8f64ec938aac9b452edab630b6274bc4 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 14 Apr 2023 10:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=90=8D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 1 - modules/hero/hero_test.go | 2 +- modules/pagoda/api_challengeover.go | 2 +- modules/pagoda/api_ranklist.go | 2 +- modules/timer/season.go | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/comm/const.go b/comm/const.go index 90ce3e853..034c3e58f 100644 --- a/comm/const.go +++ b/comm/const.go @@ -141,7 +141,6 @@ const ( ///有序的爬塔排行 (真正的排行榜 最多只有50条) TablePagodaRankList = "pagodaranklist" - TableSeasonRecord = "seasonRecord" // 赛季塔记录 /// 美食馆 TableSmithy = "smithy" TableSmithyTrade = "smithytrade" diff --git a/modules/hero/hero_test.go b/modules/hero/hero_test.go index eeead3176..da707a3d5 100644 --- a/modules/hero/hero_test.go +++ b/modules/hero/hero_test.go @@ -82,7 +82,7 @@ func TimerStar() { if err == nil { model := db.NewDBModel(comm.TableSeasonData, 0, conn) model.DB.DeleteMany(comm.TableSeasonPagoda, bson.M{}, options.Delete()) - model.DB.DeleteMany(comm.TableSeasonRecord, bson.M{}, options.Delete()) + model.DB.DeleteMany(comm.TablePagodaRecord, bson.M{}, options.Delete()) for pos := 0; pos < comm.MaxRankNum; pos++ { key1 := fmt.Sprintf("pagodaList%d", pos) if err := model.Redis.Delete(key1); err != nil { diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 0a2251e59..250b1fe18 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -136,7 +136,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal costTime = newData.CostTime // 数据写到跨服中 conn_, err := db.Cross() - dbModel := db.NewDBModel(comm.TableSeasonRecord, time.Hour, conn_) + dbModel := db.NewDBModel(comm.TablePagodaRecord, time.Hour, conn_) dbModel.AddList(uid, newData.Id, newData) this.module.SetPagodaRankList("pagodaList"+strconv.Itoa(int(newData.PagodaId)), int64(math.MaxInt32-newData.CostTime), newData.Id) dbModelTable := db.NewDBModel(comm.TableSeasonPagoda, time.Hour, conn_) diff --git a/modules/pagoda/api_ranklist.go b/modules/pagoda/api_ranklist.go index 3be110547..2e8ebb379 100644 --- a/modules/pagoda/api_ranklist.go +++ b/modules/pagoda/api_ranklist.go @@ -46,7 +46,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.PagodaRankListR _dataList := rd.Val() for _, v := range _dataList { //conn_, err := db.Cross() - dbModel := db.NewDBModel(comm.TableSeasonRecord, 0, conn) + dbModel := db.NewDBModel(comm.TablePagodaRecord, 0, conn) result := &pb.DBPagodaRecord{} if err = dbModel.GetListObj(session.GetUserId(), v, result); err == nil { szRank = append(szRank, result) diff --git a/modules/timer/season.go b/modules/timer/season.go index 086565276..945cdbd36 100644 --- a/modules/timer/season.go +++ b/modules/timer/season.go @@ -161,7 +161,7 @@ func (this *SeasonPagoda) TimerSeasonStar() { if err == nil { model := db.NewDBModel(comm.TableSeasonData, 0, conn) model.DB.DeleteMany(comm.TableSeasonPagoda, bson.M{}, options.Delete()) - model.DB.DeleteMany(comm.TableSeasonRecord, bson.M{}, options.Delete()) + model.DB.DeleteMany(comm.TablePagodaRecord, bson.M{}, options.Delete()) for pos := 0; pos < comm.MaxRankNum; pos++ { key1 := fmt.Sprintf("pagodaList%d", pos) if err := model.Redis.Delete(key1); err != nil { @@ -174,7 +174,7 @@ func (this *SeasonPagoda) TimerSeasonStar() { } } - this.DB.DeleteMany(comm.TableSeasonRecord, bson.M{}, options.Delete()) + this.DB.DeleteMany(comm.TablePagodaRecord, bson.M{}, options.Delete()) } //this.module.Debugf("=====%d,", time.Since(star).Milliseconds())