public string GetCustomerBasicSetting(string pRequest) { CustomerBasicSettingRD rd = new CustomerBasicSettingRD(); try { var rp = pRequest.DeserializeJSONTo <APIRequest <EmptyRequestParameter> >(); var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, "1"); var bll = new CustomerBasicSettingBLL(loggingSessionInfo); var ds = bll.GetCustomerBaiscSettingInfo(rp.CustomerID); //获取CusertomerBaiscSettingInfo中配置的数据 var dtBasicSetting = bll.GetBaiscSettingInfoFromRedis(rp.CustomerID); List <CustomerImageInfo> list = new List <CustomerImageInfo> { }; Dictionary <string, string> DicVersion = new Dictionary <string, string>(); if (ds != null && ds.Tables.Count > 0) { if (dtBasicSetting.Rows.Count > 0) { for (int i = 0; i < dtBasicSetting.Rows.Count; i++) { DataRow row = dtBasicSetting.Rows[i]; if (row["SettingCode"].ToString().Equals("AboutUs")) { rd.AboutUs = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("BrandRelated")) { rd.BrandRelated = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("BrandStory")) { rd.BrandStory = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("IntegralAmountPer")) { rd.IntegralAmountPer = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("SMSSign")) { rd.SMSSign = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("ForwardingMessageLogo")) { rd.ForwardingMessageLogo = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("ForwardingMessageTitle")) { rd.ForwardingMessageTitle = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("ForwardingMessageSummary")) { rd.ForwardingMessageSummary = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("WhatCommonPoints")) { rd.WhatCommonPoints = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("GetPoints")) { rd.GetPoints = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } if (row["SettingCode"].ToString().Equals("SetSalesPoints")) { rd.SetSalesPoints = DicVersion[row["SettingCode"].ToString()] = row["SettingValue"].ToString(); } } } if (ds.Tables[1].Rows.Count > 0) { foreach (DataRow item in ds.Tables[1].Rows) { var ImageList = new CustomerImageInfo() { ImageId = item["ImageId"].ToString(), ImageUrl = item["ImageUrl"].ToString() }; list.Add(ImageList); } } rd.ImageList = list.ToArray(); //图片集合 } var rsp = new SuccessResponse <IAPIResponseData>(rd); return(rsp.ToJSON()); } catch (Exception ex) { throw new APIException(ex.Message); } }