|
@@ -6,7 +6,7 @@ package util
|
|
import (
|
|
import (
|
|
mgo "mongodb"
|
|
mgo "mongodb"
|
|
qu "qfw/util"
|
|
qu "qfw/util"
|
|
- elastic "qfw/util/elastic"
|
|
|
|
|
|
+ "qfw/util/elastic"
|
|
"sort"
|
|
"sort"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -21,6 +21,7 @@ type config struct {
|
|
Biaozhu map[string]interface{} `json:"biaozhu"`
|
|
Biaozhu map[string]interface{} `json:"biaozhu"`
|
|
InfluxdbUrl string `json:"influxdbUrl"`
|
|
InfluxdbUrl string `json:"influxdbUrl"`
|
|
Redis string `json:"redis"`
|
|
Redis string `json:"redis"`
|
|
|
|
+ RedisTimeout int `json:"redistimeout"`
|
|
Bidding map[string]interface{} `json:"bidding"`
|
|
Bidding map[string]interface{} `json:"bidding"`
|
|
Extract map[string]interface{} `json:"extract"`
|
|
Extract map[string]interface{} `json:"extract"`
|
|
Elas map[string]interface{} `json:"es"`
|
|
Elas map[string]interface{} `json:"es"`
|
|
@@ -28,6 +29,7 @@ type config struct {
|
|
CustomerField map[string]string `json:"customerfield"`
|
|
CustomerField map[string]string `json:"customerfield"`
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const JYHREFPRE = "https://www.jianyu360.com/article/content/"
|
|
const SPECIALTYPE = "二级不存在"
|
|
const SPECIALTYPE = "二级不存在"
|
|
const BIDDINGSTARTID = "5a862f0640d2d9bbe88e3cec"
|
|
const BIDDINGSTARTID = "5a862f0640d2d9bbe88e3cec"
|
|
|
|
|
|
@@ -43,13 +45,13 @@ var (
|
|
Es *elastic.Elastic //es
|
|
Es *elastic.Elastic //es
|
|
Index string
|
|
Index string
|
|
Itype string
|
|
Itype string
|
|
- Coll string
|
|
|
|
//
|
|
//
|
|
AllFieldArr []map[string]string
|
|
AllFieldArr []map[string]string
|
|
PurchasinglistField []map[string]string
|
|
PurchasinglistField []map[string]string
|
|
PackageField []map[string]string
|
|
PackageField []map[string]string
|
|
WinnerorderField []map[string]string
|
|
WinnerorderField []map[string]string
|
|
TopSubStypeArr []string
|
|
TopSubStypeArr []string
|
|
|
|
+ TopSubStypeArr2 []string
|
|
)
|
|
)
|
|
|
|
|
|
func InitConfig() {
|
|
func InitConfig() {
|
|
@@ -69,8 +71,8 @@ func InitConfig() {
|
|
MongodbAddr: qu.ObjToString(bid["addr"]),
|
|
MongodbAddr: qu.ObjToString(bid["addr"]),
|
|
DbName: qu.ObjToString(bid["db"]),
|
|
DbName: qu.ObjToString(bid["db"]),
|
|
Size: qu.IntAll(bid["size"]),
|
|
Size: qu.IntAll(bid["size"]),
|
|
- UserName: qu.ObjToString(bid["username"]),
|
|
|
|
- Password: qu.ObjToString(bid["password"]),
|
|
|
|
|
|
+ //UserName: qu.ObjToString(bid["username"]),
|
|
|
|
+ //Password: qu.ObjToString(bid["password"]),
|
|
}
|
|
}
|
|
MgoB.InitPool()
|
|
MgoB.InitPool()
|
|
|
|
|
|
@@ -170,7 +172,6 @@ func InitConfig() {
|
|
TopSubStypeArr = append(TopSubStypeArr, top+"-"+qu.ObjToString(sub))
|
|
TopSubStypeArr = append(TopSubStypeArr, top+"-"+qu.ObjToString(sub))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ TopSubStypeArr2 = TopSubStypeArr
|
|
TopSubStypeArr = append(TopSubStypeArr, SPECIALTYPE)
|
|
TopSubStypeArr = append(TopSubStypeArr, SPECIALTYPE)
|
|
- //coll
|
|
|
|
- Coll = Config.Fromtable
|
|
|
|
}
|
|
}
|