Bläddra i källkod

Merge branch 'master' into feature/v1.1.40

lianbingjie 1 år sedan
förälder
incheckning
6e309334ed
1 ändrade filer med 18 tillägg och 9 borttagningar
  1. 18 9
      jyBXSubscribe/rpc/model/service/pushSet.go

+ 18 - 9
jyBXSubscribe/rpc/model/service/pushSet.go

@@ -224,8 +224,17 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 		}
 
 	case "o_follow_project", "o_follow_ent":
-		a_times = append(a_times, "实时推送")
-		if data == nil || len(*data) == 0 {
+		if powerData.Free.IsFree {
+			returnData = &bxsubscribe.PushSet{
+				ATimes:    []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: 1,
+				IsWxShow:  1,
+			}
+		} else if data == nil || len(*data) == 0 {
+			a_times = append(a_times, "实时推送")
 			returnData = &bxsubscribe.PushSet{
 				ATimes:    a_times,
 				IApppush:  1,
@@ -240,14 +249,14 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 				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: 1,
+				IRatemode: common.Int64All(common.If((*data)["i_ratemode"] == nil, 1, (*data)["i_ratemode"])),
 				IsWxShow:  1,
 			}
 		}
 	case "o_newproject_forecast":
-		a_times = append(a_times, "实时推送")
 		if powerData.Member.Status > 0 && power[9] {
 			if data == nil || len(*data) == 0 {
+				a_times = append(a_times, "实时推送")
 				returnData = &bxsubscribe.PushSet{
 					ATimes:    a_times,
 					IApppush:  1,
@@ -262,7 +271,7 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 					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: 1,
+					IRatemode: common.Int64All(common.If((*data)["i_ratemode"] == nil, 1, (*data)["i_ratemode"])),
 					IsWxShow:  0,
 				}
 			}
@@ -270,9 +279,9 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 			return false, nil
 		}
 	case "o_entinfo":
-		a_times = append(a_times, "实时推送")
 		if powerData.Member.Status > 0 && power[12] {
 			if data == nil || len(*data) == 0 {
+				a_times = append(a_times, "实时推送")
 				returnData = &bxsubscribe.PushSet{
 					ATimes:    a_times,
 					IApppush:  1,
@@ -287,7 +296,7 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 					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: 1,
+					IRatemode: common.Int64All(common.If((*data)["i_ratemode"] == nil, 1, (*data)["i_ratemode"])),
 					IsWxShow:  0,
 				}
 			}
@@ -297,9 +306,9 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 	case "o_week_report", "o_month_report":
 		if powerData.Vip.Status > 0 || power[10] {
 			if name == "o_week_report" {
-				a_times = append(a_times, "每周推送 (周五 09:00)")
+				a_times = append(a_times, "每周推送 (周一 08:00)")
 			} else {
-				a_times = append(a_times, "每月推送 (28日 09:00)")
+				a_times = append(a_times, "每月推送 (1日 08:00)")
 			}
 			IsWxShow := int64(0)
 			if powerData.Vip.Status > 0 {