Browse Source

wip:首页推荐企业和采购单位修改

wangkaiyue 1 year ago
parent
commit
b9cc412528
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/jfw/front/classificationTag.go

+ 2 - 2
src/jfw/front/classificationTag.go

@@ -121,9 +121,9 @@ func GetHotWinnerBuyer(identityType, limit int) []map[string]interface{} {
 	queryTotal := gconv.Int(gconv.Float64(limit) * 1.5)
 	var querySql string
 	if isWinner {
-		querySql = fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "s_winner"}},{"exists": {"field": "entidlist"}}],"must_not":[{"term":{"entidlist":"-"}}]}},"_source":["buyer","s_winner","entidlist"],"size": %d}`, queryTotal)
+		querySql = fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "s_winner"}},{"exists": {"field": "entidlist"}}],"must_not":[{"term":{"entidlist":"-"}}]}},"_source":["buyer","s_winner","entidlist"],"sort":[{"lasttime": "desc"}],"size": %d}`, queryTotal)
 	} else {
-		querySql = fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "buyer"}}]}},"_source":["buyer","s_winner","entidlist"],"size": %d}`, queryTotal)
+		querySql = fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "buyer"}}]}},"_source":["buyer","s_winner","entidlist"],"sort":[{"lasttime": "desc"}],"size": %d}`, queryTotal)
 	}
 	getData := elastic.GetNoLimit("projectset", "projectset", querySql)
 	var finalList []map[string]interface{}