表名调整
This commit is contained in:
parent
832e9bd161
commit
65c263ba8f
@ -141,7 +141,6 @@ const (
|
||||
///有序的爬塔排行 (真正的排行榜 最多只有50条)
|
||||
TablePagodaRankList = "pagodaranklist"
|
||||
|
||||
TableSeasonRecord = "seasonRecord" // 赛季塔记录
|
||||
/// 美食馆
|
||||
TableSmithy = "smithy"
|
||||
TableSmithyTrade = "smithytrade"
|
||||
|
@ -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 {
|
||||
|
@ -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_)
|
||||
|
@ -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)
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user