From bf0c61da2c42d3888bcd7f54b0430521a32d7922 Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期四, 07 十一月 2019 16:20:55 +0800 Subject: [PATCH] --- --- ruleserver/ruleToformula.go | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ruleserver/ruleToformula.go b/ruleserver/ruleToformula.go index 0b77b50..7a74399 100644 --- a/ruleserver/ruleToformula.go +++ b/ruleserver/ruleToformula.go @@ -224,14 +224,17 @@ if ipcId == sdkData.IpcId { for _, areaMap := range sdkData.AreaMapList { // 鍘诲紑鍚竴涓畾鏃跺櫒 - cacheId = duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message) + cacheid := duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message) + if cacheid != "" { + cacheId = cacheid + } } } } } // 杩涜瀹氭椂鍣ㄧ殑澶勭悊鍜屽垽鏂� timeFlag := TimerAlarm(&label, groupRule.GroupId, result.(bool)) - if timeFlag == "01" || timeFlag == "10" || timeFlag == "11" { // 娌℃湁瀹氭椂鍣ㄦ垨鑰呮弧瓒冲畾鏃跺櫒鏉′欢 + if timeFlag == "01" || timeFlag == "10" || timeFlag == "11" || cacheId != ""{ // 娌℃湁瀹氭椂鍣ㄦ垨鑰呮弧瓒冲畾鏃跺櫒鏉′欢 // 鎵撲汉鑴告爣绛惧拰yolo鏍囩 // 鏈�鍚庢垚鍔熸姤璀︽墠鎶婄鍚堟潯浠剁殑浜鸿劯鏁版嵁濉炶繘缁撴灉鏍囩閲� // 閰嶄簡浜鸿劯鐨勭畻娉曟墠鎶婁汉鑴哥殑鏁版嵁鐢╁嚭鏉ユ墦鏍囩 @@ -286,9 +289,11 @@ labelTypes = append(labelTypes,1) } // 缁欐寔缁椂闂寸殑绗竴寮犺祴浜堢紦瀛樻暟鎹紙閬嶅巻澶嶅埗锛� + logger.Info("缂撳瓨id涓猴細",cacheId) if cacheId != "" { // 鏈夎繖甯ф暟鎹殑缂撳瓨 tempMap := make(map[string]interface{}) for k, result := range args.RuleResult { + logger.Info("缂撳瓨key涓猴細",k) if k == "yolo" { tempMap[k] = []structure.Result{} for _, res := range result.([]structure.Result) { @@ -302,6 +307,7 @@ } } } + logger.Info("缂撳瓨瑙勫垯涓猴細",tempMap) rw.Lock() TimeEleList[cacheId].CacheSdkData.RuleResult = tempMap rw.Unlock() -- Gitblit v1.8.0