|
@@ -586,12 +586,12 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
|
|
|
return array
|
|
|
}
|
|
|
|
|
|
-//保存最近7天的数据到历史记录
|
|
|
+//保存最近7天的数据到历史记录--普通用户
|
|
|
func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.Mysql, userId string, PushView func(userid, allquery, field string, pageNum, pageSize int) (keys []interface{}, list *[]map[string]interface{})) (bool, []*SubPushList) {
|
|
|
log.Println("匹配最近7天数据", userId)
|
|
|
field := `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site"`
|
|
|
allquery := `{"range":{"publishtime":{"gt":%s}}}`
|
|
|
- allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(1, 0, -7).Unix()))
|
|
|
+ allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(0, 0, -7).Unix()))
|
|
|
//allquery = ``
|
|
|
keys, list := PushView(userId, allquery, field, 1, 50)
|
|
|
if list == nil || len(*list) == 0 {
|