|
@@ -3,8 +3,10 @@ package util
|
|
|
import (
|
|
|
"fmt"
|
|
|
. "pushsupersub/push/config"
|
|
|
+ . "pushsupersub/push/db"
|
|
|
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
|
+ "app.yhyue.com/moapp/jybase/redis"
|
|
|
. "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
|
|
|
)
|
|
|
|
|
@@ -16,9 +18,14 @@ func NewPushParam(isLimit bool, dayCount int, mailPush bool, u *UserInfo, sl *So
|
|
|
infos := &SortList{}
|
|
|
infosLength := 0
|
|
|
for _, ks := range *sl {
|
|
|
+ info := NewBiddingInfo(ks.Info, ks.Keys)
|
|
|
+ if u.SubPushInactive == -2 {
|
|
|
+ if exists, _ := redis.Exists(Pushcache_2_c, fmt.Sprintf("inactiveChange_%s_%s", u.Id, info.Id)); exists {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ }
|
|
|
infosLength++
|
|
|
dayCount++
|
|
|
- info := NewBiddingInfo(ks.Info, ks.Keys)
|
|
|
*infos = append(*infos, ks)
|
|
|
titleArray = append(titleArray, info.AreaTitle)
|
|
|
if infosLength == 1 {
|
|
@@ -51,6 +58,13 @@ func NewPushParam(isLimit bool, dayCount int, mailPush bool, u *UserInfo, sl *So
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
+ if u.SubPushInactive == -2 {
|
|
|
+ Mgo.UpdateById(Mgo_User, u.Id, map[string]interface{}{
|
|
|
+ "$set": map[string]interface{}{
|
|
|
+ "subpush_inactive": -3,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
return &PushParam{
|
|
|
JpushTitle: jpushTitle,
|
|
|
LastInfoDate: lastInfoDate,
|