|
@@ -16,6 +16,7 @@ var (
|
|
|
Province []string //省
|
|
|
ProvinceCitys map[string][]string //省:[市1,市2]
|
|
|
CityDistricts map[string][]string //市:[区1,区2]
|
|
|
+ BuyerClass []string //采购单位行业
|
|
|
//City []string //市
|
|
|
//District []string //区、县
|
|
|
)
|
|
@@ -29,7 +30,13 @@ func InitMgoPool() {
|
|
|
Mgo.InitPool()
|
|
|
}
|
|
|
|
|
|
-func InitCitys() {
|
|
|
+func InitOther() {
|
|
|
+ initCitys()
|
|
|
+ initInfoType()
|
|
|
+ initBuyerClass()
|
|
|
+}
|
|
|
+
|
|
|
+func initCitys() {
|
|
|
//map初始化
|
|
|
if ProvinceCitys == nil {
|
|
|
ProvinceCitys = make(map[string][]string)
|
|
@@ -56,7 +63,7 @@ func InitCitys() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func InitInfoType() {
|
|
|
+func initInfoType() {
|
|
|
//map初始化
|
|
|
if InfoTypeMap == nil {
|
|
|
InfoTypeMap = make(map[string]interface{})
|
|
@@ -70,3 +77,11 @@ func InitInfoType() {
|
|
|
}
|
|
|
//qu.Debug(InfoTypeArr, InfoTypeMap)
|
|
|
}
|
|
|
+
|
|
|
+func initBuyerClass() {
|
|
|
+ datas, _ := Mgo.Find("code_buyerclass", `{}`, `{"_id":1}`, `{}`, false, -1, -1)
|
|
|
+ for _, data := range *datas {
|
|
|
+ name := data["name"].(string)
|
|
|
+ BuyerClass = append(BuyerClass, name)
|
|
|
+ }
|
|
|
+}
|