From 758099331781622800d36511202534a1561737d8 Mon Sep 17 00:00:00 2001 From: zhangjun <53766543@qq.com> Date: Wed, 5 Aug 2020 15:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dsDataex/Config/Config.ini | 5 +++-- .../MyService/DataEX/DataexDAO/DataexDAO.go | 4 ++++ dsDataex/Utils/CacheUtil/OrgtreeCache.go | 4 ++++ dsDataex/gin_server.log | 22 +++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/dsDataex/Config/Config.ini b/dsDataex/Config/Config.ini index 66999bff..8c4ee0c7 100644 --- a/dsDataex/Config/Config.ini +++ b/dsDataex/Config/Config.ini @@ -5,9 +5,9 @@ database = db_dataex user = root pwd = dsideal -;ip = 10.10.6.200 +;ip = 10.10.14.187 ;port = 22066 -;database = base_db_zhangjun +;database = base_db_dev ;user = root ;pwd = DsideaL147258369 @@ -33,6 +33,7 @@ process_no = 1 [elasticsearch] nodes = http://10.10.14.61:9200,http://10.10.14.62:9200,http://10.10.14.63:9200 +;http://10.10.14.188:9200, ;nodes = http://192.168.0.200:9200,http://192.168.0.200:9201,http://192.168.0.200:9202 user = root pwd = dsideal diff --git a/dsDataex/MyService/DataEX/DataexDAO/DataexDAO.go b/dsDataex/MyService/DataEX/DataexDAO/DataexDAO.go index a6d69da0..440566d5 100644 --- a/dsDataex/MyService/DataEX/DataexDAO/DataexDAO.go +++ b/dsDataex/MyService/DataEX/DataexDAO/DataexDAO.go @@ -153,6 +153,10 @@ func GetDatasourceOrgIDS(consumeType int,orgID string) []string { break case 2: result=CacheUtil.OrgtreeGetScope(orgID) + //add by zhangjun 2020-08-05 + if len(result)==0{ + result=append(result,orgID) + } break case -1: diff --git a/dsDataex/Utils/CacheUtil/OrgtreeCache.go b/dsDataex/Utils/CacheUtil/OrgtreeCache.go index 3014c1bf..a22ac131 100644 --- a/dsDataex/Utils/CacheUtil/OrgtreeCache.go +++ b/dsDataex/Utils/CacheUtil/OrgtreeCache.go @@ -33,6 +33,7 @@ func OrgtreeCacheInit(){ PARENT_IDS=make([]string,0) + if count>0{ for no:=0;no