上传配置
This commit is contained in:
parent
096299c16e
commit
eeeeca21d9
@ -3,13 +3,11 @@ package battlerecord
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/db"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
@ -68,25 +66,6 @@ type recordModel struct {
|
||||
model *db.DBModel
|
||||
}
|
||||
|
||||
// 获取用户全部的埋点数据
|
||||
func (this *recordModel) getUserBurieds(uid string) (results *pb.DBBuried, err error) {
|
||||
results = &pb.DBBuried{}
|
||||
if err = this.model.Get(uid, results); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
err = nil
|
||||
results = &pb.DBBuried{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Items: make(map[int32]*pb.DBBuriedItem),
|
||||
}
|
||||
err = this.model.Add(uid, results)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *recordModel) inquire(bid string) (result *pb.DBBattlePlayRecord, err error) {
|
||||
result = &pb.DBBattlePlayRecord{}
|
||||
if err = this.model.DB.FindOne(core.SqlTable(this.model.TableName), bson.M{"_id": bid}).Decode(result); err != nil {
|
||||
|
@ -12,7 +12,6 @@ import (
|
||||
"go_dreamfactory/modules/equipment"
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/items"
|
||||
"go_dreamfactory/modules/task"
|
||||
"go_dreamfactory/modules/user"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/services"
|
||||
@ -276,7 +275,6 @@ func Test_Main(t *testing.T) {
|
||||
items.NewModule(),
|
||||
user.NewModule(),
|
||||
equipment.NewModule(),
|
||||
task.NewModule(),
|
||||
)
|
||||
}()
|
||||
time.Sleep(time.Second * 2)
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"go_dreamfactory/modules/equipment"
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/items"
|
||||
"go_dreamfactory/modules/task"
|
||||
"go_dreamfactory/modules/user"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/services"
|
||||
@ -69,7 +68,6 @@ func TestMain(m *testing.M) {
|
||||
hero.NewModule(),
|
||||
user.NewModule(),
|
||||
equipment.NewModule(),
|
||||
task.NewModule(),
|
||||
)
|
||||
}()
|
||||
time.Sleep(time.Second * 3)
|
||||
|
@ -12,7 +12,6 @@ import (
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/items"
|
||||
"go_dreamfactory/modules/pagoda"
|
||||
"go_dreamfactory/modules/task"
|
||||
"go_dreamfactory/modules/user"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/services"
|
||||
@ -68,7 +67,6 @@ func Test_Main(t *testing.T) {
|
||||
items.NewModule(),
|
||||
user.NewModule(),
|
||||
equipment.NewModule(),
|
||||
task.NewModule(),
|
||||
pagoda.NewModule(),
|
||||
)
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user