|
@@ -2250,17 +2250,17 @@ func (s *subscribePush) SubRecList(userId string, keyword []ViewKeyWord) (hasNex
|
|
if ids, ok := (*infos)[0]["infoids"].([]interface{}); ok && len(ids) > 0 {
|
|
if ids, ok := (*infos)[0]["infoids"].([]interface{}); ok && len(ids) > 0 {
|
|
length := len(ids)
|
|
length := len(ids)
|
|
resultList = make([]*bxsubscribe.SubscribeInfo, length)
|
|
resultList = make([]*bxsubscribe.SubscribeInfo, length)
|
|
- for i, id := range ids {
|
|
|
|
- info, b := IC.MgoBidding.FindOneByField("bidding", bson.M{"autoid": id}, bidField)
|
|
|
|
- if b && info != nil && len(*info) > 0 {
|
|
|
|
- title := strings.Replace(common.ObjToString((*info)["title"]), " ", "", -1)
|
|
|
|
|
|
+ binfo, _ := IC.MgoBidding.Find("bidding", bson.M{"autoid": bson.M{"$in": ids}}, `{"publishtime": -1}`, bidField, false, -1, -1)
|
|
|
|
+ if binfo != nil && len(*binfo) > 0 {
|
|
|
|
+ for i, m := range *binfo {
|
|
|
|
+ title := strings.Replace(common.ObjToString(m["title"]), " ", "", -1)
|
|
matchkeys := getKeys(title, keyword)
|
|
matchkeys := getKeys(title, keyword)
|
|
resultList[i] = s.InfoFormat(&PushCa{
|
|
resultList[i] = s.InfoFormat(&PushCa{
|
|
- InfoId: mongodb.BsonIdToSId((*info)["_id"]),
|
|
|
|
|
|
+ InfoId: mongodb.BsonIdToSId(m["_id"]),
|
|
Date: time.Now().Unix(),
|
|
Date: time.Now().Unix(),
|
|
Keys: matchkeys,
|
|
Keys: matchkeys,
|
|
- FileExists: (*info)["filetext"] != nil,
|
|
|
|
- }, info, false)
|
|
|
|
|
|
+ FileExists: m["filetext"] != nil,
|
|
|
|
+ }, &m, false)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
total = int64(len(resultList))
|
|
total = int64(len(resultList))
|