From 1eedcea2e1b3015a2cbaf0882340bddd4eb604b5 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 28 八月 2024 13:20:05 +0800
Subject: [PATCH] 移除到访小区的判断

---
 cache/shardmap/shardmap.go |    3 +--
 cache/cache.go             |   19 ++++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/cache/cache.go b/cache/cache.go
index 74fd912..91dd9df 100644
--- a/cache/cache.go
+++ b/cache/cache.go
@@ -68,8 +68,9 @@
 	var dbpApi db.DbPersons
 	total, e := dbpApi.GetPersonTotal("")
 
-	var psApi db.PersonStatus
-	accessAreas, _ := psApi.GetPersonAccessedAreas()
+	// 鏆傛椂鍘绘帀鍒拌灏忓尯杩囨护
+	//var psApi db.PersonStatus
+	//accessAreas, _ := psApi.GetPersonAccessedAreas()
 
 	logger.Debugf("鎶撴媿妗f搴撳叡鏈�%d鏉¤褰�", total)
 	if e == nil && total > 0 {
@@ -108,14 +109,14 @@
 						continue
 					}
 
-					for _, areaId := range accessAreas[value.Id] {
-						if _, ok := CaptureDbMap.Area[areaId]; !ok {
-							CaptureDbMap.Area[areaId] = shardmap.New(uint8(*threadnum))
-						}
-
-						CaptureDbMap.Area[areaId].Set(value.Id, value)
-						CaptureDbMap.Area[areaId].Settime()
+					//for _, areaId := range accessAreas[value.Id] {
+					if _, ok := CaptureDbMap.Area[areaId]; !ok {
+						CaptureDbMap.Area[areaId] = shardmap.New(uint8(*threadnum))
 					}
+
+					CaptureDbMap.Area[areaId].Set(value.Id, value)
+					CaptureDbMap.Area[areaId].Settime()
+					//}
 				}
 
 				CaptureDbMap.Unlock()
diff --git a/cache/shardmap/shardmap.go b/cache/shardmap/shardmap.go
index 0f2cb83..96aaded 100644
--- a/cache/shardmap/shardmap.go
+++ b/cache/shardmap/shardmap.go
@@ -4,7 +4,6 @@
 
 import (
 	"basic.com/pubsub/protomsg.git"
-	"fmt"
 	"sdkCompare/db"
 	"sync"
 	//"encoding/json"
@@ -94,7 +93,7 @@
 func (s *ShardMap) Walk(wf wfOp, sourceFea []float32, baseScore float32) (targets []*protomsg.SdkCompareEach) {
 	var wg sync.WaitGroup
 	var lock sync.Mutex
-	fmt.Printf("Walk shards len %d\n", len(s.shards))
+	//fmt.Printf("Walk shards len %d\n", len(s.shards))
 
 	for _, si := range s.shards {
 		var tempsi shardItem = *si

--
Gitblit v1.8.0