示例#1
0
        public ResultObj <List <WebSettingModel> > GetData(string clientId = "")
        {
            WebSettingModel webSettingInfo = new WebSettingModel();

            webSettingInfo.ClientId = clientId;
            List <WebSettingModel> lstWebSetting = _IBase.GetAll(webSettingInfo);

            if (lstWebSetting.Count > 0)
            {
                lstWebSetting[0].StaticUrl = ConfigHandler.ResourceUrl;
            }
            return(Content(lstWebSetting));
        }
示例#2
0
        public ResultObj <int> CreateWebInfo([FromBody] WebSettingModel webSettingInfo)
        {
            int count  = _IBase.GetCount(webSettingInfo);
            int result = 0;

            if (count > 0)
            {
                result = _IBase.UpdateData(webSettingInfo);
            }
            else
            {
                result = _IBase.PostData(webSettingInfo);
            }

            return(Content(result));
        }
示例#3
0
        public ResultObj <WebSettingModel> GetWechatSetting(string clientId = "")
        {
            if (string.IsNullOrEmpty(clientId))
            {
                return(null);
            }
            IBase <WebSettingModel> iwebSetting    = new WebSettingService();
            WebSettingModel         webSettingInfo = new WebSettingModel();

            webSettingInfo.ClientId = clientId;
            List <WebSettingModel> lstWebSetting = iwebSetting.GetAll(webSettingInfo);

            if (lstWebSetting.Count > 0)
            {
                lstWebSetting[0].StaticUrl = ConfigHandler.ResourceUrl;
            }
            return(Content(lstWebSetting[0]));
        }