Bläddra i källkod

消息提醒设置

renjiaojiao 1 år sedan
förälder
incheckning
00beda1920

+ 2 - 0
jyBXSubscribe/rpc/internal/logic/getpushsetlogic.go

@@ -7,6 +7,7 @@ import (
 	"jyBXSubscribe/rpc/model/service"
 	"jyBXSubscribe/rpc/type/bxsubscribe"
 	"jyBXSubscribe/rpc/util"
+	"log"
 )
 
 type GetPushSetLogic struct {
@@ -36,6 +37,7 @@ func (l *GetPushSetLogic) GetPushSet(in *bxsubscribe.GetPushSetReq) (*bxsubscrib
 		PositionId:   in.PositionId,
 		MgoUserId:    in.MgoUserId,
 	}
+	log.Println("获取推送设置参数:", subService)
 	TimeData := map[int64]*bxsubscribe.TimeJson{}
 	for k, v := range util.TimeMap {
 		TimeData[int64(k)] = &bxsubscribe.TimeJson{ATimes: v}

+ 8 - 3
jyBXSubscribe/rpc/model/service/pushSet.go

@@ -317,18 +317,23 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp, ShowWx
 		}
 	case "o_msg_active", "o_msg_service", "o_msg_jyschool", "o_msg_privateletter", "o_msg_business":
 		isReturnMailShow = false
-		log.Println("data", data)
+		log.Println(name, data)
+		var isWXShow int64
+		isWXShow = 1
+		if name == "o_msg_active" {
+			isWXShow = 0
+		}
 		if data == nil || len(*data) == 0 {
 			returnData = &bxsubscribe.PushSet{
 				IApppush: 0,
 				IWxpush:  0,
-				IsWxShow: 1,
+				IsWxShow: isWXShow,
 			}
 		} else {
 			returnData = &bxsubscribe.PushSet{
 				IApppush: common.Int64All(common.If((*data)["i_apppush"] == nil, 0, (*data)["i_apppush"])),
 				IWxpush:  common.Int64All(common.If((*data)["i_wxpush"] == nil, 0, (*data)["i_wxpush"])),
-				IsWxShow: 1,
+				IsWxShow: isWXShow,
 			}
 		}
 	}