//DPBMARK_FILE MP using Senparc.Weixin.Entities.TemplateMessage; using Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage; using System; namespace Znyc.Recruitment.Admin.WeChat.CommonService.TemplateMessage { /* {{first.DATA}} Time:{{keyword1.DATA}} Host:{{keyword2.DATA}} Service:{{keyword3.DATA}} Status:{{keyword4.DATA}} Message:{{keyword5.DATA}} {{remark.DATA}} */ public class WeixinTemplate_ExceptionAlert : TemplateMessageBase { private const string TEMPLATE_ID = "ur6TqESOo-32FEUk4qJxeWZZVt4KEOPjqbAFDGWw6gg"; //每个公众号都不同,需要根据实际情况修改 public WeixinTemplate_ExceptionAlert(string _first, string host, string service, string status, string message, string _remark, string url = null, string templateId = TEMPLATE_ID) : base(templateId, url, "系统异常告警通知") { first = new TemplateDataItem(_first); keyword1 = new TemplateDataItem(SystemTime.Now.LocalDateTime.ToString()); keyword2 = new TemplateDataItem(host); keyword3 = new TemplateDataItem(service); keyword4 = new TemplateDataItem(status); keyword5 = new TemplateDataItem(message); remark = new TemplateDataItem(_remark); } public TemplateDataItem first { get; set; } /// /// Time /// public TemplateDataItem keyword1 { get; set; } /// /// Host /// public TemplateDataItem keyword2 { get; set; } /// /// Service /// public TemplateDataItem keyword3 { get; set; } /// /// Status /// public TemplateDataItem keyword4 { get; set; } /// /// Message /// public TemplateDataItem keyword5 { get; set; } public TemplateDataItem remark { get; set; } } }