xuzhiheng 1 anno fa
parent
commit
b4c2ed413c

+ 0 - 226
customerdata/config.json

@@ -1,226 +0,0 @@
-{
-  "mgodb": "192.168.3.71:29099",
-  "dbsize": 10,
-  "dbname": "datatag_ent",
-  "tasktime": 1,
-  "latestid": "",
-  "latesttime": -600,
-  "buyerinfo": {
-    "addr": "192.168.3.71:29099",
-    "buyerentcoll": "buyer_ent",
-    "db": "mixdata",
-    "hospcoll": "buyer_rank",
-    "password": "",
-    "replSet": "mixdata",
-    "size": 15,
-    "username": ""
-  },
-  "enterprise": {
-    "addr": "192.168.3.71:29099",
-    "coll": "qyxy_std",
-    "db": "mixdata",
-    "password": "",
-    "replSet": "mixdata",
-    "size": 15,
-    "username": ""
-  },
-  "save": {
-    "addr": "192.168.3.206:27080",
-    "coll": "usermail",
-    "coll_project": "usermail_projectid",
-    "db": "jyqyfw",
-    "size": 15
-  },
-  "extract": {
-    "addr": "192.168.3.206:27080",
-    "coll": "result_20200917",
-    "db": "qfw",
-    "size": 15
-  },
-  "es": {
-    "addr": "http://192.168.3.241:9205",
-    "index": "bidding",
-    "itype": "bidding",
-    "password": "",
-    "pool": 15,
-    "userName": "",
-    "version": "v7"
-  },
-  "redis_addrs": "datag=192.168.3.11:1712",
-  "project_appid": [
-    "111",
-    "222",
-    "jyPB1XQgsGBQNbQElICQNW"
-  ],
-  "s_winner_filter": [
-    ",",
-    "//",
-    "、",
-    ";",
-    ";",
-    "#_#",
-    "(01包)",
-    "(02包)",
-    "(1)",
-    "(12)",
-    "(1包)",
-    "(A)",
-    "(A包)",
-    "(按综合评分法排列名次)",
-    "(包1)",
-    "(包5)",
-    "(包二)",
-    "(包件1)",
-    "(包件2)",
-    "(包件一)",
-    "(包三)",
-    "(包四)",
-    "(包一)",
-    "(包一)",
-    "(包组01)",
-    "(包组一)",
-    "(标段一)",
-    "(标项一)",
-    "(成)",
-    "(成员)",
-    "(成员单位)",
-    "(单位名称)",
-    "(第1包)",
-    "(第2包)",
-    "(第3包)",
-    "(第4包)",
-    "(第二包)",
-    "(第二包)",
-    "(第二包中标供应商)",
-    "(第六包)",
-    "(第七包)",
-    "(第三包)",
-    "(第四包)",
-    "(第五包)",
-    "(第一包)",
-    "(电子公章)",
-    "(二包)",
-    "(盖公章)",
-    "(盖章)",
-    "(进口产品代理商)",
-    "(进口代理商)",
-    "(联合体)",
-    "(联合体)",
-    "(联合体成员)",
-    "(联合体牵头单位)",
-    "(联合体牵头人)",
-    "(联合体牵头人)",
-    "(联合体主体)",
-    "(卖方)",
-    "(牵)",
-    "(牵头单位)",
-    "(牵头方)",
-    "(牵头人)",
-    "(全称)",
-    "(实施方)",
-    "(无分包)",
-    "(小微企业)",
-    "(一)",
-    "(一包)",
-    "(一标段)",
-    "(乙方)",
-    "(元)",
-    "(中型企业)",
-    "(重点部分看控)",
-    "(主):",
-    "(主)",
-    "(主)",
-    "(成)",
-    "(主办方)",
-    "(主办方)",
-    "(主体)",
-    "(主体)",
-    "(成员)",
-    "(成员方)",
-    "包1:",
-    "包2:",
-    "/"
-  ],
-  "checkbidopen_appid": [
-    "111",
-    "222",
-    "jyPB1XQgsGBQNbQElICQNW"
-  ],
-  "dis_package_appid": [
-    "111",
-    "222",
-    "jyPB1XQgsGBQNbQElICQNW",
-    "jyMDBXQQIDCQBeSUdBITNf",
-    "jyFApXQQIEAw5TTUZOMBpD",
-    "jyAQ5XQQMIAw5bSkdIBxpg"
-  ],
-  "dis_package_config": {
-    "dianxin": {
-      "exclued": "电信营业厅,电信店,汇通电信工程技术有限公司,电信专营店,电信营业部",
-      "keyWord": "电信,天翼视讯",
-      "name": "电信"
-    },
-    "liantong": {
-      "exclued": "",
-      "keyWord": "联通,联合网络通信",
-      "name": "联通"
-    },
-    "yidong": {
-      "exclued": "",
-      "keyWord": "移动,中移,铁通",
-      "name": "移动"
-    }
-  },
-  "checkbidhref_ruleid": [
-    "5faa5fdb0526b27848ec7452",
-    "5face1e06b35b41ea46e211a",
-    "5faa5fe40526b27848ec7453"
-  ],
-  "need_projectid_appid": [
-    "jyMDBXQQIDCQBeSUdBITNf",
-    "jyFApXQQIEAw5TTUZOMBpD"
-  ],
-  "bidding_mgo": {
-    "addr": "192.168.3.71:29099",
-    "coll": "bidding",
-    "db": "qfw_data",
-    "password": "",
-    "replSet": "",
-    "size": 15,
-    "username": ""
-  },
-  "file_downloadurl": "http://jy-datafile.oss-cn-beijing.aliyuncs.com/",
-  "Henan_mobile_winbid": [
-    "jyAQ5XQQMIAw5bSkdIBxpg"
-  ],
-  "winner_style_match": {
-    "a_integration_company": {
-      "keyWord": "中移在线,中移系统,中移,铁通,天翼视讯,天翼电信,中国通信服务股份有限公司,中通服,广东省电信规划设计院有限公司",
-      "name": "集成公司"
-    },
-    "b_ben_bu": {
-      "keyWord": "移动,联通,联合网络通信,电信,联合通信",
-      "name": "本部"
-    }
-  },
-  "Henan_mobile_bidtype": [
-    "jyAQ5XQQMIAw5bSkdIBxpg",
-    "jyMhBXQQMICQ9cSkJJDj5a"
-  ],
-  "filter_filehref_appid": [
-    "jyFzZXQQIECAZYQERAPD93"
-  ],
-  "filter_file_and_detail": [
-    "",
-    ""
-  ],
-  "filter_detail_count": 15,
-  "isNewSql": 1,
-  "filter_Temporary_col": [
-    ""
-  ],
-  "filter_Temporary_col_name": "",
-  "xhsMapArr": [
-    ""
-  ]
-}

File diff suppressed because it is too large
+ 0 - 0
customerdata/src/config.json


+ 1 - 1
customerdata/datamodel.go → customerdata/src/datamodel.go

@@ -4,7 +4,7 @@ import (
 	"regexp"
 	"regexp"
 	"sync"
 	"sync"
 
 
-	"gopkg.in/util.Mgo.v2/bson"
+	"gopkg.in/mgo.v2/bson"
 )
 )
 
 
 // 客户模型
 // 客户模型

+ 8 - 7
customerdata/historytask.go → customerdata/src/historytask.go

