|
@@ -41,7 +41,7 @@ const (
|
|
|
bidSearch_field = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
|
|
|
)
|
|
|
|
|
|
-//GetWxsearchlistData 移动端招标信息搜索
|
|
|
+// GetWxsearchlistData 移动端招标信息搜索
|
|
|
func GetWxsearchlistData(keywords, scope, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, pageNum int, selectTypeArr []string, field, notkey string, searchTypeSwitch bool, pageSize int) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
|
|
|
var hightlightContent bool = false //是否高亮正文
|
|
|
for _, v := range selectTypeArr {
|
|
@@ -75,7 +75,7 @@ func GetWxsearchlistData(keywords, scope, city, publishtime, subtype, industry,
|
|
|
return list, b_word, a_word, s_word
|
|
|
}
|
|
|
|
|
|
-//GetPcBidSearchData pc端招标信息搜索
|
|
|
+// GetPcBidSearchData pc端招标信息搜索
|
|
|
func GetPcBidSearchData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, start int, isGetCount bool, selectTypeArr []string, field, notkey string, ispayed, searchTypeSwitch bool, bidField string, pageSize int, userId string) (count, totalPage int64, list *[]map[string]interface{}) {
|
|
|
var findfields string
|
|
|
var hightlightContent bool = false //是否高亮正文
|
|
@@ -249,12 +249,12 @@ func GetBidSearchQuery(area, city, publishtime, subtype, winner, buyerclass stri
|
|
|
return query
|
|
|
}
|
|
|
|
|
|
-//包含正文或 附件 不包含标题
|
|
|
+// 包含正文或 附件 不包含标题
|
|
|
func DetailFileORTitle(findfields string) bool {
|
|
|
return (strings.Contains(findfields, `"detail"`) || strings.Contains(findfields, `"filetext"`)) && !strings.Contains(findfields, `"title"`)
|
|
|
}
|
|
|
|
|
|
-//包含标题和正文
|
|
|
+// 包含标题和正文
|
|
|
func DetailTitle(findfields string) bool {
|
|
|
return strings.Contains(findfields, `"detail"`) && strings.Contains(findfields, `"title"`)
|
|
|
}
|
|
@@ -419,7 +419,7 @@ func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit
|
|
|
return isPayedUser, publishtime, queryItems, currentPage, start
|
|
|
}
|
|
|
|
|
|
-//所有的再次分词查询 只查标题
|
|
|
+// 所有的再次分词查询 只查标题
|
|
|
func IntegratedData(platform string, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}, field string, searchTypeSwitch bool, bidField string, pageSize int) (string, string, string, string, *[]map[string]interface{}) {
|
|
|
var pcAjaxFlag string
|
|
|
var secRel *[]map[string]interface{} = list
|
|
@@ -480,8 +480,8 @@ func classify(stp, area, industry string, configData map[string]interface{}) (st
|
|
|
return tpadd, areaadd, induadd
|
|
|
}
|
|
|
|
|
|
-//list != nil && len(*list) == bidsearch.SearchPageSize_APP && pageNum < util.If(isPayedUser, bidsearch.SearchMaxPageNum_PAYED, bidsearch.SearchMaxPageNum_APP).(int)
|
|
|
-//数据格式化处理
|
|
|
+// list != nil && len(*list) == bidsearch.SearchPageSize_APP && pageNum < util.If(isPayedUser, bidsearch.SearchMaxPageNum_PAYED, bidsearch.SearchMaxPageNum_APP).(int)
|
|
|
+// 数据格式化处理
|
|
|
func LisetData(stype, pageNum int, list *[]map[string]interface{}, secondFlag string, configData map[string]interface{}, isPayedUser bool, pageSize int, userId string) ([]map[string]interface{}, int64, bool) {
|
|
|
var (
|
|
|
secondList []map[string]interface{}
|
|
@@ -556,7 +556,6 @@ func SearchData(platform string, request *http.Request, currentPage int, userId,
|
|
|
} else {
|
|
|
count, totalPage, list = GetPcBidSearchData(s_word, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, start, isGetCount, queryItems, field, notkey, isPayedUser, searchTypeSwitch, bidField, pageSize, userId)
|
|
|
}
|
|
|
-
|
|
|
if len([]rune(s_word)) > 3 && int(count) < pageSize && start == number && secondSearch {
|
|
|
var paramList = list
|
|
|
s_word, pcAjaxFlag, secondFlag, second, list = IntegratedData(platform, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey, queryItems, paramList, field, searchTypeSwitch, bidField, pageSize)
|