|
@@ -24,9 +24,16 @@ func (this *PushSetService) Update(item, setType, pushType string, ratemode, pus
|
|
set := map[string]interface{}{}
|
|
set := map[string]interface{}{}
|
|
switch setType {
|
|
switch setType {
|
|
case "pushRoute":
|
|
case "pushRoute":
|
|
- set = map[string]interface{}{
|
|
|
|
- fmt.Sprintf("o_pushset.%s.%s", item, pushType): common.IntAll(pushValue),
|
|
|
|
|
|
+ if pushType == "i_nomsgtip" {
|
|
|
|
+ set = map[string]interface{}{
|
|
|
|
+ fmt.Sprintf("o_pushset.%s", pushType): common.IntAll(pushValue),
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ set = map[string]interface{}{
|
|
|
|
+ fmt.Sprintf("o_pushset.%s.%s", item, pushType): common.IntAll(pushValue),
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
break
|
|
break
|
|
case "a_times":
|
|
case "a_times":
|
|
if ratemode == 2 {
|
|
if ratemode == 2 {
|
|
@@ -97,8 +104,10 @@ 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)
|
|
if fool {
|
|
if fool {
|
|
|
|
+ o_subset.INomsgtip = common.Int64All(common.If(o_pushset["i_nomsgtip"] == nil, 1, o_pushset["i_nomsgtip"]))
|
|
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)
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_week_report"] = o_week_report
|
|
pushSet["o_week_report"] = o_week_report
|
|
@@ -123,6 +132,7 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
|
|
if fool {
|
|
if fool {
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
pushSet["o_follow_ent"] = o_follow_ent
|
|
}
|
|
}
|
|
|
|
+
|
|
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) (bool, *bxsubscribe.PushSet) {
|
|
@@ -149,7 +159,6 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
IMailpush: common.Int64All(common.If((*data)["i_mailpush"] == nil, 0, (*data)["i_mailpush"])),
|
|
IMailpush: common.Int64All(common.If((*data)["i_mailpush"] == nil, 0, (*data)["i_mailpush"])),
|
|
IRatemode: 2,
|
|
IRatemode: 2,
|
|
IsWxShow: 1,
|
|
IsWxShow: 1,
|
|
- INomsgtip: common.Int64All(common.If((*data)["i_nomsgtip"] == nil, 1, (*data)["i_nomsgtip"])),
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if data == nil || len(*data) == 0 {
|
|
if data == nil || len(*data) == 0 {
|
|
@@ -160,7 +169,6 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
IMailpush: 0,
|
|
IMailpush: 0,
|
|
IRatemode: 2,
|
|
IRatemode: 2,
|
|
IsWxShow: 1,
|
|
IsWxShow: 1,
|
|
- INomsgtip: 1,
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
returnData = &bxsubscribe.PushSet{
|
|
returnData = &bxsubscribe.PushSet{
|
|
@@ -170,7 +178,6 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
IMailpush: common.Int64All(common.If((*data)["i_mailpush"] == nil, 0, (*data)["i_mailpush"])),
|
|
IMailpush: common.Int64All(common.If((*data)["i_mailpush"] == nil, 0, (*data)["i_mailpush"])),
|
|
IRatemode: common.Int64All(common.If((*data)["i_ratemode"] == nil, 2, (*data)["i_ratemode"])),
|
|
IRatemode: common.Int64All(common.If((*data)["i_ratemode"] == nil, 2, (*data)["i_ratemode"])),
|
|
IsWxShow: 1,
|
|
IsWxShow: 1,
|
|
- INomsgtip: common.Int64All(common.If((*data)["i_nomsgtip"] == nil, 1, (*data)["i_nomsgtip"])),
|
|
|
|
}
|
|
}
|
|
if common.Int64All((*data)["i_ratemode"]) == 5 {
|
|
if common.Int64All((*data)["i_ratemode"]) == 5 {
|
|
returnData.ATimes = []string{"14:00"}
|
|
returnData.ATimes = []string{"14:00"}
|