예제 #1
0
        public StringResponse Get(long ownerId, string name, string defaultValue)
        {
            try
            {
                //卖家只能读取自身的配置项
                ownerId = ServiceContainer.GetSellerId(ownerId);
                var sc = Find(ownerId, name);
                if (sc != null)
                {
                    return(new StringResponse {
                        data = sc.Value
                    });
                }

                return(new StringResponse {
                    data = defaultValue
                });
            }
            catch (Exception ex)
            {
                throw new WebFaultException <ResponseBase>(new ResponseBase(ex.Message), System.Net.HttpStatusCode.OK);
            }
        }