Esempio n. 1
0
        /// <summary>
        /// 选中发送微信消息
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="msgtype"></param>
        /// <param name="mediaid"></param>
        /// <param name="msgcontent"></param>
        /// <returns></returns>
        public JsonResult SendWXGroupMessage(string ids, string msgtype, string mediaid = "", string msgcontent = "")
        {
            var userIds = string.IsNullOrWhiteSpace(ids) ? null : ids.Split(',').Select(s => long.Parse(s)).ToArray();

            if (userIds == null || userIds.Length == 0)
            {
                throw new MallException("请选择发送对象!");
            }

            MemberApplication.SendWeiMessageByUserIds(userIds, msgtype, mediaid, msgcontent);

            return(Json(new { success = true, msg = "发送成功!" }));
        }