|
@@ -66,6 +66,7 @@ func EachAllBidInfo(stype, TITLEA, ShortTitle string, lastTime int64, MaxPushSiz
|
|
|
query := session.DB("qfw").C("bidding").Find(mongodb.ObjToOth(q)).Sort("-publishtime").Iter()
|
|
|
userMap := &map[*push.MemberInterest]*list.List{}
|
|
|
var returnLastTime interface{}
|
|
|
+ var returnLastTimeLong int64 = 0
|
|
|
L1:
|
|
|
for tmp := new(map[string]interface{}); query.Next(tmp); {
|
|
|
title := util.ObjToString((*tmp)["title"])
|
|
@@ -96,14 +97,18 @@ L1:
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if returnLastTime == nil {
|
|
|
- returnLastTime = (*tmp)["comeintime"]
|
|
|
+ if (*tmp)["comeintime"] != nil {
|
|
|
+ ttmp := (*tmp)["comeintime"].(int64)
|
|
|
+ if ttmp > returnLastTimeLong {
|
|
|
+ returnLastTimeLong = ttmp
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
tmp = new(map[string]interface{})
|
|
|
}
|
|
|
now := time.Now()
|
|
|
- if pushType == 1 && returnLastTime != nil {
|
|
|
+ if pushType == 1 && returnLastTimeLong > 0 {
|
|
|
+ returnLastTime = returnLastTimeLong
|
|
|
push.PushConfig[stype+"StartTime"] = util.FormatDateWithObj(&returnLastTime, util.Date_Full_Layout)
|
|
|
}
|
|
|
for k, v := range *(userMap) {
|
|
@@ -228,6 +233,6 @@ func SendWeixin(k *push.MemberInterest, TITLE, ShortTitle, str, stype string, no
|
|
|
Date: wxDate,
|
|
|
Service: "剑鱼君",
|
|
|
//Url: push.PushConfig["bidViewDomain"].(string) + "/wxpush/bid/" + k.Openid + "/" + wid + "/aa"})
|
|
|
- Url: push.PushConfig["bidViewDomain"].(string) + "/mobile/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "##" + k.Openid + "##" + wid + "##aa"})
|
|
|
+ Url: push.PushConfig["bidViewDomain"].(string) + "/mobile/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "__" + k.Openid + "__" + wid + "__aa"})
|
|
|
|
|
|
}
|