|
@@ -141,25 +141,41 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
|
|
|
returnData := &bxsubscribe.PushSet{}
|
|
|
switch name {
|
|
|
case "o_subset":
|
|
|
- if data == nil || len(*data) == 0 {
|
|
|
+ if powerData.Free.IsFree {
|
|
|
returnData = &bxsubscribe.PushSet{
|
|
|
- ATimes: util.TimeMap[2],
|
|
|
+ ATimes: []string{"每日上午、下午各推送1次"},
|
|
|
IApppush: 1,
|
|
|
- IWxpush: common.Int64All(common.If(ShowWx, 1, 0)),
|
|
|
+ IWxpush: common.Int64All(common.If((*data)["i_wxpush"] == nil, common.If(ShowWx, 1, 0), common.If(ShowWx, (*data)["i_wxpush"], 0))),
|
|
|
IMailpush: 0,
|
|
|
IRatemode: 2,
|
|
|
IsWxShow: 1,
|
|
|
}
|
|
|
} else {
|
|
|
- returnData = &bxsubscribe.PushSet{
|
|
|
- ATimes: common.If((*data)["i_ratemode"] == nil, util.TimeMap[2], a_times).([]string),
|
|
|
- IApppush: common.Int64All(common.If((*data)["i_apppush"] == nil, 1, (*data)["i_apppush"])),
|
|
|
- IWxpush: common.Int64All(common.If((*data)["i_wxpush"] == nil, common.If(ShowWx, 1, 0), common.If(ShowWx, (*data)["i_wxpush"], 0))),
|
|
|
- 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"])),
|
|
|
- IsWxShow: 1,
|
|
|
+ if data == nil || len(*data) == 0 {
|
|
|
+ returnData = &bxsubscribe.PushSet{
|
|
|
+ ATimes: util.TimeMap[2],
|
|
|
+ IApppush: 1,
|
|
|
+ IWxpush: common.Int64All(common.If(ShowWx, 1, 0)),
|
|
|
+ IMailpush: 0,
|
|
|
+ IRatemode: 2,
|
|
|
+ IsWxShow: 1,
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ returnData = &bxsubscribe.PushSet{
|
|
|
+ ATimes: common.If((*data)["i_ratemode"] == nil, util.TimeMap[2], a_times).([]string),
|
|
|
+ IApppush: common.Int64All(common.If((*data)["i_apppush"] == nil, 1, (*data)["i_apppush"])),
|
|
|
+ IWxpush: common.Int64All(common.If((*data)["i_wxpush"] == nil, common.If(ShowWx, 1, 0), common.If(ShowWx, (*data)["i_wxpush"], 0))),
|
|
|
+ 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"])),
|
|
|
+ IsWxShow: 1,
|
|
|
+ }
|
|
|
+ if common.Int64All((*data)["i_ratemode"]) == 5 {
|
|
|
+ returnData.ATimes = []string{"14:00"}
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
case "o_follow_project", "o_follow_ent":
|
|
|
a_times = append(a_times, "实时推送")
|
|
|
if data == nil || len(*data) == 0 {
|