From 16f81a664fae34597ea6882438e7b62173e8c294 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 27 Oct 2022 20:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/arena/modelarena.go | 2 +- sys/db/init_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index f3ad95317..34d497be1 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -38,7 +38,7 @@ func (this *modelArena) Init(service core.IService, module core.IModule, comp co bsonx.Doc{ {Key: "uid", Value: bsonx.Int32(1)}, }, - bson.M{"loc": "2d"}, + bson.M{"loc": "2dsphere"}, }, }) return diff --git a/sys/db/init_test.go b/sys/db/init_test.go index 1ccc3f1b1..e17c8349a 100644 --- a/sys/db/init_test.go +++ b/sys/db/init_test.go @@ -48,7 +48,7 @@ func Test_2D(t *testing.T) { port := []float64{2, float64(rand.Int31n(100)) / 1000.0} fmt.Printf("port:%v \n", port) if cursor, err := sys.Find(comm.TableArena, bson.M{ - // "dan": 2, + "dan": 2, // "loc": bson.M{ // "$geoWithin": bson.M{ // "$center": bson.A{port, 100},