Exemplo n.º 1
0
        public ActionResult SendTemplateMsg()
        {
            var result = QueryExceptionService.QueryException();

            if (string.IsNullOrWhiteSpace(result))
            {
                result = "没有异数据";
            }
            MessageHelper.SendExpMsg(result);
            return(Json(new { code = 0, msg = result }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        private static bool QueryException()
        {
            var flag = true;

            try
            {
                var result = QueryExceptionService.QueryException();
                if (!string.IsNullOrWhiteSpace(result))
                {
                    LogHelper.Error($"发现异常数据:{result}");
                    MessageHelper.SendExpMsg(result);
                }
            }
            catch (Exception e)
            {
                LogHelper.Error("Task Exception", e);
                flag = false;
            }

            return(flag);
        }