Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
959a155424
@ -45,5 +45,19 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq
|
||||
list.Type = season.Type
|
||||
}
|
||||
|
||||
// cu, err := this.module.ModuleUser.UserOnlineList()
|
||||
// if err != nil {
|
||||
// code = pb.ErrorCode_DBError
|
||||
// return
|
||||
// }
|
||||
// var randOnlineUsers []string
|
||||
// if len(cu) > 5 {
|
||||
// randArr := utils.Numbers(0, len(cu), 5)
|
||||
// for _, v := range randArr {
|
||||
// if cu[v] != nil {
|
||||
// randOnlineUsers = append(randOnlineUsers, cu[v].Uid)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return
|
||||
}
|
||||
|
@ -3,10 +3,12 @@ package pagoda
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
@ -57,6 +59,10 @@ func (this *ModelSeasonPagoda) addNewSeasonPagoda(uId string, data *pb.DBSeasonP
|
||||
|
||||
// 赛季结束 清理所有塔数据
|
||||
func (this *ModelSeasonPagoda) DleAllSeasonData() {
|
||||
|
||||
this.DB.DeleteMany(core.SqlTable(this.TableName), bson.M{})
|
||||
err := this.Redis.Ltrim(comm.TablePagodaRank, 0, -1)
|
||||
if err != nil {
|
||||
log.Errorf("delete failed")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user