public virtual List <CodeNamePair> GetProductRecommendPosition(string pageTypeID)
        {
            int pageType         = int.Parse(pageTypeID);
            var presentationType = PageTypeUtil.ResolvePresentationType(ModuleType.ProductRecommend, pageTypeID);
            //if (presentationType == PageTypePresentationType.Brand)
            //{
            //    //当PageType为专卖店时返回空,专卖店有特殊的加载位置信息的逻辑
            //    return new List<CodeNamePair>();
            //}

            //商品推荐位置Key格式:ProductRecommend+[PageTypeID],比如ProductRecommend0代表首页的推荐位
            var positionConfigKey = ModuleType.ProductRecommend.ToString();

            //if (pageType > 100)
            //{
            //    //PageTypeID>100表示是首页domain馆
            //    positionConfigKey += "-DomainList";
            //}
            //else
            //{
            positionConfigKey += pageType.ToString();
            //}

            var result = CodeNamePairManager.GetList("MKT", positionConfigKey);

            return(result);
        }
Пример #2
0
        //从CodeNamePair配置中读取页面类型
        private List <CodeNamePair> GetPageTypeFromConfig(string companyCode, string channelID, string moduleType)
        {
            string key    = string.Format(PageType_CodeNamePair_KeyFormat, companyCode, channelID, moduleType);
            var    kvList = CodeNamePairManager.GetList("MKT", key);

            return(kvList);
        }
Пример #3
0
        public List <RMARegisterInfo> QueryByRequestSysNo(int requestSysNo)
        {
            DataCommand cmd = DataCommandManager.GetDataCommand("LoadRegisterByRequestSysNo");

            cmd.SetParameterValue("@RequestSysNo", requestSysNo);

            List <RMARegisterInfo> list = cmd.ExecuteEntityList <RMARegisterInfo>();
            var reasons = CodeNamePairManager.GetList("RMA", "RMAReason");

            list.ForEach(p =>
            {
                if (p.BasicInfo.SOItemType == SOProductType.ExtendWarranty)
                {
                    //entity.BasicInfo.ProductInfo.ProductCommonInfo.ProductBasicInfo.ProductName = GetExWarrantyProductName(requestSysNo, entity.BasicInfo.ProductSysNo.Value.ToString());
                    p.BasicInfo.ProductName = GetExWarrantyProductName(requestSysNo, p.BasicInfo.ProductSysNo.Value.ToString());
                }
                var pair = reasons.FirstOrDefault(k => k.Code == p.BasicInfo.RMAReason.ToString());
                if (pair != null && !string.IsNullOrEmpty(pair.Code))
                {
                    p.BasicInfo.RMAReasonDesc = pair.Name;
                }
            });

            return(list);
        }
Пример #4
0
        private void ConvertColumnFromRow(DataRow row, EnumColumnList enumColumns, CodeNamePairColumnList codeNamePairColunms)
        {
            if (enumColumns != null && enumColumns.Count > 0)
            {
                foreach (var entry in enumColumns)
                {
                    Type enumType = entry.EnumType;
                    if (!enumType.IsEnum)
                    {
                        throw new ArgumentException("The type '" + enumType.AssemblyQualifiedName + "' is not enum.", "enumColumns");
                    }
                    int columnIndex = entry.ColumnIndex.HasValue ? entry.ColumnIndex.Value : row.Table.Columns.IndexOf(entry.ColumnName + "_ECCentral_Auto_Removed_820319");
                    if (columnIndex < 0)
                    {
                        continue;
                    }
                    if (row[columnIndex] == null || row[columnIndex] == DBNull.Value)
                    {
                        row[entry.NewColumnIndex] = DBNull.Value;
                        continue;
                    }
                    object orignalData = row[columnIndex];
                    object tmp;
                    if (orignalData == null || orignalData == DBNull.Value || orignalData.ToString().Trim().Length <= 0)
                    {
                        row[entry.NewColumnIndex] = DBNull.Value;
                    }
                    else if (EnumCodeMapper.TryGetEnum(orignalData, enumType, out tmp))
                    {
                        row[entry.NewColumnIndex] = tmp;
                    }
                    else
                    {
                        row[entry.NewColumnIndex] = Enum.Parse(enumType, orignalData.ToString(), true);
                    }
                }
            }

            if (codeNamePairColunms != null && codeNamePairColunms.Count > 0)
            {
                foreach (var entry in codeNamePairColunms)
                {
                    int columnIndex = entry.ColumnIndex.HasValue ? entry.ColumnIndex.Value : row.Table.Columns.IndexOf(entry.ColumnName + "_ECCentral_Auto_Removed_820319");
                    if (row[columnIndex] == null || row[columnIndex] == DBNull.Value)
                    {
                        row[entry.NewColumnIndex] = DBNull.Value;
                        continue;
                    }
                    List <CodeNamePair> list = CodeNamePairManager.GetList(entry.DomainName, entry.Key);
                    string       code        = row[columnIndex].ToString();
                    CodeNamePair option      = list.Find(x => x.Code == code);
                    if (option != null)
                    {
                        row[entry.NewColumnIndex] = option.Name;
                    }
                }
            }
        }
