瀏覽代碼

Default Changelist

WH01243 2 年之前
父節點
當前提交
bbc45f2deb
共有 1 個文件被更改,包括 27 次插入2 次删除
  1. 27 2
      jyBXSubscribe/rpc/model/service/pushSet.go

+ 27 - 2
jyBXSubscribe/rpc/model/service/pushSet.go

@@ -180,9 +180,34 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 				IsWxShow:  1,
 			}
 		}
-	case "o_entinfo", "o_newproject_forecast":
+	case "o_newproject_forecast":
 		a_times = append(a_times, "实时推送")
-		if powerData.Member.Status > 0 && (power[9] || power[12]) {
+		if powerData.Member.Status > 0 && power[9] {
+			if data == nil || len(*data) == 0 {
+				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: 1,
+					IsWxShow:  0,
+				}
+			}
+		} else {
+			return false, nil
+		}
+	case "o_entinfo":
+		a_times = append(a_times, "实时推送")
+		if powerData.Member.Status > 0 && power[12] {
 			if data == nil || len(*data) == 0 {
 				returnData = &bxsubscribe.PushSet{
 					ATimes:    a_times,