示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string revtime = context.Request["revtime"];
            string mobile  = context.Request["mobile"];
            string linkid  = context.Request["linkid"];
            string status  = context.Request["status"];

            if (string.IsNullOrEmpty(revtime) || string.IsNullOrEmpty(mobile) || string.IsNullOrEmpty(linkid) || string.IsNullOrEmpty(status))
            {
                context.Response.Write("err");
            }
            else
            {
                try
                {
                    SMSSendResultEntity entity = new SMSSendResultEntity();
                    entity.Mtmsgid    = linkid;
                    entity.Mtstat     = status;
                    entity.Rttime     = revtime;
                    entity.CreateTime = DateTime.Now;
                    entity.IsDelete   = 0;
                    SMSSendResultBLL bll = new SMSSendResultBLL(new JIT.Utility.BasicUserInfo());
                    bll.Create(entity);
                    context.Response.Write("ok");
                }
                catch (Exception ex)
                {
                    Loggers.Exception(new ExceptionLogInfo(ex));
                    context.Response.Write(string.Format("err{0}{1}", Environment.NewLine, ex.Message));
                }
            }
        }
示例#2
0
        public void ProcessRequest(HttpContext context)
        {
            Loggers.Debug(new DebugLogInfo()
            {
                Message = "接收到请求"
            });
            context.Response.ContentType = "text/plain";
            string command    = context.Request.QueryString["command"];
            string spid       = context.Request.QueryString["spid"];
            string sppassword = context.Request.QueryString["sppassword"];
            string spsc       = context.Request.QueryString["spsc"];
            string mtmsgid    = context.Request.QueryString["mtmsgid"];
            string mtstat     = context.Request.QueryString["mtstat"];
            string mterrcode  = context.Request.QueryString["mterrcode"];
            string rttime     = context.Request.QueryString["rttime"];

            if (string.IsNullOrEmpty(command) || string.IsNullOrEmpty(spid) ||
                string.IsNullOrEmpty(mtmsgid) || string.IsNullOrEmpty(mtstat) || string.IsNullOrEmpty(mterrcode))
            {
                context.Response.Write("command=RT_RESPONSE&spid=" + spid + "&mtmsgid=" + mtmsgid + "&rtstat=ET:0101&rterrcode=100");
                return;
            }
            else
            {
                try
                {
                    SMSSendResultEntity entity = new SMSSendResultEntity();
                    entity.Command    = command;
                    entity.Spid       = spid;
                    entity.Sppassword = sppassword;
                    entity.Spsc       = spsc;
                    entity.Mtmsgid    = mtmsgid;
                    entity.Mtstat     = mtstat;
                    entity.Mterrocde  = mterrcode;
                    entity.Rttime     = rttime;
                    entity.CreateTime = DateTime.Now;
                    entity.IsDelete   = 0;
                    SMSSendResultBLL bll = new SMSSendResultBLL(new JIT.Utility.BasicUserInfo());
                    bll.Create(entity);
                    context.Response.Write("command=RT_RESPONSE&spid=" + spid + "&mtmsgid=" + mtmsgid + "&rtstat=ACCEPT&rterrcode=000");
                }
                catch (Exception ex)
                {
                    context.Response.Write("command=RT_RESPONSE&spid=" + spid + "&mtmsgid=" + mtmsgid + "&rtstat=ET:0226&rterrcode=100");
                    Loggers.Exception(new ExceptionLogInfo(ex));
                }
            }
        }