Пример #5
0
        private List <WebPage> GetApplePage(string companyCode, string channelID, PageTypePresentationType presentationType)
        {
            string         key    = string.Format(Page_CodeNamePair_KeyFormat, companyCode, channelID, presentationType.ToString());
            var            kvList = CodeNamePairManager.GetList("MKT", key);
            List <WebPage> result = new List <WebPage>(kvList.Count);

            kvList.ForEach((kv) => result.Add(new WebPage {
                ID = int.Parse(kv.Code), PageName = kv.Name
            }));
            return(result);
        }
Пример #6
0
        /// <summary>
        /// 获取首页排行的位置
        /// </summary>
        /// <param name="companyCode">公司编号</param>
        /// <param name="channelID">渠道编号</param>
        /// <param name="pageType">页面类型</param>
        /// <returns>位置列表</returns>
        public List <CodeNamePair> GetPosition(string companyCode, string channelID, int pageType)
        {
            var kvList = CodeNamePairManager.GetList("MKT", "HotSale" + pageType.ToString());

            if (pageType == 0)
            {
                //如果页面类型是首页,还需要附加首页Domain馆
                var sections = ObjectFactory <IHomePageSectionQueryDA> .Instance.GetDomainCodeNames(companyCode, channelID);

                kvList.AddRange(sections);
            }

            return(kvList);
        }
Пример #7
0
        public virtual Dictionary <int, string> GetFloorAllPageCodeList(string companyCode, string channelID)
        {
            Dictionary <int, string> result = new Dictionary <int, string>();
            var specialPageCodeList         = CodeNamePairManager.GetList("MKT", "FloorSpecialPageCode");

            if (specialPageCodeList != null && specialPageCodeList.Count > 0)
            {
                foreach (var item in specialPageCodeList)
                {
                    result.Add(int.Parse(item.Code), item.Name);
                }
            }
            return(result);

            //return ObjectFactory<FloorAppService>.Instance.GetFloorAllPageCodeList();
        }
Пример #8
0
        private static RefundResult ProcessNetWorkRefund(SOIncomeInfo entity, SOInfo soInfo)
        {
            var           result      = new RefundResult();
            List <string> payTypeList = CodeNamePairManager.GetList("Inventory", "ChinaPayPayTypeList").Select(p => p.Code).ToList();

            if (payTypeList.Contains(soInfo.Payment.PayTypeID.ToString()))
            {
                var biz          = new IPSPayUtils();
                var refundEntity = new RefundEntity
                {
                    SOSysNo     = soInfo.SOSysNo,
                    RefundSysNo = entity.OrderSysNo.Value,
                    RefundAmt   = Math.Abs(entity.IncomeAmt.Value),
                    CompanyCode = entity.CompanyCode,
                    OrderDate   = soInfo.OrderDate.Value
                };
                refundEntity.ProductAmount = Math.Abs(entity.IncomeAmt.Value)
                                             - soInfo.Amount.ShipPrice
                                             - soInfo.TariffAmt;
                refundEntity.TaxFeeAmount      = soInfo.TariffAmt;
                refundEntity.ShippingFeeAmount = soInfo.Amount.ShipPrice;


                if (soInfo.Payment.PayTypeID >= 200 && soInfo.Payment.PayTypeID < 300)
                {
                    result = biz.Refund(refundEntity);
                }
                else
                {
                    throw new BusinessException("未实现此支付方式");
                }
            }
            else
            {
                result.Result = false;

                result.Message = ("支付方式" + soInfo.Payment.PayTypeName + "不支持网关直退。");
            }
            return(result);
        }
Пример #9
0
 /// <summary>
 /// 获得返修状态
 /// </summary>
 /// <returns></returns>
 public static List <CodeNamePair> GetRMARevertStatus()
 {
     return(CodeNamePairManager.GetList("RMA", "RMARevertStatus"));
 }
Пример #10
0
 /// <summary>
 /// 获得售后请求
 /// </summary>
 /// <returns></returns>
 public static List <CodeNamePair> GetRequests()
 {
     return(CodeNamePairManager.GetList("RMA", "Request"));
 }
Пример #11
0
 /// <summary>
 /// 获得申请理由
 /// </summary>
 /// <returns></returns>
 public static List <CodeNamePair> GetRMAReasons()
 {
     return(CodeNamePairManager.GetList("RMA", "RMAReason"));
 }
Пример #12
0
 /// <summary>
 /// 获得寄回方式
 /// </summary>
 /// <returns></returns>
 public static List <CodeNamePair> GetShipTypes()
 {
     return(CodeNamePairManager.GetList("RMA", "ShipType"));
 }
Пример #13
0
 /// <summary>
 /// 获得作废订单的原因
 /// </summary>
 /// <returns></returns>
 public static List <CodeNamePair> GetToVoidedOrderReasons()
 {
     return(CodeNamePairManager.GetList("VoidedOrderReasons", "VoidedOrderReasons"));
 }
 public List <CodeNamePair> GetInvalidReasons()
 {
     return(CodeNamePairManager.GetList("MKT", "ProductPriceCompare_InvalidReason"));
 }