Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            string getAddressId = context.Request["id"];

            if (string.IsNullOrEmpty(getAddressId))
            {
                resp.code = (int)APIErrCode.PrimaryKeyIncomplete;
                resp.msg  = "id 参数必传";
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            var model = bllMall.GetGetAddress(getAddressId);

            if (model != null)
            {
                resp.status = true;
                resp.msg    = "ok";
                resp.result = new
                {
                    id         = model.GetAddressId,
                    name       = model.GetAddressName,
                    address    = model.GetAddressLocation,
                    is_disable = model.IsDisable,
                    imgurl     = model.ImgUrl
                };
            }
            else
            {
                resp.code = (int)APIErrCode.OperateFail;
                resp.msg  = "自提点不存在";
            }
            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
        }