Esempio n. 1
0
        public bool Init(LightDataModel.tbl_moItem mo)
        {
            if (orderInfo != null)
            {
                return(SetSuccess());
            }
            if (trone == null)
            {
                SetErrorMesage("通道信息不能为空");
            }
            orderInfo            = new LightDataModel.tbl_api_orderItem();
            spTrone              = LightDataModel.tbl_sp_troneItem.GetRowById(dBase, trone.sp_trone_id);
            orderInfo.api_id     = spTrone.trone_api_id;
            orderInfo.trone_id   = trone.id;
            orderInfo.port       = mo.ori_trone;
            orderInfo.msg        = mo.ori_order;
            orderInfo.sp_linkid  = mo.linkid;
            orderInfo.mobile     = mo.mobile;
            orderInfo.FirstDate  = DateTime.Now;
            orderInfo.api_exdata = mo.cp_param;
            orderInfo.ip         = mo.ip;
            orderInfo.clientip   = "127.0.0.1";
            orderInfo.city       = mo.city_id;
            province             = mo.province_id;

            if (troneOrder != null)
            {
                orderInfo.trone_order_id = troneOrder.id;
            }

            return(SetSuccess());
        }
Esempio n. 2
0
        public override void BeginProcess()
        {
            var phone      = Request["phone"];
            var msgContent = Request["msgContent"];
            var spNumber   = Request["spNumber"];
            var linkid     = Request["linkid"];
            var serviceup  = Request["serviceup"];

            Shotgun.Library.SimpleLogRecord.WriteLog("sms2web", Request.Url.Query);
            if (string.IsNullOrEmpty(phone))
            {
                return;
            }

            this._mo          = new LightDataModel.tbl_moItem();
            _mo.ip            = Request.UserHostAddress;
            _mo.sp_api_url_id = 0;
            _mo.sp_id         = 0;
            _mo.linkid        = linkid;
            _mo.mobile        = phone;
            _mo.ori_order     = msgContent;
            _mo.ori_trone     = spNumber;
            _mo.service_code  = serviceup;

            _mo.create_date = DateTime.Now;
            _mo.mo_date     = _mo.create_date.Date;
            dBase.SaveData(_mo);

            //htPaycode*#imsi#imei#ip#iccid#package
            var cmd = msgContent.Split(new char[] { ',' });

            if (cmd[0].StartsWith("@"))
            {
                DoRequest(cmd);
            }
            else
            {
                DoBack(cmd);
            }
        }
Esempio n. 3
0
 public MoToISMS(LightDataModel.tbl_moItem mo)
 {
     this._mo = mo;
 }