// var package service import ( "qfw/util/mongodb" "sync" ) var ( Sysconfig map[string]interface{} //配置文件 Mogdbs map[string]MongoTool //mongodb连接 ClearThread = make(chan bool, 10) //清洗线程 ResultInfos []*ResultInfo //清洗后的数据 UpResults []*ResultInfo //待更新数据 UpdateLock = sync.Mutex{} //更新锁 UpSize = 100 //批量更新阈值 ) type MongoTool struct { Mongodb mongodb.MongodbSim Name, Coll string } type ResultInfo struct { Bidding *BidInfo // Extract *ExtractInfo // Project *ProjectInfo // Flag int //更新标记 } //bidding数据 type BidInfo struct { Id string Data map[string]interface{} //原始信息 UpParam []string //更新属性集 } //抽取结果数据 type ExtractInfo struct { Id string Data map[string]interface{} //原始信息 UpParam []string //更新属性集 } //项目数据 type ProjectInfo struct { Id string Data map[string]interface{} //原始信息 UpParam []string //更新属性集 }