duxin 6 hónapja
szülő
commit
69a699a5fa
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      common/src/qfw/util/dataexport/dataexport.go

+ 5 - 0
common/src/qfw/util/dataexport/dataexport.go

@@ -941,6 +941,7 @@ func GetDataExportIds(elasticAddress string, scd *SieveCondition, checkCount int
 // checkCount -1 预览500条
 func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress string, scd *SieveCondition, dataType string, checkCount int) (*[]map[string]interface{}, error) {
 	defer qutil.Catch()
+	tm := time.Now()
 	if scd == nil {
 		return nil, errors.New("GetDataExportSearchResult-未获取到查询信息")
 	}
@@ -949,7 +950,9 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
 		if idSelectErr != nil {
 			return nil, idSelectErr
 		}
+		log.Printf("id:%s,查询耗时:%s\n", scd.Id, time.Now().Sub(tm))
 		GetDataExportMatchKey(scd, idSelectDates)
+		log.Printf("id:%s key匹配耗时:%s\n", scd.Id, time.Now().Sub(tm))
 		return idSelectDates, idSelectErr
 	}
 	selectType := scd.SelectType
@@ -1000,7 +1003,9 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
 	if selectType != scd.SelectType {
 		scd.SelectType = selectType
 	}
+	log.Printf("id:%s 查询耗时:%s\n", scd.Id, time.Now().Sub(tm))
 	GetDataExportMatchKey(scd, &res)
+	log.Printf("id:%s key匹配耗时:%s\n", scd.Id, time.Now().Sub(tm))
 	return &res, nil
 }