|
@@ -2,7 +2,6 @@ package service
|
|
|
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/log"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
|
|
|
"fmt"
|
|
|
IC "jyBXSubscribe/rpc/init"
|
|
@@ -50,7 +49,7 @@ func (this *PushSetService) Update(item, setType, pushType string, ratemode, pus
|
|
|
}
|
|
|
}
|
|
|
update := false
|
|
|
- if this.PositionType == 0 || setType == "message" {
|
|
|
+ if (setType == "message" && this.PositionType == 1) || this.PositionType == 0 {
|
|
|
update = IC.Mgo.UpdateById(util.USER, this.UserId, map[string]interface{}{
|
|
|
"$set": set,
|
|
|
})
|
|
@@ -63,12 +62,14 @@ func (this *PushSetService) Update(item, setType, pushType string, ratemode, pus
|
|
|
}
|
|
|
func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
|
pushSetMap := &map[string]interface{}{}
|
|
|
+ o_msgPushSet := map[string]interface{}{}
|
|
|
//
|
|
|
ShowWx := false
|
|
|
s_m_openid := ""
|
|
|
pushSetMap, _ = IC.Mgo.FindById(util.USER, this.UserId, `{"o_pushset":":1,"s_m_openid":1}`)
|
|
|
if pushSetMap != nil && len(*pushSetMap) > 0 {
|
|
|
s_m_openid = common.InterfaceToStr((*pushSetMap)["s_m_openid"])
|
|
|
+ o_msgPushSet, _ = (*pushSetMap)["o_pushset"].(map[string]interface{})
|
|
|
}
|
|
|
if s_m_openid != "" {
|
|
|
//微信是否关注处理
|
|
@@ -131,23 +132,23 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
|
}
|
|
|
//消息
|
|
|
- fool, o_msg_active := pushSetMontage(o_pushset["o_msg_active"], "o_msg_active", powerData, ShowWx)
|
|
|
+ fool, o_msg_active := pushSetMontage(o_msgPushSet["o_msg_active"], "o_msg_active", powerData, ShowWx)
|
|
|
if fool {
|
|
|
pushSet["o_msg_active"] = o_msg_active
|
|
|
}
|
|
|
- fool, o_msg_service := pushSetMontage(o_pushset["o_msg_service"], "o_msg_service", powerData, ShowWx)
|
|
|
+ fool, o_msg_service := pushSetMontage(o_msgPushSet["o_msg_service"], "o_msg_service", powerData, ShowWx)
|
|
|
if fool {
|
|
|
pushSet["o_msg_service"] = o_msg_service
|
|
|
}
|
|
|
- fool, o_msg_jyschool := pushSetMontage(o_pushset["o_msg_jyschool"], "o_msg_jyschool", powerData, ShowWx)
|
|
|
+ fool, o_msg_jyschool := pushSetMontage(o_msgPushSet["o_msg_jyschool"], "o_msg_jyschool", powerData, ShowWx)
|
|
|
if fool {
|
|
|
pushSet["o_msg_jyschool"] = o_msg_jyschool
|
|
|
}
|
|
|
- fool, o_msg_business := pushSetMontage(o_pushset["o_msg_business"], "o_msg_business", powerData, ShowWx)
|
|
|
+ fool, o_msg_business := pushSetMontage(o_msgPushSet["o_msg_business"], "o_msg_business", powerData, ShowWx)
|
|
|
if fool {
|
|
|
pushSet["o_msg_business"] = o_msg_business
|
|
|
}
|
|
|
- fool, o_msg_privateletter := pushSetMontage(o_pushset["o_msg_privateletter"], "o_msg_privateletter", powerData, ShowWx)
|
|
|
+ fool, o_msg_privateletter := pushSetMontage(o_msgPushSet["o_msg_privateletter"], "o_msg_privateletter", powerData, ShowWx)
|
|
|
if fool {
|
|
|
pushSet["o_msg_privateletter"] = o_msg_privateletter
|
|
|
}
|
|
@@ -317,7 +318,6 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
|
}
|
|
|
case "o_msg_active", "o_msg_service", "o_msg_jyschool", "o_msg_privateletter", "o_msg_business":
|
|
|
isReturnMailShow = false
|
|
|
- log.Println(name, data)
|
|
|
var isWXShow int64
|
|
|
isWXShow = 1
|
|
|
if name == "o_msg_active" {
|