zhangzengfei
2024-05-07 cdcd6c96d0f9dcd0cfa14efbd6002ceeb45de6bb
cache/cache.go
@@ -90,7 +90,7 @@
               logger.Error(err)
               return
            }
            logger.Debugf("获取%d条人员信息", len(dbPersons))
            logger.Debugf(" eachNum:%d, 获取%d条人员信息", queryEachNum, len(dbPersons))
            CacheMap.Lock()
            areaId := ""
@@ -130,14 +130,14 @@
      logger.Error(err)
      return
   }
   if info.Tableid != "" {
   if info != nil && info.AreaId != "" {
      CacheMap.Lock()
      defer CacheMap.Unlock()
      if _, ok := CacheMap.Area[info.Tableid]; !ok {
         CacheMap.Area[info.Tableid] = shardmap.New(uint8(*threadnum))
      if _, ok := CacheMap.Area[info.AreaId]; !ok {
         CacheMap.Area[info.AreaId] = shardmap.New(uint8(*threadnum))
      }
      CacheMap.Area[info.Tableid].Set(info.Id, info)
      CacheMap.Area[info.Tableid].Settime()
      CacheMap.Area[info.AreaId].Set(info.Id, info)
      CacheMap.Area[info.AreaId].Settime()
   }
}