|
@@ -62,11 +62,13 @@ var (
|
|
specialArea = map[string]bool{"北京": true, "上海": true, "天津": true, "重庆": true}
|
|
specialArea = map[string]bool{"北京": true, "上海": true, "天津": true, "重庆": true}
|
|
KeyBiddingAreaMap []keyBidding
|
|
KeyBiddingAreaMap []keyBidding
|
|
KeyFwArr []keyFw
|
|
KeyFwArr []keyFw
|
|
|
|
+ KeyJyMap map[string]string
|
|
DistrictSArr []keyFw
|
|
DistrictSArr []keyFw
|
|
)
|
|
)
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
siteCodeMap = make(map[string]*KeyWordSiteNode)
|
|
siteCodeMap = make(map[string]*KeyWordSiteNode)
|
|
|
|
+ KeyJyMap = make(map[string]string)
|
|
res, err := g.DB().Query(gctx.New(), `SELECT * FROM seo_siteKeywords_splicing order by site_code asc`)
|
|
res, err := g.DB().Query(gctx.New(), `SELECT * FROM seo_siteKeywords_splicing order by site_code asc`)
|
|
if err == nil && len(res.List()) > 0 {
|
|
if err == nil && len(res.List()) > 0 {
|
|
for _, m := range res.List() {
|
|
for _, m := range res.List() {
|
|
@@ -115,6 +117,13 @@ func init() {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //区县教育局
|
|
|
|
+ districtJyResArr, err := g.DB().Query(gctx.New(), `SELECT alias,keywords FROM seo_siteKeywords_district where site_code = 12`)
|
|
|
|
+ if err == nil && !districtJyResArr.IsEmpty() {
|
|
|
|
+ for _, m := range districtJyResArr.List() {
|
|
|
|
+ KeyJyMap[gconv.String(m["alias"])] = gconv.String(m["keywords"])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
type ClassCode struct {
|
|
type ClassCode struct {
|
|
@@ -219,6 +228,18 @@ func GovernmentTender(number int) []argument {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //随机获取10个区县教育局单位
|
|
|
|
+ var count int
|
|
|
|
+ for m, n := range KeyJyMap {
|
|
|
|
+ count++
|
|
|
|
+ if count > number {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ data = append(data, argument{
|
|
|
|
+ n,
|
|
|
|
+ fmt.Sprintf("/list/city/%s_S12.html", m),
|
|
|
|
+ })
|
|
|
|
+ }
|
|
redis.Put(RedisNameNew, redisKey, data, RedisTimeout)
|
|
redis.Put(RedisNameNew, redisKey, data, RedisTimeout)
|
|
return data
|
|
return data
|
|
}
|
|
}
|