Esempio n. 1
0
 public ActionResult SendPushByPartnersID(string PartnersID, string Title, string Content)
 {
     try
     {
         string appid = CheckAPPID();
         JPushClientHelper.SendPush(appid, PartnersID, Title, Content, PushTarget.Partners);
         return(Success("推送成功!"));
     }
     catch (Exception ex)
     {
         return(FailException(ex));
     }
 }
        public void PushObject_All_All_Alert(string ALERT, string TITLE, string MSG_CONTENT, int plaform = 0)
        {
            try
            {
                UserInfo userInfo = LoginUserInfo.Get();

                dm_basesettingEntity dm_BasesettingEntity = dM_BaseSettingIBLL.GetEntityByCache(userInfo.companyId);

                JPushClient client = new JPushClient(dm_BasesettingEntity.jg_appkey, dm_BasesettingEntity.jg_appsecret);

                PushPayload pushPayload = JPushClientHelper.PushObject_All_All_Alert(ALERT, plaform);

                client.SendPush(pushPayload);
            }
            catch (System.Exception ex)
            {
                throw;
            }
        }