|
@@ -39,6 +39,10 @@ func (this *PushSetService) Update(item, setType, pushType string, ratemode, pus
|
|
|
fmt.Sprintf("o_pushset.%s.a_times", item): times,
|
|
|
fmt.Sprintf("o_pushset.%s.i_ratemode", item): common.IntAll(ratemode),
|
|
|
}
|
|
|
+ case "message":
|
|
|
+ set = map[string]interface{}{
|
|
|
+ fmt.Sprintf("o_pushset.%s.%s", item, pushType): common.IntAll(pushValue),
|
|
|
+ }
|
|
|
default:
|
|
|
set = map[string]interface{}{
|
|
|
"o_pushset.i_interested": common.IntAll(interested),
|
|
@@ -125,7 +129,23 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
|
if fool {
|
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
|
}
|
|
|
-
|
|
|
+ //消息
|
|
|
+ fool, o_msg_active := pushSetMontage(o_pushset["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)
|
|
|
+ if fool {
|
|
|
+ pushSet["o_msg_service"] = o_msg_service
|
|
|
+ }
|
|
|
+ fool, o_msg_jyschool := pushSetMontage(o_pushset["o_msg_jyschool"], "o_msg_jyschool", powerData, ShowWx)
|
|
|
+ if fool {
|
|
|
+ pushSet["o_msg_jyschool"] = o_msg_jyschool
|
|
|
+ }
|
|
|
+ fool, o_msg_privateletter := pushSetMontage(o_pushset["o_msg_privateletter"], "o_msg_privateletter", powerData, ShowWx)
|
|
|
+ if fool {
|
|
|
+ pushSet["o_msg_privateletter"] = o_msg_privateletter
|
|
|
+ }
|
|
|
return pushSet
|
|
|
}
|
|
|
func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx bool) (bool, *bxsubscribe.PushSet) {
|
|
@@ -289,6 +309,18 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
|
} else {
|
|
|
return false, nil
|
|
|
}
|
|
|
+ case "o_msg_active", "o_msg_service", "o_msg_jyschool", "o_msg_privateletter":
|
|
|
+ if data == nil || len(*data) == 0 {
|
|
|
+ returnData = &bxsubscribe.PushSet{
|
|
|
+ IApppush: 0,
|
|
|
+ IWxpush: 0,
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ 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"])),
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
returnData.IsMailShow = isMailShow
|
|
|
return true, returnData
|