创建开服数据

This commit is contained in:
meixiongfeng 2022-10-24 10:26:30 +08:00
parent dbf0e35c37
commit 574178dfc6
2 changed files with 1 additions and 14 deletions

View File

@ -49,19 +49,6 @@ func (this *SeasonPagoda) Start() (err error) {
cron.AddFunc("0 0 23 L * ?", this.TimerSeasonOver) //每月最后一天23点执行一次
cron.AddFunc("0 0 5 /* * ?", this.TimerSeasonStar) //每月第一天5点执行一次
newData := &pb.DBPagoda{
Id: primitive.NewObjectID().Hex(),
Uid: "sdsd",
PagodaId: 2,
Reward: map[int32]bool{},
Type: 101,
}
if conn, err := db.Cross(); err == nil {
rst, _ := conn.Mgo.InsertOne(comm.TableSeasonPagoda, newData)
fmt.Printf("%v", rst)
}
return
}
func (this *SeasonPagoda) CreatTestData(index int) {

View File

@ -129,7 +129,7 @@ func (this *Service) InitSys() {
// }
_len, err1 := model.DB.CountDocuments(comm.TableServerData, bson.M{})
if err1 != nil && _len > 0 {
if err1 == nil && _len == 0 {
fmt.Printf("%v,%v", _len, err1)
server := &pb.DBServerData{
Id: primitive.NewObjectID().Hex(),