wangshan 1 жил өмнө
parent
commit
150e7e0f4a

+ 32 - 0
jyBXSubscribe/rpc/model/service/pushSet.go

@@ -130,6 +130,11 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
 	if fool {
 		pushSet["o_follow_project"] = o_follow_project
 	}
+	//业主监控 P303
+	fool, o_owner_monitor := pushSetMontage(o_pushset["o_owner_monitor"], "o_owner_monitor", powerData, ShowWx)
+	if fool {
+		pushSet["o_owner_monitor"] = o_owner_monitor
+	}
 	//企业关注
 	fool, o_follow_ent := pushSetMontage(o_pushset["o_follow_ent"], "o_follow_ent", powerData, ShowWx)
 	if fool {
@@ -278,6 +283,33 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 		} else {
 			return false, nil
 		}
+	case "o_owner_monitor":
+		//付费用户
+		powerData.Free.IsFree = false
+		if !powerData.Free.IsFree {
+			if data == nil || len(*data) == 0 {
+				a_times = append(a_times, "实时推送")
+				returnData = &bxsubscribe.PushSet{
+					ATimes:    a_times,
+					IApppush:  1,
+					IWxpush:   common.Int64All(common.If(ShowWx, 1, 0)),
+					IMailpush: 0,
+					IRatemode: 1,
+					IsWxShow:  0,
+				}
+			} else {
+				returnData = &bxsubscribe.PushSet{
+					ATimes:    a_times,
+					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, 1, (*data)["i_ratemode"])),
+					IsWxShow:  0,
+				}
+			}
+		} else {
+			return false, nil
+		}
 	case "o_entinfo":
 		if powerData.Member.Status > 0 && power[12] {
 			if data == nil || len(*data) == 0 {