|
@@ -203,10 +203,14 @@ func IntelUser(isFree bool) []string {
|
|
|
|
|
|
// 获取推送消息
|
|
// 获取推送消息
|
|
func messageData(number int) *[]map[string]interface{} {
|
|
func messageData(number int) *[]map[string]interface{} {
|
|
|
|
+ now := time.Now().AddDate(0, 0, -1)
|
|
|
|
+ starttime := fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local).Unix())
|
|
|
|
+ enttime := fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day(), 24, 0, 0, 0, time.Local).Unix())
|
|
|
|
+
|
|
query := map[string]interface{}{
|
|
query := map[string]interface{}{
|
|
- "publishtime": map[string]interface{}{"$gt": time.Now().AddDate(0, 0, -1).Unix()},
|
|
|
|
|
|
+ "yucetime": map[string]interface{}{"$gt": starttime, "$lt": enttime},
|
|
}
|
|
}
|
|
- data, _ := entity.Bidding.Find("project_forecast", query, map[string]interface{}{"publishtime": -1}, `{"title":1,"_id":1}`, false, 0, number)
|
|
|
|
|
|
+ data, _ := entity.Bidding.Find("project_forecast", query, map[string]interface{}{"yucetime": -1}, `{"title":1,"_id":1}`, false, 0, number)
|
|
return data
|
|
return data
|
|
}
|
|
}
|
|
|
|
|