public SenderRet Send(PushChannelModel channel, PushMsgModel msg) { if (channel.SystemType == SystemTypeEnum.Android || msg.SystemType == SystemTypeEnum.Android) { return(UniCast.SendMessage(channel, msg)); } return(new SenderRet() { IsSuccess = false, Code = "-1", Msg = "华为推送通道只支持android" }); }
public static SenderRet SendMessage(PushChannelModel channel, List <PushMsgModel> msgList) { List <SenderRet> senderRetList = new List <SenderRet>(); foreach (var msg in msgList) { SenderRet ret = UniCast.SendMessage(channel, msg); ret.Id = msg.Id; senderRetList.Add(ret); } return(new SenderRet { IsSuccess = true, ResultList = senderRetList }); }