|
@@ -246,22 +246,50 @@ func (u *UserInfo) GetPushSet(obj map[string]interface{}) {
|
|
//解析用户的推送设置
|
|
//解析用户的推送设置
|
|
func (u *UserInfo) PushSetFilter() {
|
|
func (u *UserInfo) PushSetFilter() {
|
|
if u.Subscribe == 0 || u.S_m_openid == "" {
|
|
if u.Subscribe == 0 || u.S_m_openid == "" {
|
|
- u.PushSet.SubSet.WxPush = -1
|
|
|
|
- u.PushSet.WeekReport.WxPush = -1
|
|
|
|
- u.PushSet.MonthReport.WxPush = -1
|
|
|
|
- u.PushSet.NewprojectForecast.WxPush = -1
|
|
|
|
- u.PushSet.EntInfo.WxPush = -1
|
|
|
|
- u.PushSet.FollowProject.WxPush = -1
|
|
|
|
- u.PushSet.FollowEnt.WxPush = -1
|
|
|
|
|
|
+ if u.PushSet.SubSet != nil {
|
|
|
|
+ u.PushSet.SubSet.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.WeekReport != nil {
|
|
|
|
+ u.PushSet.WeekReport.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.MonthReport != nil {
|
|
|
|
+ u.PushSet.MonthReport.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.NewprojectForecast != nil {
|
|
|
|
+ u.PushSet.NewprojectForecast.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.EntInfo != nil {
|
|
|
|
+ u.PushSet.EntInfo.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowProject != nil {
|
|
|
|
+ u.PushSet.FollowProject.WxPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowEnt != nil {
|
|
|
|
+ u.PushSet.FollowEnt.WxPush = -1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if u.Jpushid == "" && u.Opushid == "" {
|
|
if u.Jpushid == "" && u.Opushid == "" {
|
|
- u.PushSet.SubSet.AppPush = -1
|
|
|
|
- u.PushSet.WeekReport.AppPush = -1
|
|
|
|
- u.PushSet.MonthReport.AppPush = -1
|
|
|
|
- u.PushSet.NewprojectForecast.AppPush = -1
|
|
|
|
- u.PushSet.EntInfo.AppPush = -1
|
|
|
|
- u.PushSet.FollowProject.AppPush = -1
|
|
|
|
- u.PushSet.FollowEnt.AppPush = -1
|
|
|
|
|
|
+ if u.PushSet.SubSet != nil {
|
|
|
|
+ u.PushSet.SubSet.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.WeekReport != nil {
|
|
|
|
+ u.PushSet.WeekReport.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.MonthReport != nil {
|
|
|
|
+ u.PushSet.MonthReport.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.NewprojectForecast != nil {
|
|
|
|
+ u.PushSet.NewprojectForecast.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.EntInfo != nil {
|
|
|
|
+ u.PushSet.EntInfo.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowProject != nil {
|
|
|
|
+ u.PushSet.FollowProject.AppPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowEnt != nil {
|
|
|
|
+ u.PushSet.FollowEnt.AppPush = -1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
mailPush := true
|
|
mailPush := true
|
|
if (u.S_m_openid == "" || (u.S_m_openid != "" && u.Subscribe == 0)) && u.Phone == "" && u.A_m_openid == "" {
|
|
if (u.S_m_openid == "" || (u.S_m_openid != "" && u.Subscribe == 0)) && u.Phone == "" && u.A_m_openid == "" {
|
|
@@ -272,13 +300,27 @@ func (u *UserInfo) PushSetFilter() {
|
|
mailPush = false
|
|
mailPush = false
|
|
}
|
|
}
|
|
if !mailPush {
|
|
if !mailPush {
|
|
- u.PushSet.SubSet.MailPush = -1
|
|
|
|
- u.PushSet.WeekReport.MailPush = -1
|
|
|
|
- u.PushSet.MonthReport.MailPush = -1
|
|
|
|
- u.PushSet.NewprojectForecast.MailPush = -1
|
|
|
|
- u.PushSet.EntInfo.MailPush = -1
|
|
|
|
- u.PushSet.FollowProject.MailPush = -1
|
|
|
|
- u.PushSet.FollowEnt.MailPush = -1
|
|
|
|
|
|
+ if u.PushSet.SubSet != nil {
|
|
|
|
+ u.PushSet.SubSet.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.WeekReport != nil {
|
|
|
|
+ u.PushSet.WeekReport.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.MonthReport != nil {
|
|
|
|
+ u.PushSet.MonthReport.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.NewprojectForecast != nil {
|
|
|
|
+ u.PushSet.NewprojectForecast.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.EntInfo != nil {
|
|
|
|
+ u.PushSet.EntInfo.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowProject != nil {
|
|
|
|
+ u.PushSet.FollowProject.MailPush = -1
|
|
|
|
+ }
|
|
|
|
+ if u.PushSet.FollowEnt != nil {
|
|
|
|
+ u.PushSet.FollowEnt.MailPush = -1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|