Beispiel #1
0
        /// <summary>
        /// 从模板生成发送批次并自动发送
        /// </summary>
        /// <param name="id"></param>
        /// <param name="eventName"></param>
        /// <param name="specModel"></param>
        /// <param name="accid"></param>
        /// <param name="uid"></param>
        /// <param name="uName"></param>
        /// <returns></returns>
        public static int SendNotifyMsg(int id, string eventName, string specModel, int accid, int uid, string uName)
        {
            //获取模板
            TriggerTemplateModel tModel = MessageTemplateBLL.GetModelById(id);

            try
            {
                //拆解模板并生成批次
                string batchId = GenerateBatchByTemplate(tModel, accid, eventName, specModel, id);
                MessageSysControl.SendMsgAuto(batchId, uid, uName);
                return(1);
            }
            catch (Exception ex)
            {
                Logger.Error("获取前台消息发送信息出错!", ex);
                return(0);
            }
        }