|
@@ -30,7 +30,7 @@ func (n *NothingJob) PushNothing(ratetype int) {
|
|
|
"i_vip_status": map[string]interface{}{
|
|
|
"$in": []int{1, 2},
|
|
|
},
|
|
|
- // "s_m_openid": "o043a5hr4gD9e1Yy8DSNjy9BX3U4",
|
|
|
+ // "s_m_openid": "ouCYjw5eUMXFErd1OMpOVthwWA0Q",
|
|
|
}
|
|
|
all := mongodb.Find("user", query, nil, `{"_id":1,"s_nickname":1,"o_vipjy":1,"a_jpushid":1,"s_jpushid":1,"s_opushid":1,"s_m_openid":1,"s_appponetype":1,"i_applystatus":1}`, false, 0, 0)
|
|
|
t, _ := time.ParseInLocation("2006-01-02", time.Now().Format("2006-01-02"), time.Local)
|
|
@@ -39,10 +39,11 @@ func (n *NothingJob) PushNothing(ratetype int) {
|
|
|
userid := util.BsonIdToSId(v["_id"])
|
|
|
day1, day2 := n.ComputTime(ratemode, t)
|
|
|
if n.isNoInfo(userid, day1, day2) {
|
|
|
- if ratetype == 1 {
|
|
|
- if ratemode != 1 {
|
|
|
- continue
|
|
|
- }
|
|
|
+ if ratetype == 1 && ratemode != 1 { //实时推送的过滤掉其他推送
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ if ratetype == 0 && ratemode == 1 { //其他推送 过滤掉实时推送
|
|
|
+ continue
|
|
|
}
|
|
|
if ratemode == 3 && !(strings.ToLower(time.Now().Weekday().String()) == strings.ToLower(Config.VipPushWeek)) {
|
|
|
continue
|
|
@@ -74,12 +75,12 @@ func (n *NothingJob) StartPush(user []map[string]interface{}) {
|
|
|
userid := util.BsonIdToSId(v["_id"])
|
|
|
//APP推送
|
|
|
if util.IntAll(vipjy["i_apppush"]) == 1 {
|
|
|
- logger.Info("推送任务 -未匹配到数据- 开始app推送", userid)
|
|
|
+ logger.Info("推送任务 未匹配到数据 开始app推送", userid)
|
|
|
isPushOk := putil.SendApp(map[string]interface{}{
|
|
|
"phoneType": v["s_appponetype"],
|
|
|
"descript": "亲爱的VIP订阅用户,",
|
|
|
"descriptAppend": "根据您当前的订阅,无法精准的为您推送新的增量信息,建议您对订阅设置进行修改,剑鱼标讯期待更好的为您服务。",
|
|
|
- "type": "message",
|
|
|
+ "type": "nothing",
|
|
|
"userId": userid,
|
|
|
"url": "/jyapp/vipsubscribe/toSubVipSetPage",
|
|
|
"otherPushId": v["s_opushid"],
|