|
@@ -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{}
|