|
@@ -1,6 +1,7 @@
|
|
|
package front
|
|
|
|
|
|
import (
|
|
|
+ "context"
|
|
|
"fmt"
|
|
|
"jy/src/jfw/config"
|
|
|
"jy/src/jfw/jyutil"
|
|
@@ -24,6 +25,8 @@ import (
|
|
|
"app.yhyue.com/moapp/jypkg/public"
|
|
|
)
|
|
|
|
|
|
+const cacheTime = 60 * 60 * 8
|
|
|
+
|
|
|
// 剑鱼标签页
|
|
|
type Tags struct {
|
|
|
*xweb.Action
|
|
@@ -34,8 +37,32 @@ type Tags struct {
|
|
|
var LetterArr = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
|
|
|
var bidField = `"_id","site","title","publishtime","toptype","subtype","type","area","href","bidopentime","winner","buyer","bidamount","budget","s_subscopeclass","projectname","detail"`
|
|
|
|
|
|
+var seoBidField = `"_id","title","publishtime","subtype","area","href","bidamount","budget","s_subscopeclass","projectname"`
|
|
|
+
|
|
|
+type reqLimit struct {
|
|
|
+ doPool chan struct{}
|
|
|
+ waitPool chan struct{}
|
|
|
+}
|
|
|
+
|
|
|
+var reqLimitInit *reqLimit
|
|
|
+
|
|
|
func init() {
|
|
|
xweb.AddAction(&Tags{})
|
|
|
+ do := qu.IntAll(config.Sysconfig["executionNum"])
|
|
|
+ wait := qu.IntAll(config.Sysconfig["awaitNum"])
|
|
|
+ //创建执行池 等待池
|
|
|
+ doPool := make(chan struct{}, do)
|
|
|
+ for i := 0; i < do; i++ {
|
|
|
+ doPool <- struct{}{}
|
|
|
+ }
|
|
|
+ waitPool := make(chan struct{}, wait)
|
|
|
+ for i := 0; i < wait; i++ {
|
|
|
+ waitPool <- struct{}{}
|
|
|
+ }
|
|
|
+ reqLimitInit = &reqLimit{
|
|
|
+ doPool: doPool,
|
|
|
+ waitPool: waitPool,
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -161,6 +188,7 @@ func (this *Tags) Index(types, name string) {
|
|
|
}
|
|
|
//行业_地区_信息类型
|
|
|
case "industry":
|
|
|
+ //areaHref = fmt.Sprintf("/tags/industry/all_%s_all.html", "%v")
|
|
|
if len(info) > 3 {
|
|
|
checkedKeywords, checkedIndustry, checkedIndustry_2 = this.GetInsturyKeywords(info[3])
|
|
|
crumbsNav2 = map[string]interface{}{
|
|
@@ -176,6 +204,8 @@ func (this *Tags) Index(types, name string) {
|
|
|
haveList = false
|
|
|
areaHref = fmt.Sprintf("/tags/industry/%s_%s_all.html", info[0], "%v")
|
|
|
industryHref = fmt.Sprintf("/tags/industry/%s_%s_all_%s.html", "%v", checkedArea, "%v")
|
|
|
+ //行业标签获取
|
|
|
+ this.T["industryList"] = this.GetIndustry(industryHref) //需要根据地区获取不同的标的物
|
|
|
}
|
|
|
crumbsNav1 = map[string]interface{}{
|
|
|
"name": fmt.Sprintf("招标行业分类"),
|
|
@@ -185,8 +215,6 @@ func (this *Tags) Index(types, name string) {
|
|
|
//地区标签获取
|
|
|
this.T["areaList"] = this.GetArea(areaHref)
|
|
|
|
|
|
- //行业标签获取
|
|
|
- this.T["industryList"] = this.GetIndustry(industryHref)
|
|
|
//标的物标签获取
|
|
|
|
|
|
//字母表获取
|
|
@@ -230,7 +258,7 @@ func (this *Tags) Index(types, name string) {
|
|
|
"infoType": fmt.Sprintf(stypeHref, "all"),
|
|
|
}
|
|
|
//TDK
|
|
|
- this.T["tdk"] = this.GetTDK(haveList, types, checkedKeywords, pageNum, checkedLetter, qu.ObjToString(this.T["area"])+checkedKeywords+infotypeStr, qu.ObjToString(this.T["area"])+checkedKeywords+infotypeStr, checkedKeywords)
|
|
|
+ this.T["tdk"] = this.GetTDK(haveList, types, checkedKeywords, pageNum, checkedLetter, qu.ObjToString(this.T["area"])+checkedKeywords, qu.ObjToString(this.T["area"])+checkedKeywords+infotypeStr, checkedKeywords, filterInfoType)
|
|
|
if haveList {
|
|
|
//信息类型
|
|
|
isLimit := false
|
|
@@ -310,13 +338,13 @@ func (this *Tags) GetSEOArea() (provinceArr, cityArr, districtArr []string, name
|
|
|
codeArr = map[int64][]int64{} //code 及 pcode的从属关系
|
|
|
data := []map[string]interface{}{}
|
|
|
rediskey := fmt.Sprintf("pcseo_area")
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
data = qu.ObjArrToMapArr(l)
|
|
|
} else {
|
|
|
list := public.BaseMysql.SelectBySql(`select name,code,level,pcode from seo_words.seo_area order by code`)
|
|
|
//获取组合成必要参数
|
|
|
if list != nil && len(*list) > 0 {
|
|
|
- redis.Put("other", rediskey, *list, 2*60*60)
|
|
|
+ redis.Put("seoCache", rediskey, *list, cacheTime)
|
|
|
data = *list
|
|
|
}
|
|
|
}
|
|
@@ -384,10 +412,10 @@ func (this *Tags) GetkeysMap() []map[string][]map[string]interface{} {
|
|
|
|
|
|
func (this *Tags) GetIndustry(industryHref string) interface{} {
|
|
|
rediskey := fmt.Sprintf("pcindex_getIndustry_%s", industryHref)
|
|
|
- if l := redis.Get("other", rediskey); l != nil {
|
|
|
+ if l := redis.Get("seoCache", rediskey); l != nil {
|
|
|
return l
|
|
|
} else {
|
|
|
- data := public.BaseMysql.SelectBySql(`select a.id,a.name,b.id class_id,b.name class_1 from seo_words.seo_industry a left join seo_words.seo_industry_class b on a.class_1=b.name order by a.class_1`)
|
|
|
+ data := public.BaseMysql.SelectBySql(`select a.id,a.name,b.id class_id,b.name class_1 from seo_words.seo_industry a inner join seo_words.seo_industry_class b on a.class_1=b.name and a.class_2 !='药品' order by a.class_1`)
|
|
|
industryArr := []string{}
|
|
|
industryMap := map[string][]map[string]interface{}{}
|
|
|
if len(*data) > 0 && data != nil {
|
|
@@ -413,10 +441,9 @@ func (this *Tags) GetIndustry(industryHref string) interface{} {
|
|
|
v: industryMap[v],
|
|
|
})
|
|
|
}
|
|
|
- redis.Put("other", rediskey, m, 2*60)
|
|
|
+ redis.Put("seoCache", rediskey, m, cacheTime)
|
|
|
return m
|
|
|
}
|
|
|
- return nil
|
|
|
}
|
|
|
|
|
|
// 判断字符串是否再数组str内
|
|
@@ -432,7 +459,7 @@ func IsInArr(arr []string, s string) bool {
|
|
|
// 获取最新招标信息
|
|
|
func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
|
|
|
rediskey := fmt.Sprintf("pcindex_newArticle")
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
list = qu.ObjArrToMapArr(l)
|
|
|
} else {
|
|
|
_, _, lists := bidsearch.GetPcBidSearchData("", "", "", "", "拟建,招标预告,招标公告,招标结果,招标信用信息", "", "", "", "", "", "", "", "", 1, false, nil, bidSearch_field_1, "", false, false, "", 50, "")
|
|
@@ -452,7 +479,7 @@ func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
|
|
|
}
|
|
|
}
|
|
|
list = *lists
|
|
|
- redis.Put("other", rediskey, list, 2*60*60)
|
|
|
+ redis.Put("seoCache", rediskey, list, cacheTime)
|
|
|
}
|
|
|
}
|
|
|
return list
|
|
@@ -461,26 +488,17 @@ func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
|
|
|
// 获取信息类型相关url
|
|
|
func (this *Tags) GetStype(href string) (list []map[string]interface{}) {
|
|
|
rediskey := fmt.Sprintf("pcseo_stypelist_%s", href)
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
list = qu.ObjArrToMapArr(l)
|
|
|
} else {
|
|
|
m := []map[string]interface{}{}
|
|
|
- var data []map[string]interface{}
|
|
|
- //newData := public.BaseMysql.SelectBySql(`select id,name,pid from seo_words.seo_stype where name = "拟建项目" or name = "采购意向" order by id`)
|
|
|
- //if newData != nil && len(*newData) > 0 {
|
|
|
- // data = append(data, *newData...)
|
|
|
- //}
|
|
|
- //oldData := public.BaseMysql.SelectBySql(`-- select id,name,pid from seo_words.seo_stype where name != "拟建项目" and name != "采购意向" order by id`)
|
|
|
- oldData := public.BaseMysql.SelectBySql(`select id,name,pid from seo_words.seo_stype order by id`)
|
|
|
- if oldData != nil && len(*oldData) > 0 {
|
|
|
- data = append(data, *oldData...)
|
|
|
- }
|
|
|
+ data := public.BaseMysql.SelectBySql(`select id,name,pid from seo_words.seo_stype where name !="拟建项目" and name != "采购意向" and pid=0 order by id`)
|
|
|
codeMap := map[int64][]int64{}
|
|
|
level1 := []int64{}
|
|
|
nameToCode := map[string]int64{}
|
|
|
codeToName := map[int64]string{}
|
|
|
- if len(data) > 0 {
|
|
|
- for _, v := range data {
|
|
|
+ if data != nil && len(*data) > 0 {
|
|
|
+ for _, v := range *data {
|
|
|
name := qu.ObjToString(v["name"])
|
|
|
pid := qu.Int64All(v["pid"])
|
|
|
id := qu.Int64All(v["id"])
|
|
@@ -507,7 +525,7 @@ func (this *Tags) GetStype(href string) (list []map[string]interface{}) {
|
|
|
}
|
|
|
}
|
|
|
list = m
|
|
|
- redis.Put("other", rediskey, list, 2*60)
|
|
|
+ redis.Put("seoCache", rediskey, list, cacheTime)
|
|
|
}
|
|
|
return list
|
|
|
}
|
|
@@ -515,7 +533,7 @@ func (this *Tags) GetStype(href string) (list []map[string]interface{}) {
|
|
|
// 剑鱼博客
|
|
|
func (this *Tags) GetConsult() (list []map[string]interface{}) {
|
|
|
rediskey := fmt.Sprintf("pcseo_jybk")
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
list = qu.ObjArrToMapArr(l)
|
|
|
} else {
|
|
|
|
|
@@ -530,7 +548,7 @@ func (this *Tags) GetConsult() (list []map[string]interface{}) {
|
|
|
v["url"] = fmt.Sprintf("/jyblog/%s.html", qu.ObjToString(v["_id"]))
|
|
|
}
|
|
|
list = *rs
|
|
|
- redis.Put("other", rediskey, list, 2*60*60)
|
|
|
+ redis.Put("seoCache", rediskey, list, cacheTime)
|
|
|
}
|
|
|
}
|
|
|
return list
|
|
@@ -538,8 +556,8 @@ func (this *Tags) GetConsult() (list []map[string]interface{}) {
|
|
|
|
|
|
func (this *Tags) GetLetterMap(pageSize, pageNum int64, letter string) ([]map[string]interface{}, int64) {
|
|
|
m := []map[string]interface{}{}
|
|
|
- sql := `select id,name,letter from seo_words.seo_resource where letter = ? order by id desc`
|
|
|
- cql := `select count(1) from seo_words.seo_resource where letter = ?`
|
|
|
+ sql := `select id,name,letter from seo_words.seo_resource where letter = ? and state=1 order by id desc`
|
|
|
+ cql := `select count(1) from seo_words.seo_resource where letter = ? and state=1 `
|
|
|
offset := (pageNum - 1) * pageSize
|
|
|
sql += fmt.Sprintf(" limit %v,%v", offset, pageSize)
|
|
|
data := public.BaseMysql.SelectBySql(sql, letter)
|
|
@@ -561,12 +579,12 @@ func (this *Tags) GetLetterMap(pageSize, pageNum int64, letter string) ([]map[st
|
|
|
|
|
|
func (this *Tags) GetHotLabel(length int64) []map[string]interface{} {
|
|
|
rediskey := fmt.Sprintf("pcseo_getHotLabel_%v", length)
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
return qu.ObjArrToMapArr(l)
|
|
|
} else {
|
|
|
m := []map[string]interface{}{}
|
|
|
- sql := `select id,name,letter from seo_words.seo_resource`
|
|
|
- cql := `select count(1) from seo_words.seo_resource `
|
|
|
+ sql := `select id,name,letter from seo_words.seo_resource where state=1`
|
|
|
+ cql := `select count(1) from seo_words.seo_resource where state=1`
|
|
|
count := public.BaseMysql.CountBySql(cql)
|
|
|
rand.Seed(time.Now().UnixNano())
|
|
|
offset := rand.Intn(int(count / length))
|
|
@@ -584,7 +602,7 @@ func (this *Tags) GetHotLabel(length int64) []map[string]interface{} {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- redis.Put("other", rediskey, m, 60)
|
|
|
+ redis.Put("seoCache", rediskey, m, cacheTime)
|
|
|
return m
|
|
|
}
|
|
|
return nil
|
|
@@ -606,80 +624,83 @@ func GetBiddingPlatformType() (nameToCode map[string]int64, codeToName map[int64
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// -2 等待池已满
|
|
|
+// -1 超时
|
|
|
+// 1:可以执行查询
|
|
|
+func (r *reqLimit) Limit(ctx context.Context) int {
|
|
|
+ ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
|
|
|
+ defer cancel()
|
|
|
+ select {
|
|
|
+ case <-r.waitPool:
|
|
|
+ defer func() {
|
|
|
+ r.waitPool <- struct{}{}
|
|
|
+ }()
|
|
|
+ select {
|
|
|
+ case <-r.doPool:
|
|
|
+ return 1
|
|
|
+ case <-ctx.Done(): //超时
|
|
|
+ return -1
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ return -2
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (r *reqLimit) Release() {
|
|
|
+ r.doPool <- struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// GetBidding
|
|
|
+// 金额限制在"1000"~"100000000";需求因es压力过大,只返回60%的数据
|
|
|
func (this *Tags) GetBidding(industry, area, city, stype, keyword string, request *http.Request, responseWriter http.ResponseWriter, session *httpsession.Session) ([]map[string]interface{}, int64, bool) {
|
|
|
rediskey := fmt.Sprintf("pcseo_getbidding_%s_%s_%s_%s_%s", industry, area, city, stype, keyword)
|
|
|
rediskeyCount := fmt.Sprintf("pcseo_getbidding_count_%s_%s_%s_%s_%s", industry, area, city, stype, keyword)
|
|
|
|
|
|
- if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil {
|
|
|
- count := redis.GetInt("other", rediskeyCount)
|
|
|
+ if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil {
|
|
|
+ count := redis.GetInt("seoCache", rediskeyCount)
|
|
|
return qu.ObjArrToMapArr(l), int64(count), false
|
|
|
} else {
|
|
|
if area != "" || stype != "" || industry != "" || city != "" || keyword != "" {
|
|
|
+ if flag := reqLimitInit.Limit(context.Background()); flag == 1 {
|
|
|
+ defer reqLimitInit.Release()
|
|
|
+ } else {
|
|
|
+ if flag == -2 {
|
|
|
+ log.Println("等待队列已满")
|
|
|
+ } else if flag == -1 {
|
|
|
+ log.Println("等待超时")
|
|
|
+ }
|
|
|
+ return nil, 0, true
|
|
|
+ }
|
|
|
+
|
|
|
if public.Lst.IsLimited(request, responseWriter, session, false) == 1 { //没有被限制
|
|
|
defer public.Lst.Limit()
|
|
|
} else {
|
|
|
return nil, 0, true
|
|
|
}
|
|
|
- //
|
|
|
- query1 := `{"query": {"bool": {"must":[`
|
|
|
- query_start := `{"query": {"bool": {"must":[`
|
|
|
- if area != "" {
|
|
|
- query1 += `{"term":{"area":"` + area + `"}}`
|
|
|
- }
|
|
|
- if stype != "" {
|
|
|
- if query1 != query_start {
|
|
|
- query1 += ","
|
|
|
- }
|
|
|
- stype = getstype(stype)
|
|
|
- query1 += `{"terms":{"subtype":[`
|
|
|
- for k, v := range strings.Split(stype, ",") {
|
|
|
- if k > 0 {
|
|
|
- query1 += `,`
|
|
|
- }
|
|
|
- query1 += `"` + v + `"`
|
|
|
- }
|
|
|
- query1 += `]}}`
|
|
|
- }
|
|
|
- if industry != "" {
|
|
|
- if query1 != query_start {
|
|
|
- query1 += ","
|
|
|
- }
|
|
|
- query1 += `{"term":{"s_subscopeclass":"` + industry + `"}}`
|
|
|
- }
|
|
|
- if city != "" {
|
|
|
- if query1 != query_start {
|
|
|
- query1 += ","
|
|
|
- }
|
|
|
- query1 += `{"term":{"city":"` + city + `"}}`
|
|
|
- }
|
|
|
- if keyword != "" {
|
|
|
- if query1 != query_start {
|
|
|
- query1 += ","
|
|
|
- }
|
|
|
- query1 += `{ "bool": {"must": [ { "multi_match": { "query": "` + keyword + `","type": "phrase", "fields": [ "title","detail" ]}}]}}`
|
|
|
- }
|
|
|
- query1 += `],"should": [],"minimum_should_match": 0}}}`
|
|
|
- log.Println("~~~query1:", query1)
|
|
|
- query := getLastNewsQuery(area, "", stype, industry, city)
|
|
|
+ now := time.Now()
|
|
|
+ starttime := fmt.Sprint(time.Date(now.Year()-1, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
|
|
|
+ endtime := fmt.Sprint(now.Unix())
|
|
|
var datas *[]map[string]interface{}
|
|
|
var startPage int
|
|
|
+ var count int64
|
|
|
currentPage := 5
|
|
|
- limitcount := qu.IntAllDef(config.Seoconfig["tagsLimitCount"], 50)
|
|
|
- count := elastic.Count(INDEX, TYPE, query1)
|
|
|
+ limitCount := qu.IntAllDef(config.Seoconfig["tagsLimitCount"], 50)
|
|
|
if keyword == "" {
|
|
|
- r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
|
|
- startPage = r.Intn(currentPage * limitcount)
|
|
|
+ query := bidsearch.GetSearchQuery("", industry, "0.1", "1000", "", "", "", "", bidsearch.GetBidSearchQuery(area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, "", ""), "", false, seoBidField)
|
|
|
+ count = elastic.Count(INDEX, TYPE, query)
|
|
|
+ if count == 0 {
|
|
|
+ return nil, 0, false
|
|
|
+ }
|
|
|
+ startPage = rand.New(rand.NewSource(time.Now().UnixNano())).Intn(currentPage * limitCount)
|
|
|
count1 := qu.IntAll(count)
|
|
|
if count1 < startPage || startPage < 0 {
|
|
|
startPage = 0
|
|
|
}
|
|
|
- datas = elastic.GetPage(INDEX, TYPE, query, bidSearch_sort, bidField, startPage, limitcount)
|
|
|
+ datas = elastic.GetPage(INDEX, TYPE, query, bidSearch_sort, seoBidField, startPage, limitCount)
|
|
|
} else {
|
|
|
- log.Println(keyword, area, city, industry)
|
|
|
- _, _, datas = bidsearch.GetPcBidSearchData(keyword, area, city, "", stype, industry, "", "", "", "", "", "", "", 0, true, []string{"title", "detail"}, bidField, "", false, false, "", limitcount, "")
|
|
|
-
|
|
|
- if datas != nil && len(*datas) > limitcount {
|
|
|
- *datas = (*datas)[0:limitcount]
|
|
|
+ count, _, datas = bidsearch.GetPcBidSearchData(keyword, area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, industry, "0.1", "1000", "", "", "", "", "", 0, true, []string{"title", "detail", "purchasing"}, seoBidField, "", false, false, "", limitCount, "")
|
|
|
+ if datas != nil && len(*datas) > limitCount {
|
|
|
+ *datas = (*datas)[0:limitCount]
|
|
|
}
|
|
|
}
|
|
|
if datas != nil && len(*datas) > 0 {
|
|
@@ -699,8 +720,8 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
|
|
|
industry = strings.Split(industry, "_")[0]
|
|
|
}
|
|
|
public.BidListConvert(industry, datas)
|
|
|
- redis.Put("other", rediskey, datas, 2*60)
|
|
|
- redis.Put("other", rediskeyCount, count, 2*60)
|
|
|
+ redis.Put("seoCache", rediskey, datas, cacheTime) //生产环境配置4G单独redis,超出4G自动清除
|
|
|
+ redis.Put("seoCache", rediskeyCount, count, cacheTime) //生产环境配置4G单独redis,超出4G自动清除
|
|
|
return *datas, count, false
|
|
|
}
|
|
|
}
|
|
@@ -773,7 +794,7 @@ func (this *Tags) GetLetterPaging(pageNum int, checkedLetter string) (letterList
|
|
|
|
|
|
// itype 1:汇总页 2:标签页
|
|
|
// stype area:地区 industy:行业 letter:字母类
|
|
|
-func (this *Tags) GetTDK(isDetails bool, stype string, keywords string, pagenum int, letter string, industryWord string, areaWord, letterWord string) map[string]interface{} {
|
|
|
+func (this *Tags) GetTDK(isDetails bool, stype string, keywords string, pagenum int, letter string, industryWord string, areaWord, letterWord, infoType string) map[string]interface{} {
|
|
|
title, keywordsContent, descriptionContent := "", "", ""
|
|
|
if !isDetails {
|
|
|
//汇总页
|
|
@@ -801,13 +822,32 @@ func (this *Tags) GetTDK(isDetails bool, stype string, keywords string, pagenum
|
|
|
keywordsContent = fmt.Sprintf("%s,%s招标,%s采购", areaWord, areaWord, areaWord)
|
|
|
descriptionContent = fmt.Sprintf("提供%s全部招标采购信息,登录后可以免费查看,涵盖%s拟建项目、采购意向、招标公告,中标结果等招投标信息。%s为您提供专业全面的招投标服务!", areaWord, areaWord, areaWord)
|
|
|
} else if stype == "industry" {
|
|
|
- title = fmt.Sprintf("%s招标采购-%s招标信息-中标公告-剑鱼标讯", industryWord, industryWord)
|
|
|
- keywordsContent = fmt.Sprintf("%s招标,%s采购,%s中标,%s招标采购信息", industryWord, industryWord, industryWord, industryWord)
|
|
|
- descriptionContent = fmt.Sprintf("剑鱼标讯是%s招标采购的优质信息平台,免费提供全国%s招标采购信息、招标公告,中标结果等所有%s相关的招投标信息,选择优质%s招标信息网站,就用剑鱼标讯。", industryWord, industryWord, industryWord, industryWord)
|
|
|
+ if infoType == "招标预告" {
|
|
|
+ title = fmt.Sprintf("%s免费招标预告_%s采购信息预告-剑鱼标讯", industryWord, keywords)
|
|
|
+ keywordsContent = fmt.Sprintf("%s免费招标预告,%s招投标预告,%s采购预告", industryWord, industryWord, industryWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s招标信息预告专栏,免费提供%s招标采购预告信息,寻找优质免费%s招标预告信息网站,就用剑鱼标讯!", industryWord, industryWord, industryWord)
|
|
|
+ } else if infoType == "招标公告" {
|
|
|
+ title = fmt.Sprintf("%s免费招标公告_%s采购信息公告-剑鱼标讯", industryWord, keywords)
|
|
|
+ keywordsContent = fmt.Sprintf("%s免费招标公告,%s招投标公告,%s采购公告", industryWord, industryWord, industryWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s招标信息公告专栏,免费提供%s招标采购公告信息,寻找优质免费%s招标公告信息网站,就用剑鱼标讯!", industryWord, industryWord, industryWord)
|
|
|
+ } else if infoType == "招标结果" {
|
|
|
+ title = fmt.Sprintf("%s免费招标结果_%s采购信息结果-剑鱼标讯", industryWord, keywords)
|
|
|
+ keywordsContent = fmt.Sprintf("%s免费招标结果,%s招投标结果,%s采购结果", industryWord, industryWord, industryWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s招标结果专栏,免费提供%s招标采购结果内容,寻找优质免费%s招标结果信息网站,就用剑鱼标讯!", industryWord, industryWord, industryWord)
|
|
|
+ } else if infoType == "招标信用信息" {
|
|
|
+ title = fmt.Sprintf("%s招标采购信用信息查询网-剑鱼标讯", industryWord)
|
|
|
+ keywordsContent = fmt.Sprintf("%s招标信用,%s投标信用,%s采购信用查询", industryWord, industryWord, industryWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s招标信息查询专栏,免费提供%s招标信息查询内容,寻找优质免费%s招标信用查询网站,就用剑鱼标讯!", industryWord, industryWord, industryWord)
|
|
|
+ } else {
|
|
|
+ title = fmt.Sprintf("%s免费招标信息_%s采购服务平台-剑鱼标讯", industryWord, keywords)
|
|
|
+ keywordsContent = fmt.Sprintf("%s免费招标信息,%s招标公告,%s中标公告,%s招标采购,%s招标网", industryWord, industryWord, industryWord, industryWord, industryWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s专栏,是%s招标采购的免费信息平台,免费提供%s招标采购信息、招标公告,中标结果等所有%s相关的招投标信息,寻找优质免费%s招标信息网站,就用剑鱼标讯!", industryWord, industryWord, industryWord, industryWord, industryWord)
|
|
|
+ }
|
|
|
+
|
|
|
} else if stype == "letter" {
|
|
|
- title = fmt.Sprintf("%s招标采购-%s招标信息-中标公告-剑鱼标讯", letterWord, letterWord)
|
|
|
- keywordsContent = fmt.Sprintf("%s招标,%s采购,%s中标,%s招标采购信息", letterWord, letterWord, letterWord, letterWord)
|
|
|
- descriptionContent = fmt.Sprintf("剑鱼标讯是%s招标采购的优质信息平台,免费提供全国%s招标采购信息、招标公告,中标结果等所有%s相关的招投标信息,选择优质%s招标信息网站,就用剑鱼标讯。", letterWord, letterWord, letterWord, letterWord)
|
|
|
+ title = fmt.Sprintf("%s免费招标信息_%s采购平台-剑鱼标讯", letterWord, letterWord)
|
|
|
+ keywordsContent = fmt.Sprintf("%s免费招标信息,%s招标公告,%s中标公告,%s招标采购,%s招标网", letterWord, letterWord, letterWord, letterWord, letterWord)
|
|
|
+ descriptionContent = fmt.Sprintf("剑鱼标讯%s专栏,是%s招标采购的免费信息平台,免费提供全国%s招标采购信息、招标公告、中标结果等所有%s相关的招投标信息,寻找优质免费%s招标信息网站,就用剑鱼标讯!", letterWord, letterWord, letterWord, letterWord, letterWord)
|
|
|
}
|
|
|
}
|
|
|
return map[string]interface{}{
|