示例#1
0
        /// <summary>
        /// customerinfo赋值
        /// </summary>
        /// <returns></returns>
        private CustomerLoadInfo GetCustomerLoadInfo()
        {
            var customerBasicSettingBLL = new CustomerBasicSettingBLL(this.CurrentUserInfo);
            CustomerLoadInfo custome    = new CustomerLoadInfo()
            {
                customerID   = this.CurrentUserInfo.ClientID,
                customerName = this.CurrentUserInfo.ClientName
            };
            DataRow dr = customerBasicSettingBLL.GetCustomerInfo(CurrentUserInfo.ClientID).Tables[0].Rows[0];

            custome.customerCode = dr["customer_code"].ToString();

            //商户简称
            var ShortNameData = customerBasicSettingBLL.QueryByEntity(new CustomerBasicSettingEntity()
            {
                CustomerID = this.CurrentUserInfo.ClientID, SettingCode = "CustomerShortName"
            }, null).FirstOrDefault();

            if (ShortNameData == null)
            {
                custome.customerName = dr["customer_name"].ToString();
            }
            else
            {
                custome.customerName = ShortNameData.SettingValue;
            }
            //商户Logo
            var Data = customerBasicSettingBLL.QueryByEntity(new CustomerBasicSettingEntity()
            {
                CustomerID = this.CurrentUserInfo.ClientID, SettingCode = "WebLogo"
            }, null).FirstOrDefault();

            custome.BusinessLogo = Data == null ? "" : Data.SettingValue;
            return(custome);
        }
        protected override GetBusinessBasisConfigInfoRD ProcessRequest(DTO.Base.APIRequest <GetBusinessBasisConfigInfoRP> pRequest)
        {
            var rd   = new GetBusinessBasisConfigInfoRD();
            var para = pRequest.Parameters;
            var loggingSessionInfo      = new SessionManager().CurrentUserLoginInfo;
            var customerBasicSettingBLL = new CustomerBasicSettingBLL(loggingSessionInfo);

            #region 商户基础信息
            DataRow dr = customerBasicSettingBLL.GetCustomerInfo(loggingSessionInfo.ClientID).Tables[0].Rows[0];
            rd.customer_name = dr["customer_name"].ToString();//商户全称
            //
            var ResultList = customerBasicSettingBLL.GetBusinessBasisConfigInfo(loggingSessionInfo.ClientID);
            //var Data1 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("BusinessLogo"));
            var Data = ResultList.FirstOrDefault(m => m.SettingCode.Equals("CustomerShortName"));
            rd.CustomerShortName = Data == null ? "" : Data.SettingValue; //商户简称
            var Data1 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("WebLogo"));
            rd.WebLogo = Data1 == null ? "" : Data1.SettingValue;         //商户Logo
            var Data2 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("CustomerPhone"));
            rd.CustomerPhone = Data2 == null ? "" : Data2.SettingValue;   //客户电话
            //var Data3 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ShareTitle"));
            var Data3 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ForwardingMessageTitle"));
            rd.ForwardingMessageTitle = Data3 == null ? "" : Data3.SettingValue;//分享标题
            //var Data4 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ShareImageUrl"));
            var Data4 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ForwardingMessageLogo"));
            rd.ForwardingMessageLogo = Data4 == null ? "" : Data4.SettingValue;//分享图片
            //var Data5 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ShareContent"));
            var Data5 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("ForwardingMessageSummary"));
            rd.ForwardingMessageSummary = Data5 == null ? "" : Data5.SettingValue; //分享摘要内容
            var Data6 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("GuideLinkUrl"));
            rd.GuideLinkUrl = Data6 == null ? "" : Data6.SettingValue;             //引导链接
            var Data7 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("GuideQRCode"));
            rd.GuideQRCode = Data7 == null ? "" : Data7.SettingValue;              //引导二维码
            var Data8 = ResultList.FirstOrDefault(m => m.SettingCode.Equals("CustomerGreeting"));
            rd.CustomerGreeting = Data8 == null ? "" : Data8.SettingValue;         //欢迎去

            #endregion

            return(rd);
        }