@@ -2,6 +2,7 @@ package main
 
 
 import (
 import (
 	"log"
 	"log"
+	qu "qfw/util"
 	"strings"
 	"strings"
 	"time"
 	"time"
 	mgoutil "util/mgodb"
 	mgoutil "util/mgodb"
@@ -16,12 +17,12 @@ func HistoryTask(name string) {
 	if len(customer) == 1 {
 	if len(customer) == 1 {
 		c := customer[0]
 		c := customer[0]
 		customerId := mgoutil.BsonTOStringId(c["_id"])
 		customerId := mgoutil.BsonTOStringId(c["_id"])
-		customer := common.ObjToString(c["s_name"])   //客户名称
-		appId := common.ObjToString(c["s_appid"])     //appid
-		extends := common.ObjToString(c["s_extends"]) //扩展信息
-		pushModel := common.IntAll(c["i_pushmodel"])  //推送模式
-		dataSave := common.ObjToString(c["s_dataSave"])
-		exact := common.IntAll(c["i_exact"])
+		customer := qu.ObjToString(c["s_name"])   //客户名称
+		appId := qu.ObjToString(c["s_appid"])     //appid
+		extends := qu.ObjToString(c["s_extends"]) //扩展信息
+		pushModel := qu.IntAll(c["i_pushmodel"])  //推送模式
+		dataSave := qu.ObjToString(c["s_dataSave"])
+		exact := qu.IntAll(c["i_exact"])
 
 
 		cus := &Customer{}
 		cus := &Customer{}
 		cus.SaveDataMap = map[string]map[string]interface{}{}
 		cus.SaveDataMap = map[string]map[string]interface{}{}
@@ -51,7 +52,7 @@ func HistoryTask(name string) {
 		cus.GetTagRules()             //获取客户打标签规则
 		cus.GetTagRules()             //获取客户打标签规则
 		cus.GetDepartments("history") //获取客户信息
 		cus.GetDepartments("history") //获取客户信息
 		//PrintLog(cus)        //打印查看初始化的信息
 		//PrintLog(cus)        //打印查看初始化的信息
-		common.Debug("customer:", cus.ID, cus.Name, cus.PushModel, cus.AppId, cus.IsTagRule, cus.IsSearchHosp, cus.IsSearchEnps, len(cus.TagRules), len(cus.Departments))
+		qu.Debug("customer:", cus.ID, cus.Name, cus.PushModel, cus.AppId, cus.IsTagRule, cus.IsSearchHosp, cus.IsSearchEnps, len(cus.TagRules), len(cus.Departments))
 		cus.GetData("history") //获取数据
 		cus.GetData("history") //获取数据
 		cus.RemoveRepeatData() //数据去重
 		cus.RemoveRepeatData() //数据去重
 
 

+ 1 - 1
customerdata/jylog.go → customerdata/src/jylog.go

@@ -11,7 +11,7 @@ import (
 	"regexp"
 	"regexp"
 	"time"
 	"time"
 
 
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"github.com/go-xweb/xweb"
 	"github.com/robfig/cron"
 	"github.com/robfig/cron"
 )
 )
 
 

+ 46 - 42
customerdata/main.go → customerdata/src/main.go

@@ -1,13 +1,17 @@
 package main
 package main
 
 
 import (
 import (
-	"app.yhyue.com/moapp/jybase/logger"
 	elastic "es"
 	elastic "es"
 	"flag"
 	"flag"
 	"log"
 	"log"
+	qu "qfw/util"
+
 	// "qfw/util/elastic"
 	// "qfw/util/elastic"
 	"qfw/util/redis"
 	"qfw/util/redis"
 	"sync"
 	"sync"
+	"util/mgodb"
+
+	"github.com/donnie4w/go-logger/logger"
 )
 )
 
 
 type sysconfig struct {
 type sysconfig struct {
@@ -89,84 +93,84 @@ var (
 )
 )
 
 
 func init() {
 func init() {
-	common.ReadConfig(&Sysconfig)
+	qu.ReadConfig(&Sysconfig)
 	logger.SetRollingDaily("./logs", "spider.log")
 	logger.SetRollingDaily("./logs", "spider.log")
 	//mgo datatag
 	//mgo datatag
 	MgoTag = &mongodb.MongodbSim{
 	MgoTag = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(Sysconfig.Mgodb),
-		DbName:      common.ObjToString(Sysconfig.DbName),
-		Size:        common.IntAllDef(Sysconfig.DbSize, 15),
+		MongodbAddr: qu.ObjToString(Sysconfig.Mgodb),
+		DbName:      qu.ObjToString(Sysconfig.DbName),
+		Size:        qu.IntAllDef(Sysconfig.DbSize, 15),
 	}
 	}
 	MgoTag.InitPool()
 	MgoTag.InitPool()
 	//mgo save
 	//mgo save
 	save := Sysconfig.Save
 	save := Sysconfig.Save
-	SaveColl = common.ObjToString(save["coll"])
-	SaveCollProject = common.ObjToString(save["coll_project"])
+	SaveColl = qu.ObjToString(save["coll"])
+	SaveCollProject = qu.ObjToString(save["coll_project"])
 	MgoSave = &mongodb.MongodbSim{
 	MgoSave = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(save["addr"]),
-		DbName:      common.ObjToString(save["db"]),
-		Size:        common.IntAllDef(save["size"], 15),
+		MongodbAddr: qu.ObjToString(save["addr"]),
+		DbName:      qu.ObjToString(save["db"]),
+		Size:        qu.IntAllDef(save["size"], 15),
 	}
 	}
 	MgoSave.InitPool()
 	MgoSave.InitPool()
 	//mgo buyerinfo
 	//mgo buyerinfo
 	buyerinfo := Sysconfig.BuyerInfo
 	buyerinfo := Sysconfig.BuyerInfo
-	HospColl = common.ObjToString(buyerinfo["hospcoll"])
-	BuyerEntColl = common.ObjToString(buyerinfo["buyerentcoll"])
+	HospColl = qu.ObjToString(buyerinfo["hospcoll"])
+	BuyerEntColl = qu.ObjToString(buyerinfo["buyerentcoll"])
 	MgoBuyer = &mongodb.MongodbSim{
 	MgoBuyer = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(buyerinfo["addr"]),
-		DbName:      common.ObjToString(buyerinfo["db"]),
-		Size:        common.IntAllDef(buyerinfo["size"], 15),
-		UserName:    common.ObjToString(buyerinfo["username"]),
-		Password:    common.ObjToString(buyerinfo["password"]),
-		ReplSet:     common.ObjToString(buyerinfo["replSet"]),
+		MongodbAddr: qu.ObjToString(buyerinfo["addr"]),
+		DbName:      qu.ObjToString(buyerinfo["db"]),
+		Size:        qu.IntAllDef(buyerinfo["size"], 15),
+		UserName:    qu.ObjToString(buyerinfo["username"]),
+		Password:    qu.ObjToString(buyerinfo["password"]),
+		ReplSet:     qu.ObjToString(buyerinfo["replSet"]),
 	}
 	}
 	MgoBuyer.InitPool()
 	MgoBuyer.InitPool()
 	//mgo enterprise
 	//mgo enterprise
 	enterprise := Sysconfig.Enterprise
 	enterprise := Sysconfig.Enterprise
-	EnpsColl = common.ObjToString(enterprise["coll"])
+	EnpsColl = qu.ObjToString(enterprise["coll"])
 	MgoEnps = &mongodb.MongodbSim{
 	MgoEnps = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(enterprise["addr"]),
-		DbName:      common.ObjToString(enterprise["db"]),
-		Size:        common.IntAllDef(enterprise["size"], 15),
-		UserName:    common.ObjToString(buyerinfo["username"]),
-		Password:    common.ObjToString(buyerinfo["password"]),
-		ReplSet:     common.ObjToString(buyerinfo["replSet"]),
+		MongodbAddr: qu.ObjToString(enterprise["addr"]),
+		DbName:      qu.ObjToString(enterprise["db"]),
+		Size:        qu.IntAllDef(enterprise["size"], 15),
+		UserName:    qu.ObjToString(buyerinfo["username"]),
+		Password:    qu.ObjToString(buyerinfo["password"]),
+		ReplSet:     qu.ObjToString(buyerinfo["replSet"]),
 	}
 	}
 	MgoEnps.InitPool()
 	MgoEnps.InitPool()
 	//
 	//
 	extract := Sysconfig.Extract
 	extract := Sysconfig.Extract
-	ExtractColl = common.ObjToString(extract["coll"])
+	ExtractColl = qu.ObjToString(extract["coll"])
 	MgoExtract = &mongodb.MongodbSim{
 	MgoExtract = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(extract["addr"]),
-		DbName:      common.ObjToString(extract["db"]),
-		Size:        common.IntAllDef(extract["size"], 15),
+		MongodbAddr: qu.ObjToString(extract["addr"]),
+		DbName:      qu.ObjToString(extract["db"]),
+		Size:        qu.IntAllDef(extract["size"], 15),
 	}
 	}
 	MgoExtract.InitPool()
 	MgoExtract.InitPool()
 
 
 	//bidding库
 	//bidding库
 	bidding := Sysconfig.BiddingMgo
 	bidding := Sysconfig.BiddingMgo
-	BiddingColl = common.ObjToString(bidding["coll"])
+	BiddingColl = qu.ObjToString(bidding["coll"])
 	MgoBidding = &mongodb.MongodbSim{
 	MgoBidding = &mongodb.MongodbSim{
-		MongodbAddr: common.ObjToString(bidding["addr"]),
-		DbName:      common.ObjToString(bidding["db"]),
-		Size:        common.IntAll(bidding["size"]),
-		UserName:    common.ObjToString(bidding["username"]),
-		Password:    common.ObjToString(bidding["password"]),
-		ReplSet:     common.ObjToString(bidding["replSet"]),
+		MongodbAddr: qu.ObjToString(bidding["addr"]),
+		DbName:      qu.ObjToString(bidding["db"]),
+		Size:        qu.IntAll(bidding["size"]),
+		UserName:    qu.ObjToString(bidding["username"]),
+		Password:    qu.ObjToString(bidding["password"]),
+		ReplSet:     qu.ObjToString(bidding["replSet"]),
 	}
 	}
 	MgoBidding.InitPool()
 	MgoBidding.InitPool()
 
 
 	//es
 	//es
 	es := Sysconfig.Es
 	es := Sysconfig.Es
 	// Es = &elastic.Elastic{
 	// Es = &elastic.Elastic{
-	// 	S_esurl: common.ObjToString(es["addr"]),
-	// 	I_size:  common.IntAllDef(es["pool"], 15),
+	// 	S_esurl: qu.ObjToString(es["addr"]),
+	// 	I_size:  qu.IntAllDef(es["pool"], 15),
 	// }
 	// }
 	// Es.InitElasticSize()
 	// Es.InitElasticSize()
-	Es = elastic.NewEs(common.ObjToString(es["version"]), common.ObjToString(es["addr"]), common.IntAllDef(es["pool"], 15), common.ObjToString(es["userName"]), common.ObjToString(es["password"]))
+	Es = elastic.NewEs(qu.ObjToString(es["version"]), qu.ObjToString(es["addr"]), qu.IntAllDef(es["pool"], 15), qu.ObjToString(es["userName"]), qu.ObjToString(es["password"]))
 	redis.InitRedis(Sysconfig.RedisAddrs)
 	redis.InitRedis(Sysconfig.RedisAddrs)
-	Index = common.ObjToString(es["index"])
-	Itype = common.ObjToString(es["itype"])
+	Index = qu.ObjToString(es["index"])
+	Itype = qu.ObjToString(es["itype"])
 	//
 	//
 	TaskTime = Sysconfig.TaskTime
 	TaskTime = Sysconfig.TaskTime
 	LatestId = Sysconfig.LatestId
 	LatestId = Sysconfig.LatestId
@@ -177,7 +181,7 @@ func init() {
 	// 	"s_winner": "邓州市兴都供销社第八门市部",
 	// 	"s_winner": "邓州市兴都供销社第八门市部",
 	// }
 	// }
 	// AssembelSave(tmp, true, true)
 	// AssembelSave(tmp, true, true)
-	// common.Debug(tmp)
+	// qu.Debug(tmp)
 	for _, v := range Sysconfig.ProjectAppid {
 	for _, v := range Sysconfig.ProjectAppid {
 		projectAppidMap[v] = true
 		projectAppidMap[v] = true
 	}
 	}

+ 16 - 12
customerdata/mainT.go → customerdata/src/mainT.go

@@ -1,9 +1,13 @@
-package main
+ package main
+
+import (
+	qu "qfw/util"
+)
 
 
 func main1() {
 func main1() {
 	cus := &Customer{}
 	cus := &Customer{}
 	cus.IsTagRule = true                                  //是否合并tagname
 	cus.IsTagRule = true                                  //是否合并tagname
-	cus.SaveDataArr = map[string]map[string]interface{}{} //4
+	cus.SaveDataArr = map[string]map[string]interface{}{}          //4
 	cus.SaveDataMap = map[string]map[string]interface{}{} //0
 	cus.SaveDataMap = map[string]map[string]interface{}{} //0
 
 
 	dm := &Department{}
 	dm := &Department{}
@@ -30,16 +34,16 @@ func main1() {
 	cus.Departments = append(cus.Departments, dm)
 	cus.Departments = append(cus.Departments, dm)
 	//cus.PushModel = 0 //推送模式
 	//cus.PushModel = 0 //推送模式
 	// cus.RemoveRepeatData()
 	// cus.RemoveRepeatData()
-	// common.Debug(len(cus.SaveDataMap))
+	// qu.Debug(len(cus.SaveDataMap))
 	// for id, tmp := range cus.SaveDataMap {
 	// for id, tmp := range cus.SaveDataMap {
-	// 	common.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
+	// 	qu.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
 	// }
 	// }
 
 
 	// cus.PushModel = 4 //规则模式
 	// cus.PushModel = 4 //规则模式
 	// cus.RemoveRepeatData()
 	// cus.RemoveRepeatData()
-	// common.Debug(len(cus.SaveDataArr))
+	// qu.Debug(len(cus.SaveDataArr))
 	// for _, tmp := range cus.SaveDataArr {
 	// for _, tmp := range cus.SaveDataArr {
-	// 	common.Debug(tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
+	// 	qu.Debug(tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
 	// }
 	// }
 
 
 	//2.测试一个客户多部门多个规则数据合并
 	//2.测试一个客户多部门多个规则数据合并
@@ -70,25 +74,25 @@ func main1() {
 	cus.Departments = append(cus.Departments, dm2)
 	cus.Departments = append(cus.Departments, dm2)
 	// cus.PushModel = 0 //推送模式
 	// cus.PushModel = 0 //推送模式
 	// cus.RemoveRepeatData()
 	// cus.RemoveRepeatData()
-	// common.Debug(len(cus.SaveDataMap))
+	// qu.Debug(len(cus.SaveDataMap))
 	// for id, tmp := range cus.SaveDataMap {
 	// for id, tmp := range cus.SaveDataMap {
-	// 	common.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
+	// 	qu.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
 	// }
 	// }
 
 
 	// cus.PushModel = 4 //规则模式
 	// cus.PushModel = 4 //规则模式
 	// cus.RemoveRepeatData()
 	// cus.RemoveRepeatData()
 	// cus.AssembelAndSaveData()
 	// cus.AssembelAndSaveData()
-	// common.Debug(len(cus.SaveDataArr))
+	// qu.Debug(len(cus.SaveDataArr))
 	// for _, tmp := range cus.SaveDataArr {
 	// for _, tmp := range cus.SaveDataArr {
-	// 	common.Debug(tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
+	// 	qu.Debug(tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
 	// }
 	// }
 
 
 	cus.PushModel = 1 //部门去重
 	cus.PushModel = 1 //部门去重
 	cus.RemoveRepeatData()
 	cus.RemoveRepeatData()
 	for _, dm := range cus.Departments {
 	for _, dm := range cus.Departments {
-		common.Debug("---------------------------------")
+		qu.Debug("---------------------------------")
 		for id, tmp := range dm.SaveDataMap {
 		for id, tmp := range dm.SaveDataMap {
-			common.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
+			qu.Debug(id, tmp["tagname"], tmp["matchkey"], tmp["ruleid"])
 		}
 		}
 	}
 	}
 
 

+ 101 - 99
customerdata/task.go → customerdata/src/task.go

@@ -5,21 +5,23 @@ import (
 	"encoding/json"
 	"encoding/json"
 	"fmt"
 	"fmt"
 	"log"
 	"log"
+	qu "qfw/util"
 	"qfw/util/redis"
 	"qfw/util/redis"
 	"regexp"
 	"regexp"
+	. "sqlmodel"
 	"strings"
 	"strings"
 	"sync"
 	"sync"
 	"time"
 	"time"
 	mgoutil "util/mgodb"
 	mgoutil "util/mgodb"
 
 
-	"gopkg.in/util.Mgo.v2/bson"
+	"gopkg.in/mgo.v2/bson"
 
 
 	"github.com/cron"
 	"github.com/cron"
 
 
 	esv "es"
 	esv "es"
 
 
-	"app.yhyue.com/moapp/jybase/logger"
 	"github.com/antonmedv/expr"
 	"github.com/antonmedv/expr"
+	"github.com/donnie4w/go-logger/logger"
 	"go.mongodb.org/mongo-driver/bson/primitive"
 	"go.mongodb.org/mongo-driver/bson/primitive"
 
 
 	esV7 "github.com/olivere/elastic"
 	esV7 "github.com/olivere/elastic"
@@ -39,7 +41,7 @@ func StartTask() {
 
 
 // 加载客户
 // 加载客户
 func GetCustomerData() {
 func GetCustomerData() {
-	defer common.Catch()
+	defer qu.Catch()
 	log.Println("Init Customer...")
 	log.Println("Init Customer...")
 	idRange, idRange2, ok, endTime := GetIdRange() //获取id区间
 	idRange, idRange2, ok, endTime := GetIdRange() //获取id区间
 	if !ok {
 	if !ok {
@@ -50,11 +52,11 @@ func GetCustomerData() {
 	customers, _ := MgoTag.Find("euser", map[string]interface{}{"i_push": 1, "b_delete": false}, nil, nil)
 	customers, _ := MgoTag.Find("euser", map[string]interface{}{"i_push": 1, "b_delete": false}, nil, nil)
 	for _, c := range customers {
 	for _, c := range customers {
 		customerId := mgoutil.BsonTOStringId(c["_id"])
 		customerId := mgoutil.BsonTOStringId(c["_id"])
-		customer := common.ObjToString(c["s_name"])   //客户名称
-		appId := common.ObjToString(c["s_appid"])     //appid
-		extends := common.ObjToString(c["s_extends"]) //扩展信息
-		pushModel := common.IntAll(c["i_pushmodel"])  //推送模式
-		dataSave := common.ObjToString(c["s_dataSave"])
+		customer := qu.ObjToString(c["s_name"])   //客户名称
+		appId := qu.ObjToString(c["s_appid"])     //appid
+		extends := qu.ObjToString(c["s_extends"]) //扩展信息
+		pushModel := qu.IntAll(c["i_pushmodel"])  //推送模式
+		dataSave := qu.ObjToString(c["s_dataSave"])
 		log.Println("当前客户 ", customer)
 		log.Println("当前客户 ", customer)
 		cus := &Customer{}
 		cus := &Customer{}
 		cus.SaveDataMap = map[string]map[string]interface{}{}
 		cus.SaveDataMap = map[string]map[string]interface{}{}
@@ -87,37 +89,37 @@ func GetCustomerData() {
 		cus.GetTagRules()      //获取客户打标签规则
 		cus.GetTagRules()      //获取客户打标签规则
 		cus.GetDepartments("") //获取客户信息
 		cus.GetDepartments("") //获取客户信息
 		//PrintLog(cus)        //打印查看初始化的信息
 		//PrintLog(cus)        //打印查看初始化的信息
-		common.Debug("customer:", cus.ID, cus.Name, cus.PushModel, cus.AppId, cus.IsTagRule, cus.IsTagRule2, cus.IsTagRule3, cus.IsSearchHosp, cus.IsSearchEnps, len(cus.TagRules), len(cus.TagRules2), len(cus.TagRules3), len(cus.Departments))
+		qu.Debug("customer:", cus.ID, cus.Name, cus.PushModel, cus.AppId, cus.IsTagRule, cus.IsTagRule2, cus.IsTagRule3, cus.IsSearchHosp, cus.IsSearchEnps, len(cus.TagRules), len(cus.TagRules2), len(cus.TagRules3), len(cus.Departments))
 		cus.GetData("")           //获取数据
 		cus.GetData("")           //获取数据
 		cus.RemoveRepeatData()    //数据去重
 		cus.RemoveRepeatData()    //数据去重
 		cus.AssembelAndSaveData() //组装、保存数据
 		cus.AssembelAndSaveData() //组装、保存数据
 	}
 	}
 	Sysconfig.LatestId = LatestId
 	Sysconfig.LatestId = LatestId
 	Sysconfig.LatestTime = endTime
 	Sysconfig.LatestTime = endTime
-	common.WriteSysConfig(Sysconfig)
+	qu.WriteSysConfig(Sysconfig)
 	logger.Debug("定时任务结束-endId-Sysconfig.LatestTime ", endTime)
 	logger.Debug("定时任务结束-endId-Sysconfig.LatestTime ", endTime)
 }
 }
 
 
 // 获取客户打标签规则
 // 获取客户打标签规则
 func (c *Customer) GetTagRules() {
 func (c *Customer) GetTagRules() {
 	log.Println("开始加载标签规则...")
 	log.Println("开始加载标签规则...")
-	defer common.Catch()
+	defer qu.Catch()
 	tagRules, _ := MgoTag.Find("eusertagrule", map[string]interface{}{"s_userid": c.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	tagRules, _ := MgoTag.Find("eusertagrule", map[string]interface{}{"s_userid": c.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	if len(tagRules) > 0 {
 	if len(tagRules) > 0 {
 		for _, tr := range tagRules {
 		for _, tr := range tagRules {
-			tagType := common.ObjToString(tr["tagType"])
+			tagType := qu.ObjToString(tr["tagType"])
 			if tagType == "" || tagType == "1" {
 			if tagType == "" || tagType == "1" {
 				c.IsTagRule = true //查到打标签规则,表示打标签
 				c.IsTagRule = true //查到打标签规则,表示打标签
 				TR := &TagRule{}
 				TR := &TagRule{}
 				TR.Fields = make(map[string]interface{})
 				TR.Fields = make(map[string]interface{})
 				TR.DepartRuleIds = make(map[string]bool)
 				TR.DepartRuleIds = make(map[string]bool)
 				id := mgoutil.BsonTOStringId(tr["_id"])
 				id := mgoutil.BsonTOStringId(tr["_id"])
-				name := common.ObjToString(tr["s_name"])
+				name := qu.ObjToString(tr["s_name"])
 				TR.ID = id
 				TR.ID = id
 				TR.Name = name
 				TR.Name = name
 				TR.CustomerId = c.ID
 				TR.CustomerId = c.ID
 				//部门规则id组
 				//部门规则id组
-				if departRuleIds := common.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
+				if departRuleIds := qu.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
 					for _, drid := range strings.Split(departRuleIds, ",") {
 					for _, drid := range strings.Split(departRuleIds, ",") {
 						TR.DepartRuleIds[drid] = true
 						TR.DepartRuleIds[drid] = true
 					}
 					}
@@ -138,12 +140,12 @@ func (c *Customer) GetTagRules() {
 			TR.Fields = make(map[string]interface{})
 			TR.Fields = make(map[string]interface{})
 			TR.DepartRuleIds = make(map[string]bool)
 			TR.DepartRuleIds = make(map[string]bool)
 			id := mgoutil.BsonTOStringId(tr["_id"])
 			id := mgoutil.BsonTOStringId(tr["_id"])
-			name := common.ObjToString(tr["s_name"])
+			name := qu.ObjToString(tr["s_name"])
 			TR.ID = id
 			TR.ID = id
 			TR.Name = name
 			TR.Name = name
 			TR.CustomerId = c.ID
 			TR.CustomerId = c.ID
 			//部门规则id组
 			//部门规则id组
-			if departRuleIds := common.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
+			if departRuleIds := qu.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
 				for _, drid := range strings.Split(departRuleIds, ",") {
 				for _, drid := range strings.Split(departRuleIds, ",") {
 					TR.DepartRuleIds[drid] = true
 					TR.DepartRuleIds[drid] = true
 				}
 				}
@@ -163,12 +165,12 @@ func (c *Customer) GetTagRules() {
 			TR.Fields = make(map[string]interface{})
 			TR.Fields = make(map[string]interface{})
 			TR.DepartRuleIds = make(map[string]bool)
 			TR.DepartRuleIds = make(map[string]bool)
 			id := mgoutil.BsonTOStringId(tr["_id"])
 			id := mgoutil.BsonTOStringId(tr["_id"])
-			name := common.ObjToString(tr["s_name"])
+			name := qu.ObjToString(tr["s_name"])
 			TR.ID = id
 			TR.ID = id
 			TR.Name = name
 			TR.Name = name
 			TR.CustomerId = c.ID
 			TR.CustomerId = c.ID
 			//部门规则id组
 			//部门规则id组
-			if departRuleIds := common.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
+			if departRuleIds := qu.ObjToString(tr["o_departruleids"]); departRuleIds != "" {
 				for _, drid := range strings.Split(departRuleIds, ",") {
 				for _, drid := range strings.Split(departRuleIds, ",") {
 					TR.DepartRuleIds[drid] = true
 					TR.DepartRuleIds[drid] = true
 				}
 				}
@@ -185,7 +187,7 @@ func (c *Customer) GetTagRules() {
 // 获取部门信息
 // 获取部门信息
 func (c *Customer) GetDepartments(stype string) {
 func (c *Customer) GetDepartments(stype string) {
 	log.Println("开始获取部门信息...")
 	log.Println("开始获取部门信息...")
-	defer common.Catch()
+	defer qu.Catch()
 	departments, _ := MgoTag.Find("euserdepart", map[string]interface{}{"s_userid": c.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	departments, _ := MgoTag.Find("euserdepart", map[string]interface{}{"s_userid": c.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	if len(departments) > 0 {
 	if len(departments) > 0 {
 		for _, ds := range departments {
 		for _, ds := range departments {
@@ -194,13 +196,13 @@ func (c *Customer) GetDepartments(stype string) {
 			DM.DepartmentData = map[string][]map[string]interface{}{}
 			DM.DepartmentData = map[string][]map[string]interface{}{}
 			DM.SaveDataMap = map[string]map[string]interface{}{}
 			DM.SaveDataMap = map[string]map[string]interface{}{}
 			id := mgoutil.BsonTOStringId(ds["_id"])
 			id := mgoutil.BsonTOStringId(ds["_id"])
-			name := common.ObjToString(ds["s_name"])
+			name := qu.ObjToString(ds["s_name"])
 			DM.ID = id
 			DM.ID = id
 			DM.Name = name
 			DM.Name = name
 			DM.CustomerID = c.ID
 			DM.CustomerID = c.ID
 			DM.GetSearchRules(c.ID, stype, c.IdRange, c.IdRanges) //获取某个部门的所有规则
 			DM.GetSearchRules(c.ID, stype, c.IdRange, c.IdRanges) //获取某个部门的所有规则
 			c.Departments = append(c.Departments, DM)
 			c.Departments = append(c.Departments, DM)
-			//common.Debug("Departments---", DM.ID, DM.Name, DM.CustomerID, len(DM.Rules))
+			//qu.Debug("Departments---", DM.ID, DM.Name, DM.CustomerID, len(DM.Rules))
 		}
 		}
 	}
 	}
 }
 }
@@ -208,9 +210,9 @@ func (c *Customer) GetDepartments(stype string) {
 // 获取数据
 // 获取数据
 func (c *Customer) GetData(stype string) {
 func (c *Customer) GetData(stype string) {
 	log.Println("开始匹配数据...")
 	log.Println("开始匹配数据...")
-	defer common.Catch()
+	defer qu.Catch()
 	esConfig := Sysconfig.Es
 	esConfig := Sysconfig.Es
-	esversion := common.ObjToString(esConfig["version"])
+	esversion := qu.ObjToString(esConfig["version"])
 	if esversion == "v1" {
 	if esversion == "v1" {
 	} else {
 	} else {
 		esCon := esv.VarEs.(*esv.EsV7)
 		esCon := esv.VarEs.(*esv.EsV7)
@@ -303,26 +305,26 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 						if json.Unmarshal(hit.Source, &tmp) == nil {
 						if json.Unmarshal(hit.Source, &tmp) == nil {
 							if stype != "history" {
 							if stype != "history" {
 								if !SkipData(tmp) {
 								if !SkipData(tmp) {
-									common.Debug("跳过该条数据,发布时间在入库时间7天之前,", common.ObjToString(tmp["_id"]))
+									qu.Debug("跳过该条数据,发布时间在入库时间7天之前,", qu.ObjToString(tmp["_id"]))
 									continue
 									continue
 								}
 								}
 							}
 							}
-							id := common.ObjToString(tmp["id"])
+							id := qu.ObjToString(tmp["id"])
 							//亚信
 							//亚信
 							if CheckBidOpenAppidMap[c.AppId] {
 							if CheckBidOpenAppidMap[c.AppId] {
 								if tmp["bidopentime"] != nil {
 								if tmp["bidopentime"] != nil {
-									bidopentime := common.Int64All(tmp["bidopentime"])
-									comeintime := common.Int64All(tmp["comeintime"])
+									bidopentime := qu.Int64All(tmp["bidopentime"])
+									comeintime := qu.Int64All(tmp["comeintime"])
 									if bidopentime-comeintime <= 7*24*60*60 {
 									if bidopentime-comeintime <= 7*24*60*60 {
-										common.Debug("跳过该条数据,开标时间-入库时间<=7天,", id)
+										qu.Debug("跳过该条数据,开标时间-入库时间<=7天,", id)
 										continue
 										continue
 									}
 									}
 								}
 								}
 							}
 							}
 							//河南移动,过滤掉中国移动采购网招标数据
 							//河南移动,过滤掉中国移动采购网招标数据
 							if CheckBidHrefRuleIdMap[dm.ID] {
 							if CheckBidHrefRuleIdMap[dm.ID] {
-								if strings.Contains(common.ObjToString(tmp["href"]), "b2b.10086.cn") {
-									common.Debug("跳过该条数据,公告原网址中包含 b2b.10086.cn,", id)
+								if strings.Contains(qu.ObjToString(tmp["href"]), "b2b.10086.cn") {
+									qu.Debug("跳过该条数据,公告原网址中包含 b2b.10086.cn,", id)
 									continue
 									continue
 								}
 								}
 							}
 							}
@@ -339,7 +341,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 							delete(tmp, "_id")
 							delete(tmp, "_id")
 							if sr.ExtFieldType == 2 {
 							if sr.ExtFieldType == 2 {
 								findwinner := ""
 								findwinner := ""
-								s_winner := strings.Split(common.ObjToString(tmp["s_winner"]), ",")
+								s_winner := strings.Split(qu.ObjToString(tmp["s_winner"]), ",")
 								if len(s_winner) > 0 {
 								if len(s_winner) > 0 {
 									for i := 0; i < len(s_winner); i++ {
 									for i := 0; i < len(s_winner); i++ {
 										findwinners := strings.TrimSpace(s_winner[i])
 										findwinners := strings.TrimSpace(s_winner[i])
@@ -354,27 +356,27 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 										}
 										}
 									}
 									}
 								}
 								}
-								// findwinner := strings.TrimSpace(common.ObjToString(tmp["winner"]))
+								// findwinner := strings.TrimSpace(qu.ObjToString(tmp["winner"]))
 								if findwinner != "" {
 								if findwinner != "" {
 									finddata := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
 									finddata := MgoEnps.FindOne(EnpsColl, bson.M{"company_name": findwinner})
 									if finddata != nil {
 									if finddata != nil {
-										if legal_person := common.ObjToString(finddata["legal_person"]); legal_person != "" {
+										if legal_person := qu.ObjToString(finddata["legal_person"]); legal_person != "" {
 											tmp["legal_person"] = legal_person
 											tmp["legal_person"] = legal_person
 										}
 										}
-										if email := common.ObjToString(finddata["company_email"]); email != "" {
+										if email := qu.ObjToString(finddata["company_email"]); email != "" {
 											tmp["company_email"] = email
 											tmp["company_email"] = email
 										}
 										}
-										if phone := common.ObjToString(finddata["company_phone"]); phone != "" {
+										if phone := qu.ObjToString(finddata["company_phone"]); phone != "" {
 											tmp["company_phone"] = phone
 											tmp["company_phone"] = phone
 										}
 										}
 										//从最新年报中获取 中标单位联系电话、中标单位邮箱
 										//从最新年报中获取 中标单位联系电话、中标单位邮箱
 										// if annual_reports, ok := finddata["annual_reports"].(primitive.A); ok && len(annual_reports) > 0 {
 										// if annual_reports, ok := finddata["annual_reports"].(primitive.A); ok && len(annual_reports) > 0 {
 										// 	anreport := Sort_year_report(annual_reports)
 										// 	anreport := Sort_year_report(annual_reports)
 										// 	if len(anreport) > 0 {
 										// 	if len(anreport) > 0 {
-										// 		if email := common.ObjToString(anreport["company_email"]); email != "" {
+										// 		if email := qu.ObjToString(anreport["company_email"]); email != "" {
 										// 			tmp["company_email"] = email
 										// 			tmp["company_email"] = email
 										// 		}
 										// 		}
-										// 		if phone := common.ObjToString(anreport["company_phone"]); phone != "" {
+										// 		if phone := qu.ObjToString(anreport["company_phone"]); phone != "" {
 										// 			tmp["company_phone"] = phone
 										// 			tmp["company_phone"] = phone
 										// 		}
 										// 		}
 										// 	}
 										// 	}
@@ -387,13 +389,13 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 							//先获取用到的所有字段值
 							//先获取用到的所有字段值
 							fieldText := map[string]interface{}{}
 							fieldText := map[string]interface{}{}
 							for field, _ := range sr.Fields {
 							for field, _ := range sr.Fields {
-								text := common.ObjToString(tmp[field])
+								text := qu.ObjToString(tmp[field])
 								text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 								text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 								fieldText[field] = text
 								fieldText[field] = text
 							}
 							}
 							//清理词清理
 							//清理词清理
 							for _, cwm := range sr.GCW.MatchType {
 							for _, cwm := range sr.GCW.MatchType {
-								if text := common.ObjToString(fieldText[cwm]); text != "" {
+								if text := qu.ObjToString(fieldText[cwm]); text != "" {
 									for _, gcw_reg := range sr.GCW.KeyReg {
 									for _, gcw_reg := range sr.GCW.KeyReg {
 										text = gcw_reg.ReplaceAllString(text, "")
 										text = gcw_reg.ReplaceAllString(text, "")
 									}
 									}
@@ -406,11 +408,11 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 								data, _ := MgoTag.Find("groups", map[string]interface{}{"ruleId": sr.ID}, nil, nil)
 								data, _ := MgoTag.Find("groups", map[string]interface{}{"ruleId": sr.ID}, nil, nil)
 								if data != nil && len(data) > 0 {
 								if data != nil && len(data) > 0 {
 									for _, v := range data {
 									for _, v := range data {
-										nameArr = append(nameArr, common.ObjToString(v["name"]))
+										nameArr = append(nameArr, qu.ObjToString(v["name"]))
 									}
 									}
 								}
 								}
-								exactResult := exactMatchs(sr.ExactRule, common.ObjToString(tmp["title"]), common.ObjToString(tmp["detail"]), sr.Maths, nameArr)
-								common.Debug("-------------------精准匹配", id, exactResult)
+								exactResult := exactMatchs(sr.ExactRule, qu.ObjToString(tmp["title"]), qu.ObjToString(tmp["detail"]), sr.Maths, nameArr)
+								qu.Debug("-------------------精准匹配", id, exactResult)
 								if !exactResult {
 								if !exactResult {
 									continue
 									continue
 								}
 								}
@@ -420,18 +422,18 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 							*/
 							*/
 							//1.附加词匹配
 							//1.附加词匹配
 							IsMatch := false
 							IsMatch := false
-							//common.Debug("sr.AW---", len(sr.AW))
+							//qu.Debug("sr.AW---", len(sr.AW))
 							for i, aw := range sr.AW {
 							for i, aw := range sr.AW {
-								//common.Debug("-------------------------开始附加词匹配--------------------------")
+								//qu.Debug("-------------------------开始附加词匹配--------------------------")
 								IsMatchAddKey := RegMatch(fieldText, aw.MatchType, aw.KeyReg, nil, nil, false, true)
 								IsMatchAddKey := RegMatch(fieldText, aw.MatchType, aw.KeyReg, nil, nil, false, true)
-								//common.Debug(IsMatchAddKey, "------------------------------------------------------------")
+								//qu.Debug(IsMatchAddKey, "------------------------------------------------------------")
 
 
 								//2.关键词匹配
 								//2.关键词匹配
 								if IsMatchAddKey {
 								if IsMatchAddKey {
 									kw := sr.KW[i]
 									kw := sr.KW[i]
-									//common.Debug("-------------------------开始关键词匹配--------------------------")
+									//qu.Debug("-------------------------开始关键词匹配--------------------------")
 									IsMatchKey := RegMatch(fieldText, kw.MatchType, kw.KeyReg, matchKey, matchKeyType, true, false)
 									IsMatchKey := RegMatch(fieldText, kw.MatchType, kw.KeyReg, matchKey, matchKeyType, true, false)
-									//common.Debug(IsMatchKey, "------------------------------------------------------------")
+									//qu.Debug(IsMatchKey, "------------------------------------------------------------")
 									if IsMatchKey {
 									if IsMatchKey {
 										IsMatch = true
 										IsMatch = true
 									}
 									}
@@ -443,7 +445,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 							/*
 							/*
 								到此已经匹配完数据
 								到此已经匹配完数据
 							*/
 							*/
-							common.Debug("---------------------", id, IsMatch, matchKey)
+							qu.Debug("---------------------", id, IsMatch, matchKey)
 							if IsMatch { //匹配成功,数据上新增规则id,matchKey,item并临时保存数据
 							if IsMatch { //匹配成功,数据上新增规则id,matchKey,item并临时保存数据
 								// tmpMatchKey := MapDataToArr(matchKey)
 								// tmpMatchKey := MapDataToArr(matchKey)
 								tmpMatchKeyType := MapDataToArr(matchKeyType)
 								tmpMatchKeyType := MapDataToArr(matchKeyType)
@@ -451,14 +453,14 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 								tmp["matchtype"] = strings.Join(tmpMatchKeyType, ",")
 								tmp["matchtype"] = strings.Join(tmpMatchKeyType, ",")
 								tmp["ruleid"] = sr.ID
 								tmp["ruleid"] = sr.ID
 								tmp["rulename"] = sr.Name
 								tmp["rulename"] = sr.Name
-								tmpBuyerClass := common.ObjToString(tmp["buyerclass"])
+								tmpBuyerClass := qu.ObjToString(tmp["buyerclass"])
 
 
 								//开始打标签
 								//开始打标签
-								//common.Debug("c.IsTagRule+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
+								//qu.Debug("c.IsTagRule+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
 								if c.IsTagRule {
 								if c.IsTagRule {
 									tagNameMap := map[string]bool{}
 									tagNameMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
-									//common.Debug("c.TagRules---", len(c.TagRules))
+									//qu.Debug("c.TagRules---", len(c.TagRules))
 									//log.Println(c.TagRules,"=========",)
 									//log.Println(c.TagRules,"=========",)
 									for _, tr := range c.TagRules {
 									for _, tr := range c.TagRules {
 										if tr.DepartRuleIds[sr.ID] {
 										if tr.DepartRuleIds[sr.ID] {
@@ -466,18 +468,18 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 											//先获取用到的所有字段值
 											//先获取用到的所有字段值
 											for field, _ := range tr.Fields {
 											for field, _ := range tr.Fields {
 												if fieldText[field] == nil { //补充fieldText
 												if fieldText[field] == nil { //补充fieldText
-													text := common.ObjToString(tmp[field])
+													text := qu.ObjToString(tmp[field])
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													fieldText[field] = text
 													fieldText[field] = text
 												}
 												}
 											}
 											}
-											//common.Debug("-------------------------开始排除词匹配--------------------------")
-											//common.Debug("tr.NW---", len(tr.NW))
+											//qu.Debug("-------------------------开始排除词匹配--------------------------")
+											//qu.Debug("tr.NW---", len(tr.NW))
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											for j, tag_nw := range tr.NW {       //排除词匹配
 											for j, tag_nw := range tr.NW {       //排除词匹配
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
-												//common.Debug(IsMatchNotKey, "------------------------------------------------------------")
+												//qu.Debug(IsMatchNotKey, "------------------------------------------------------------")
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 													// log.Println(j, tr.TagNames[j])
 													// log.Println(j, tr.TagNames[j])
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
@@ -493,7 +495,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																	tagname = strings.Join(tempList, ",")
 																	tagname = strings.Join(tempList, ",")
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																}
 																}
-																//common.Debug("tagname-----", tagname)
+																//qu.Debug("tagname-----", tagname)
 																tagNameMap[tagname] = true
 																tagNameMap[tagname] = true
 																tagIdMap[tr.ID] = true
 																tagIdMap[tr.ID] = true
 															}
 															}
@@ -506,7 +508,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																tagname = strings.Join(tempList, ",")
 																tagname = strings.Join(tempList, ",")
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 															}
 															}
-															//common.Debug("tagname-----", tagname)
+															//qu.Debug("tagname-----", tagname)
 															tagNameMap[tagname] = true
 															tagNameMap[tagname] = true
 															tagIdMap[tr.ID] = true
 															tagIdMap[tr.ID] = true
 														}
 														}
@@ -532,7 +534,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 								if c.IsTagRule2 {
 								if c.IsTagRule2 {
 									tagNameMap := map[string]bool{}
 									tagNameMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
-									//common.Debug("c.TagRules---", len(c.TagRules))
+									//qu.Debug("c.TagRules---", len(c.TagRules))
 									//log.Println(c.TagRules,"=========",)
 									//log.Println(c.TagRules,"=========",)
 									for _, tr := range c.TagRules2 {
 									for _, tr := range c.TagRules2 {
 										if tr.DepartRuleIds[sr.ID] {
 										if tr.DepartRuleIds[sr.ID] {
@@ -540,18 +542,18 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 											//先获取用到的所有字段值
 											//先获取用到的所有字段值
 											for field, _ := range tr.Fields {
 											for field, _ := range tr.Fields {
 												if fieldText[field] == nil { //补充fieldText
 												if fieldText[field] == nil { //补充fieldText
-													text := common.ObjToString(tmp[field])
+													text := qu.ObjToString(tmp[field])
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													fieldText[field] = text
 													fieldText[field] = text
 												}
 												}
 											}
 											}
-											//common.Debug("-------------------------开始排除词匹配--------------------------")
-											//common.Debug("tr.NW---", len(tr.NW))
+											//qu.Debug("-------------------------开始排除词匹配--------------------------")
+											//qu.Debug("tr.NW---", len(tr.NW))
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											for j, tag_nw := range tr.NW {       //排除词匹配
 											for j, tag_nw := range tr.NW {       //排除词匹配
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
-												//common.Debug(IsMatchNotKey, "------------------------------------------------------------")
+												//qu.Debug(IsMatchNotKey, "------------------------------------------------------------")
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 													// log.Println(j, tr.TagNames[j])
 													// log.Println(j, tr.TagNames[j])
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
@@ -567,7 +569,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																	tagname = strings.Join(tempList, ",")
 																	tagname = strings.Join(tempList, ",")
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																}
 																}
-																//common.Debug("tagname-----", tagname)
+																//qu.Debug("tagname-----", tagname)
 																tagNameMap[tagname] = true
 																tagNameMap[tagname] = true
 																tagIdMap[tr.ID] = true
 																tagIdMap[tr.ID] = true
 															}
 															}
@@ -580,7 +582,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																tagname = strings.Join(tempList, ",")
 																tagname = strings.Join(tempList, ",")
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 															}
 															}
-															//common.Debug("tagname-----", tagname)
+															//qu.Debug("tagname-----", tagname)
 															tagNameMap[tagname] = true
 															tagNameMap[tagname] = true
 															tagIdMap[tr.ID] = true
 															tagIdMap[tr.ID] = true
 														}
 														}
@@ -606,7 +608,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 								if c.IsTagRule3 {
 								if c.IsTagRule3 {
 									tagNameMap := map[string]bool{}
 									tagNameMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
 									tagIdMap := map[string]bool{}
-									//common.Debug("c.TagRules---", len(c.TagRules))
+									//qu.Debug("c.TagRules---", len(c.TagRules))
 									//log.Println(c.TagRules,"=========",)
 									//log.Println(c.TagRules,"=========",)
 									for _, tr := range c.TagRules3 {
 									for _, tr := range c.TagRules3 {
 										if tr.DepartRuleIds[sr.ID] {
 										if tr.DepartRuleIds[sr.ID] {
@@ -614,18 +616,18 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 											//先获取用到的所有字段值
 											//先获取用到的所有字段值
 											for field, _ := range tr.Fields {
 											for field, _ := range tr.Fields {
 												if fieldText[field] == nil { //补充fieldText
 												if fieldText[field] == nil { //补充fieldText
-													text := common.ObjToString(tmp[field])
+													text := qu.ObjToString(tmp[field])
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													text = ProcessData(text) //处理文本(字母转大写,删除一些符号)
 													fieldText[field] = text
 													fieldText[field] = text
 												}
 												}
 											}
 											}
-											//common.Debug("-------------------------开始排除词匹配--------------------------")
-											//common.Debug("tr.NW---", len(tr.NW))
+											//qu.Debug("-------------------------开始排除词匹配--------------------------")
+											//qu.Debug("tr.NW---", len(tr.NW))
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTag := map[string]bool{}     //记录所有标签里的匹配上的关键词
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											matchKeyTypeTag := map[string]bool{} //记录标签里的关键词对应的匹配方式
 											for j, tag_nw := range tr.NW {       //排除词匹配
 											for j, tag_nw := range tr.NW {       //排除词匹配
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
 												IsMatchNotKey := RegMatch(fieldText, tag_nw.MatchType, tag_nw.KeyReg, nil, nil, false, false)
-												//common.Debug(IsMatchNotKey, "------------------------------------------------------------")
+												//qu.Debug(IsMatchNotKey, "------------------------------------------------------------")
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 												if !IsMatchNotKey { //排除词未匹配,匹配附加词关键词
 													// log.Println(j, tr.TagNames[j])
 													// log.Println(j, tr.TagNames[j])
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
 													if RegMatch(fieldText, tr.AW[j].MatchType, tr.AW[j].KeyReg, nil, nil, false, true) && RegMatch(fieldText, tr.KW[j].MatchType, tr.KW[j].KeyReg, matchKeyTag, matchKeyTypeTag, true, false) {
@@ -641,7 +643,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																	tagname = strings.Join(tempList, ",")
 																	tagname = strings.Join(tempList, ",")
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																	log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																}
 																}
-																//common.Debug("tagname-----", tagname)
+																//qu.Debug("tagname-----", tagname)
 																tagNameMap[tagname] = true
 																tagNameMap[tagname] = true
 																tagIdMap[tr.ID] = true
 																tagIdMap[tr.ID] = true
 															}
 															}
@@ -654,7 +656,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 																tagname = strings.Join(tempList, ",")
 																tagname = strings.Join(tempList, ",")
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 																log.Println("=====tagname为空取匹配词为标签名称", tagname)
 															}
 															}
-															//common.Debug("tagname-----", tagname)
+															//qu.Debug("tagname-----", tagname)
 															tagNameMap[tagname] = true
 															tagNameMap[tagname] = true
 															tagIdMap[tr.ID] = true
 															tagIdMap[tr.ID] = true
 														}
 														}
@@ -697,12 +699,12 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 								tmp["departid"] = dm.ID
 								tmp["departid"] = dm.ID
 								//存储数据
 								//存储数据
 								dm.DataLock.Lock()
 								dm.DataLock.Lock()
-								//common.Debug("tmp---", tmp)
+								//qu.Debug("tmp---", tmp)
 								tmpMap := map[string]interface{}{id: tmp}
 								tmpMap := map[string]interface{}{id: tmp}
 								dm.DepartmentData[sr.ID] = append(dm.DepartmentData[sr.ID], tmpMap)
 								dm.DepartmentData[sr.ID] = append(dm.DepartmentData[sr.ID], tmpMap)
 								dm.DataLock.Unlock()
 								dm.DataLock.Unlock()
 							} else {
 							} else {
-								common.Debug("------------", id, IsMatch)
+								qu.Debug("------------", id, IsMatch)
 							}
 							}
 						}
 						}
 						numDocs += 1
 						numDocs += 1
@@ -727,7 +729,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
 // 数据去重
 // 数据去重
 func (c *Customer) RemoveRepeatData() {
 func (c *Customer) RemoveRepeatData() {
 	log.Println("开始数据去重...")
 	log.Println("开始数据去重...")
-	defer common.Catch()
+	defer qu.Catch()
 	for _, dm := range c.Departments {
 	for _, dm := range c.Departments {
 		for _, dataMapArr := range dm.DepartmentData { //一个部门的所有数据
 		for _, dataMapArr := range dm.DepartmentData { //一个部门的所有数据
 			for _, dataMap := range dataMapArr {
 			for _, dataMap := range dataMapArr {
@@ -752,7 +754,7 @@ func (c *Customer) RemoveRepeatData() {
 					} else if c.PushModel == 4 { //规则模式不去重
 					} else if c.PushModel == 4 { //规则模式不去重
 						//c.SaveDataArr = append(c.SaveDataArr, tmp)
 						//c.SaveDataArr = append(c.SaveDataArr, tmp)
 						if c.SaveDataArr[dataId] == nil {
 						if c.SaveDataArr[dataId] == nil {
-							tmp["itemdist"] = map[string]interface{}{common.ObjToString(tmp["item"]): common.ObjToString(tmp["matchkey"])}
+							tmp["itemdist"] = map[string]interface{}{qu.ObjToString(tmp["item"]): qu.ObjToString(tmp["matchkey"])}
 							c.SaveDataArr[dataId] = tmp
 							c.SaveDataArr[dataId] = tmp
 						} else { //数据重复
 						} else { //数据重复
 							dm_history := c.SaveDataArr[dataId]
 							dm_history := c.SaveDataArr[dataId]
@@ -761,7 +763,7 @@ func (c *Customer) RemoveRepeatData() {
 						}
 						}
 					} else if c.PushModel == 1 {
 					} else if c.PushModel == 1 {
 						if c.SaveDataMap[dataId] == nil {
 						if c.SaveDataMap[dataId] == nil {
-							tmp["itemdist"] = map[string]interface{}{common.ObjToString(tmp["item"]): common.ObjToString(tmp["matchkey"])}
+							tmp["itemdist"] = map[string]interface{}{qu.ObjToString(tmp["item"]): qu.ObjToString(tmp["matchkey"])}
 							c.SaveDataMap[dataId] = tmp
 							c.SaveDataMap[dataId] = tmp
 						} else { //数据重复
 						} else { //数据重复
 							dm_history := c.SaveDataMap[dataId]
 							dm_history := c.SaveDataMap[dataId]
@@ -779,7 +781,7 @@ func (c *Customer) RemoveRepeatData() {
 // 组装保存数据
 // 组装保存数据
 func (c *Customer) AssembelAndSaveData() {
 func (c *Customer) AssembelAndSaveData() {
 	log.Println("开始组装保存数据...")
 	log.Println("开始组装保存数据...")
-	defer common.Catch()
+	defer qu.Catch()
 	ch := make(chan bool, 10)
 	ch := make(chan bool, 10)
 	wg := &sync.WaitGroup{}
 	wg := &sync.WaitGroup{}
 	n := 0
 	n := 0
@@ -853,7 +855,7 @@ func (c *Customer) AssembelAndSaveData() {
 
 
 // 获取用户所有规则
 // 获取用户所有规则
 func (d *Department) GetSearchRules(cid, stype string, idRange, idRanges bson.M) {
 func (d *Department) GetSearchRules(cid, stype string, idRange, idRanges bson.M) {
-	defer common.Catch()
+	defer qu.Catch()
 	searchRules, _ := MgoTag.Find("euserdepartrule", map[string]interface{}{"s_userid": cid, "s_departid": d.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	searchRules, _ := MgoTag.Find("euserdepartrule", map[string]interface{}{"s_userid": cid, "s_departid": d.ID, "i_isuse": 1, "b_delete": false}, nil, nil)
 	if len(searchRules) > 0 {
 	if len(searchRules) > 0 {
 		for _, sr := range searchRules {
 		for _, sr := range searchRules {
@@ -861,19 +863,19 @@ func (d *Department) GetSearchRules(cid, stype string, idRange, idRanges bson.M)
 			SR.Fields = make(map[string]interface{})
 			SR.Fields = make(map[string]interface{})
 
 
 			id := mgoutil.BsonTOStringId(sr["_id"])
 			id := mgoutil.BsonTOStringId(sr["_id"])
-			name := common.ObjToString(sr["s_name"])
+			name := qu.ObjToString(sr["s_name"])
 			SR.ID = id
 			SR.ID = id
 			SR.Name = name
 			SR.Name = name
 			SR.CustomerID = cid
 			SR.CustomerID = cid
 			SR.DepartmentID = d.ID
 			SR.DepartmentID = d.ID
-			SR.ExtFieldType = common.IntAll(sr["i_extfieldstype"])
+			SR.ExtFieldType = qu.IntAll(sr["i_extfieldstype"])
 			//SR.RuleData = &sync.Map{}
 			//SR.RuleData = &sync.Map{}
-			esquery := common.ObjToString(sr["s_esquery"])
+			esquery := qu.ObjToString(sr["s_esquery"])
 			if IsNewSql != 0 {
 			if IsNewSql != 0 {
-				esquery = common.ObjToString(sr["s_esquery_search"])
+				esquery = qu.ObjToString(sr["s_esquery_search"])
 			}
 			}
-			clearKey := common.ObjToString(sr["s_globalclearkey"])
-			clearKeyMatch := common.ObjToString(sr["s_globalclearkeymatch"])
+			clearKey := qu.ObjToString(sr["s_globalclearkey"])
+			clearKeyMatch := qu.ObjToString(sr["s_globalclearkeymatch"])
 
 
 			//获取es
 			//获取es
 			if stype == "history" {
 			if stype == "history" {
@@ -887,9 +889,9 @@ func (d *Department) GetSearchRules(cid, stype string, idRange, idRanges bson.M)
 				for _, v := range o_rules {
 				for _, v := range o_rules {
 					orule, _ := v.(map[string]interface{})
 					orule, _ := v.(map[string]interface{})
 					SR.Maths = append(SR.Maths, map[string]string{
 					SR.Maths = append(SR.Maths, map[string]string{
-						"s_matchkey": common.ObjToString(orule["s_matchkey"]),
-						"s_keymatch": common.ObjToString(orule["s_keymatch"]),
-						"s_group":    common.ObjToString(orule["s_group"]),
+						"s_matchkey": qu.ObjToString(orule["s_matchkey"]),
+						"s_keymatch": qu.ObjToString(orule["s_keymatch"]),
+						"s_group":    qu.ObjToString(orule["s_group"]),
 					})
 					})
 				}
 				}
 			}
 			}
@@ -902,7 +904,7 @@ func (d *Department) GetSearchRules(cid, stype string, idRange, idRanges bson.M)
 
 
 // 获取转换后的es语句
 // 获取转换后的es语句
 func (sr *SearchRule) GetEs(department, esquery string, tmpRange, tmpRanges bson.M) {
 func (sr *SearchRule) GetEs(department, esquery string, tmpRange, tmpRanges bson.M) {
-	defer common.Catch()
+	defer qu.Catch()
 	query := map[string]*QueryObjecct{}
 	query := map[string]*QueryObjecct{}
 	if json.Unmarshal([]byte(esquery), &query) == nil {
 	if json.Unmarshal([]byte(esquery), &query) == nil {
 		qb := query["query"]
 		qb := query["query"]
@@ -950,11 +952,11 @@ func (sr *SearchRule) GetEs(department, esquery string, tmpRange, tmpRanges bson
 
 
 // 全局清理词处理
 // 全局清理词处理
 func (sr *SearchRule) GetClearWord(key, match string) {
 func (sr *SearchRule) GetClearWord(key, match string) {
-	defer common.Catch()
+	defer qu.Catch()
 	//匹配方式
 	//匹配方式
 	cwmArr := []string{}
 	cwmArr := []string{}
 	for _, mv := range strings.Split(match, ",") {
 	for _, mv := range strings.Split(match, ",") {
-		if field := common.ObjToString(MatchType[mv]); field != "" {
+		if field := qu.ObjToString(MatchType[mv]); field != "" {
 			cwmArr = append(cwmArr, field)
 			cwmArr = append(cwmArr, field)
 			sr.Fields[field] = true
 			sr.Fields[field] = true
 		}
 		}
@@ -977,7 +979,7 @@ func (sr *SearchRule) GetClearWord(key, match string) {
 
 
 // 关键词、附加词处理
 // 关键词、附加词处理
 func (sr *SearchRule) GetKeyAddWord(o_rules primitive.A) {
 func (sr *SearchRule) GetKeyAddWord(o_rules primitive.A) {
-	defer common.Catch()
+	defer qu.Catch()
 	kw, aw, _, _, _ := GetNotkeyAndKeyAddWord(o_rules, sr.Fields, false)
 	kw, aw, _, _, _ := GetNotkeyAndKeyAddWord(o_rules, sr.Fields, false)
 	sr.KW = kw
 	sr.KW = kw
 	sr.AW = aw
 	sr.AW = aw
@@ -986,7 +988,7 @@ func (sr *SearchRule) GetKeyAddWord(o_rules primitive.A) {
 
 
 // 排除词、关键词、附加词处理
 // 排除词、关键词、附加词处理
 func (tr *TagRule) GetKeyAddNotKeyWord(o_list primitive.A) {
 func (tr *TagRule) GetKeyAddNotKeyWord(o_list primitive.A) {
-	defer common.Catch()
+	defer qu.Catch()
 	kw, aw, nkw, tagnames, buyerclass := GetNotkeyAndKeyAddWord(o_list, tr.Fields, true)
 	kw, aw, nkw, tagnames, buyerclass := GetNotkeyAndKeyAddWord(o_list, tr.Fields, true)
 	tr.NW = nkw
 	tr.NW = nkw
 	tr.KW = kw
 	tr.KW = kw
@@ -1002,31 +1004,31 @@ func GetMactchKeys(match []map[string]string, data map[string]interface{}) strin
 		types := keys["s_keymatch"]
 		types := keys["s_keymatch"]
 		key := keys["s_matchkey"]
 		key := keys["s_matchkey"]
 		if strings.Contains(types, "1") {
 		if strings.Contains(types, "1") {
-			title := common.ObjToString(data["title"])
+			title := qu.ObjToString(data["title"])
 			keyWord = KeyWordToDatas(types, title, key, keyWord)
 			keyWord = KeyWordToDatas(types, title, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "2") {
 		if strings.Contains(types, "2") {
-			detail := common.ObjToString(data["detail"])
+			detail := qu.ObjToString(data["detail"])
 			keyWord = KeyWordToDatas(types, detail, key, keyWord)
 			keyWord = KeyWordToDatas(types, detail, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "3") {
 		if strings.Contains(types, "3") {
-			purchasing := common.ObjToString(data["purchasing"])
+			purchasing := qu.ObjToString(data["purchasing"])
 			keyWord = KeyWordToDatas(types, purchasing, key, keyWord)
 			keyWord = KeyWordToDatas(types, purchasing, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "4") {
 		if strings.Contains(types, "4") {
-			filetext := common.ObjToString(data["filetext"])
+			filetext := qu.ObjToString(data["filetext"])
 			keyWord = KeyWordToDatas(types, filetext, key, keyWord)
 			keyWord = KeyWordToDatas(types, filetext, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "5") {
 		if strings.Contains(types, "5") {
-			projectname := common.ObjToString(data["projectname"])
+			projectname := qu.ObjToString(data["projectname"])
 			keyWord = KeyWordToDatas(types, projectname, key, keyWord)
 			keyWord = KeyWordToDatas(types, projectname, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "6") || strings.Contains(types, "8") {
 		if strings.Contains(types, "6") || strings.Contains(types, "8") {
-			buyer := common.ObjToString(data["buyer"])
+			buyer := qu.ObjToString(data["buyer"])
 			keyWord = KeyWordToDatas(types, buyer, key, keyWord)
 			keyWord = KeyWordToDatas(types, buyer, key, keyWord)
 		}
 		}
 		if strings.Contains(types, "7") || strings.Contains(types, "9") {
 		if strings.Contains(types, "7") || strings.Contains(types, "9") {
-			winner := common.ObjToString(data["s_winner"])
+			winner := qu.ObjToString(data["s_winner"])
 			keyWord = KeyWordToDatas(types, winner, key, keyWord)
 			keyWord = KeyWordToDatas(types, winner, key, keyWord)
 		}
 		}
 	}
 	}

+ 0 - 0
customerdata/test/data_test.go → customerdata/src/test/data_test.go


File diff suppressed because it is too large
+ 214 - 211
customerdata/src/util.go


+ 0 - 0
customerdata/util/mgodb/mgo.go → customerdata/src/util/mgodb/mgo.go


Some files were not shown because too many files changed in this diff