/// <summary> /// 发送个推信息【按用户列表进行发送】【可批量,支持IOS和安卓 批量与单个用户,通知与传透】 /// 程序可自动判定这些用户是否有推送设置,如果有才会提交推送平台进行发送 /// </summary> /// <param name="condtion"></param> /// <returns></returns> public ReplayBase SendGTuiPushByUsersList(SendGeTuiPushByUsersIdRequestModel condtion) { condtion.createdBy = User.Identity.Name; ReplayBase result = PushService.SendGTuiPushByUsersList(condtion); return(result); }
/// <summary> /// 发送个推信息【按用户列表进行发送】【可批量,支持IOS和安卓 批量与单个用户,通知与传透】 /// 程序可自动判定这些用户是否有推送设置,如果有才会提交推送平台进行发送 /// </summary> /// <param name="condtion"></param> /// <returns></returns> internal static ReplayBase SendGTuiPushByUsersList(SendGeTuiPushByUsersIdRequestModel condtion) { ReplayBase result = new ReplayBase(); SendGeTuiPushBySetRequestModel q = new SendGeTuiPushBySetRequestModel() { createdBy = condtion.createdBy, customInfo = condtion.customInfo, messageType = condtion.messageType, msg = condtion.msg, title = condtion.title }; if (condtion.userIds.Count > 0) { //获取用户列表 List <MembersBaseInfoModel> userlist = MembersService.GetMembersList(new GetMembersListRequstModel() { userIds = condtion.userIds }); foreach (MembersBaseInfoModel user in userlist) { if (user.getuiPushSet != null) { q.pushSets.Add(new GeTuiSetModel() { clientId = user.getuiPushSet.clientId, deviceType = (EnumUserDeviceType)user.getuiPushSet.deviceType, userId = user.UserId }); } } if (q.pushSets.Count > 0) { result = SendGTuiPushByPusSets(q); } else { result.ReturnCode = EnumErrorCode.EmptyDate; result.ReturnMessage = "设置的接收者中均无推送接收配置,无法进行推送"; } } else { result.ReturnCode = EnumErrorCode.EmptyDate; result.ReturnMessage = "请至少传入一条接收者的推送设置"; } return(result); }