|
@@ -66,11 +66,12 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
//
|
|
//
|
|
ShowWx := false
|
|
ShowWx := false
|
|
s_m_openid := ""
|
|
s_m_openid := ""
|
|
- pushSetMap, _ = IC.Mgo.FindById(util.USER, this.UserId, `{"o_pushset":":1,"s_m_openid":1}`)
|
|
|
|
|
|
+ pushSetMap, _ = IC.Mgo.FindById(util.USER, this.UserId, `{"o_pushset":":1,"s_m_openid":1,"l_registedate",1}`)
|
|
if pushSetMap != nil && len(*pushSetMap) > 0 {
|
|
if pushSetMap != nil && len(*pushSetMap) > 0 {
|
|
s_m_openid = common.InterfaceToStr((*pushSetMap)["s_m_openid"])
|
|
s_m_openid = common.InterfaceToStr((*pushSetMap)["s_m_openid"])
|
|
o_msgPushSet, _ = (*pushSetMap)["o_pushset"].(map[string]interface{})
|
|
o_msgPushSet, _ = (*pushSetMap)["o_pushset"].(map[string]interface{})
|
|
}
|
|
}
|
|
|
|
+ registedate := int64(0)
|
|
if s_m_openid != "" {
|
|
if s_m_openid != "" {
|
|
//微信是否关注处理
|
|
//微信是否关注处理
|
|
subscribeList := &[]map[string]interface{}{}
|
|
subscribeList := &[]map[string]interface{}{}
|
|
@@ -81,8 +82,8 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
ShowWx = true
|
|
ShowWx = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ registedate = common.Int64All((*pushSetMap)["l_registedate"])
|
|
}
|
|
}
|
|
-
|
|
|
|
if this.PositionType == 1 {
|
|
if this.PositionType == 1 {
|
|
pushSetMap, _ = IC.Mgo.FindOne(util.ENTUSER, map[string]interface{}{"i_entid": this.EntId, "i_userid": this.EntUserId})
|
|
pushSetMap, _ = IC.Mgo.FindOne(util.ENTUSER, map[string]interface{}{"i_entid": this.EntId, "i_userid": this.EntUserId})
|
|
}
|
|
}
|
|
@@ -103,69 +104,69 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//推送设置
|
|
//推送设置
|
|
- fool, o_subset := pushSetMontage(o_pushset["o_subset"], "o_subset", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_subset := pushSetMontage(o_pushset["o_subset"], "o_subset", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_subset"] = o_subset
|
|
pushSet["o_subset"] = o_subset
|
|
}
|
|
}
|
|
|
|
|
|
- fool, o_week_report := pushSetMontage(o_pushset["o_week_report"], "o_week_report", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_week_report := pushSetMontage(o_pushset["o_week_report"], "o_week_report", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_week_report"] = o_week_report
|
|
pushSet["o_week_report"] = o_week_report
|
|
}
|
|
}
|
|
- fool, o_month_report := pushSetMontage(o_pushset["o_month_report"], "o_month_report", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_month_report := pushSetMontage(o_pushset["o_month_report"], "o_month_report", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_month_report"] = o_month_report
|
|
pushSet["o_month_report"] = o_month_report
|
|
}
|
|
}
|
|
- fool, o_newproject_forecast := pushSetMontage(o_pushset["o_newproject_forecast"], "o_newproject_forecast", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_newproject_forecast := pushSetMontage(o_pushset["o_newproject_forecast"], "o_newproject_forecast", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_newproject_forecast"] = o_newproject_forecast
|
|
pushSet["o_newproject_forecast"] = o_newproject_forecast
|
|
}
|
|
}
|
|
//企业信息
|
|
//企业信息
|
|
- fool, o_entinfo := pushSetMontage(o_pushset["o_entinfo"], "o_entinfo", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_entinfo := pushSetMontage(o_pushset["o_entinfo"], "o_entinfo", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_entinfo"] = o_entinfo
|
|
pushSet["o_entinfo"] = o_entinfo
|
|
}
|
|
}
|
|
//项目关注
|
|
//项目关注
|
|
- fool, o_follow_project := pushSetMontage(o_pushset["o_follow_project"], "o_follow_project", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_follow_project := pushSetMontage(o_pushset["o_follow_project"], "o_follow_project", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_follow_project"] = o_follow_project
|
|
pushSet["o_follow_project"] = o_follow_project
|
|
}
|
|
}
|
|
//企业关注
|
|
//企业关注
|
|
- fool, o_follow_ent := pushSetMontage(o_pushset["o_follow_ent"], "o_follow_ent", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_follow_ent := pushSetMontage(o_pushset["o_follow_ent"], "o_follow_ent", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
}
|
|
}
|
|
//消息
|
|
//消息
|
|
- fool, o_msg_active := pushSetMontage(o_msgPushSet["o_msg_active"], "o_msg_active", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_active := pushSetMontage(o_msgPushSet["o_msg_active"], "o_msg_active", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_active"] = o_msg_active
|
|
pushSet["o_msg_active"] = o_msg_active
|
|
}
|
|
}
|
|
//消息服务
|
|
//消息服务
|
|
- fool, o_msg_service := pushSetMontage(o_msgPushSet["o_msg_service"], "o_msg_service", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_service := pushSetMontage(o_msgPushSet["o_msg_service"], "o_msg_service", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_service"] = o_msg_service
|
|
pushSet["o_msg_service"] = o_msg_service
|
|
}
|
|
}
|
|
//剑鱼学堂
|
|
//剑鱼学堂
|
|
- fool, o_msg_jyschool := pushSetMontage(o_msgPushSet["o_msg_jyschool"], "o_msg_jyschool", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_jyschool := pushSetMontage(o_msgPushSet["o_msg_jyschool"], "o_msg_jyschool", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_jyschool"] = o_msg_jyschool
|
|
pushSet["o_msg_jyschool"] = o_msg_jyschool
|
|
}
|
|
}
|
|
- fool, o_msg_business := pushSetMontage(o_msgPushSet["o_msg_business"], "o_msg_business", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_business := pushSetMontage(o_msgPushSet["o_msg_business"], "o_msg_business", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_business"] = o_msg_business
|
|
pushSet["o_msg_business"] = o_msg_business
|
|
}
|
|
}
|
|
//私信
|
|
//私信
|
|
- fool, o_msg_pending := pushSetMontage(o_msgPushSet["o_msg_pending"], "o_msg_business", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_pending := pushSetMontage(o_msgPushSet["o_msg_pending"], "o_msg_business", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_pending"] = o_msg_pending
|
|
pushSet["o_msg_pending"] = o_msg_pending
|
|
}
|
|
}
|
|
- fool, o_msg_privateletter := pushSetMontage(o_msgPushSet["o_msg_privateletter"], "o_msg_privateletter", powerData, ShowWx)
|
|
|
|
|
|
+ fool, o_msg_privateletter := pushSetMontage(o_msgPushSet["o_msg_privateletter"], "o_msg_privateletter", powerData, ShowWx, registedate)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_msg_privateletter"] = o_msg_privateletter
|
|
pushSet["o_msg_privateletter"] = o_msg_privateletter
|
|
}
|
|
}
|
|
return pushSet
|
|
return pushSet
|
|
}
|
|
}
|
|
-func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx bool) (bool, *bxsubscribe.PushSet) {
|
|
|
|
|
|
+func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx bool, registedate int64) (bool, *bxsubscribe.PushSet) {
|
|
data := common.ObjToMap(in)
|
|
data := common.ObjToMap(in)
|
|
a_times := []string{}
|
|
a_times := []string{}
|
|
isMailShow := int64(1)
|
|
isMailShow := int64(1)
|
|
@@ -346,16 +347,22 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
if name == "o_msg_active" {
|
|
if name == "o_msg_active" {
|
|
isWXShow = 0
|
|
isWXShow = 0
|
|
}
|
|
}
|
|
|
|
+ iApppush := int64(0)
|
|
|
|
+ iWxpush := int64(0)
|
|
|
|
+ if registedate > IC.C.Registedate {
|
|
|
|
+ iApppush = 1
|
|
|
|
+ iWxpush = 1
|
|
|
|
+ }
|
|
if data == nil || len(*data) == 0 {
|
|
if data == nil || len(*data) == 0 {
|
|
returnData = &bxsubscribe.PushSet{
|
|
returnData = &bxsubscribe.PushSet{
|
|
- IApppush: 0,
|
|
|
|
- IWxpush: 0,
|
|
|
|
|
|
+ IApppush: iApppush,
|
|
|
|
+ IWxpush: iWxpush,
|
|
IsWxShow: isWXShow,
|
|
IsWxShow: isWXShow,
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
returnData = &bxsubscribe.PushSet{
|
|
returnData = &bxsubscribe.PushSet{
|
|
- IApppush: common.Int64All(common.If((*data)["i_apppush"] == nil, 0, (*data)["i_apppush"])),
|
|
|
|
- IWxpush: common.Int64All(common.If((*data)["i_wxpush"] == nil, 0, (*data)["i_wxpush"])),
|
|
|
|
|
|
+ IApppush: common.Int64All(common.If((*data)["i_apppush"] == nil, iApppush, (*data)["i_apppush"])),
|
|
|
|
+ IWxpush: common.Int64All(common.If((*data)["i_wxpush"] == nil, iWxpush, (*data)["i_wxpush"])),
|
|
IsWxShow: isWXShow,
|
|
IsWxShow: isWXShow,
|
|
}
|
|
}
|
|
}
|
|
}
|