|
@@ -86,7 +86,7 @@ func GetNewestInfo(userId, userType string, newUserId int64) *NewestInfo {
|
|
|
TableName: mysqlTables[userType],
|
|
|
MysqlDb: IC.BaseServiceMysql,
|
|
|
NewUserId: newUserId,
|
|
|
- NewsLimitNum: IC.C.NewsLimitNum,
|
|
|
+ NewsLimitNum: IC.C.NewsLimitNum + 10,
|
|
|
}
|
|
|
return nt
|
|
|
}
|
|
@@ -224,6 +224,9 @@ func (n *NewestInfo) GetPushHistory() (res []*bxbase.NewestList) {
|
|
|
}
|
|
|
//
|
|
|
for _, v := range infos {
|
|
|
+ if v.Title == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
res = append(res, v)
|
|
|
}
|
|
|
}
|
|
@@ -255,7 +258,7 @@ func NewestQuery(city, keys, subtype string) (str string) {
|
|
|
if len(bools) > 0 {
|
|
|
minimum_should_match = 1
|
|
|
}
|
|
|
- str = fmt.Sprintf(query_city_hkeys, strings.Join(musts, ","), strings.Join(bools, ","), minimum_should_match, IC.C.NewsLimitNum)
|
|
|
+ str = fmt.Sprintf(query_city_hkeys, strings.Join(musts, ","), strings.Join(bools, ","), minimum_should_match, IC.C.NewsLimitNum+10)
|
|
|
logx.Info("str:", str)
|
|
|
return
|
|
|
}
|
|
@@ -265,11 +268,15 @@ func NewestES(doSearchStr string) (res []*bxbase.NewestList) {
|
|
|
list := elastic.Get(search_index, search_type, doSearchStr)
|
|
|
if list != nil && len(*list) > 0 {
|
|
|
for _, v := range *list {
|
|
|
+ title := MC.ObjToString(v["title"])
|
|
|
+ if title == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
_id := mongodb.BsonIdToSId(v["_id"])
|
|
|
isValidFile, _ := v["isValidFile"].(bool)
|
|
|
res = append(res, &bxbase.NewestList{
|
|
|
Id: ME.EncodeArticleId2ByCheck(_id),
|
|
|
- Title: MC.ObjToString(v["title"]),
|
|
|
+ Title: title,
|
|
|
Subtype: MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string),
|
|
|
Area: MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string),
|
|
|
Buyerclass: MC.ObjToString(v["buyerclass"]),
|