예제 #1
0
        /// <summary>
        /// 发送企业消息
        /// </summary>
        /// <param name="messageid"></param>
        /// <param name="mediaid"></param>
        /// <param name="lcId"></param>
        /// <param name="msgtype"></param>
        /// <param name="toUser"></param>
        /// <param name="toParty"></param>
        /// <param name="toTag"></param>
        /// <param name="agentId"></param>
        /// <returns></returns>
        public ActionResult QYMsSend(string messageid, string keyW, string msgtype, string agentId, string toUser = "******", string toParty = "@all", string toTag = "@all", int safe = 0)
        {
            var pService = new WeChatMessageService("QY");

            pService.SendQYMessage(messageid, UserID, keyW, msgtype, toUser, toParty, toTag, agentId, safe);
            EGExceptionResult pResult = pService.GetActionResult();

            //
            if (pResult != null)
            {
                return(Json(pResult));
            }
            pResult = new EGExceptionResult(true, "", "");
            return(Json(pResult));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult TestSend()
        {
            var pService = new WeChatMessageService("QY");

            pService.SendQYMessage("", "", "1", "", "", "", "", "");
            EGExceptionResult pResult = pService.GetActionResult();

            //
            if (pResult != null)
            {
                return(Json(pResult));
            }
            pResult = new EGExceptionResult(true, "", "");
            return(Json(pResult));
        }