Ejemplo n.º 1
0
        public void Start()
        {
            EnumCodeMapper.AddMap <FeatureType>(new Dictionary <FeatureType, string> {
                { FeatureType.New, "N" },
                { FeatureType.Hot, "H" }
            });

            EnumCodeMapper.AddMap <GroupBuyingStatus>(new Dictionary <GroupBuyingStatus, string> {
                { GroupBuyingStatus.Init, "O" },
                { GroupBuyingStatus.WaitingAudit, "W" },
                { GroupBuyingStatus.VerifyFaild, "N" },
                { GroupBuyingStatus.Pending, "P" },
                { GroupBuyingStatus.WaitHandling, "R" },
                { GroupBuyingStatus.Active, "A" },
                { GroupBuyingStatus.Deactive, "D" },
                { GroupBuyingStatus.Finished, "F" }
            });
            EnumCodeMapper.AddMap <CountdownStatus>(new Dictionary <CountdownStatus, int> {
                { CountdownStatus.Abandon, -1 },
                { CountdownStatus.WaitForVerify, -3 },
                { CountdownStatus.VerifyFaild, -4 },
                { CountdownStatus.Ready, 0 },
                { CountdownStatus.Running, 1 },
                { CountdownStatus.Finish, 2 },
                { CountdownStatus.Interupt, -2 },
                { CountdownStatus.Init, -5 }
            });
            EnumCodeMapper.AddMap <ADStatus>(new Dictionary <ADStatus, string> {
                { ADStatus.Deactive, "D" },
                { ADStatus.Active, "A" }
            });
            EnumCodeMapper.AddMap <IsDefaultStatus>(new Dictionary <IsDefaultStatus, string> {
                { IsDefaultStatus.Deactive, "D" },
                { IsDefaultStatus.Active, "A" }
            });
            EnumCodeMapper.AddMap <ADTStatus>(new Dictionary <ADTStatus, string> {
                { ADTStatus.Deactive, "D" },
                { ADTStatus.Active, "A" },
                { ADTStatus.Test, "T" }
            });

            EnumCodeMapper.AddMap <RemarksType>(new Dictionary <RemarksType, string> {
                { RemarksType.Promotion, "R" },
                { RemarksType.Comment, "P" },
                { RemarksType.Discuss, "D" },
                { RemarksType.Consult, "C" }
            });

            EnumCodeMapper.AddMap <RemarkTypeShow>(new Dictionary <RemarkTypeShow, int> {
                { RemarkTypeShow.Auto, 0 },
                { RemarkTypeShow.Manual, -1 }
            });

            EnumCodeMapper.AddMap <YNStatus>(new Dictionary <YNStatus, string> {
                { YNStatus.No, "N" },
                { YNStatus.Yes, "Y" }
            });
            EnumCodeMapper.AddMap <IsDefaultShow>(new Dictionary <IsDefaultShow, string> {
                { IsDefaultShow.Show, "Y" },
                { IsDefaultShow.Hide, "N" }
            });
            EnumCodeMapper.AddMap <GroupBuyingStatusForNeweggg>(new Dictionary <GroupBuyingStatusForNeweggg, string> {
                { GroupBuyingStatusForNeweggg.WaitingAudit, "O" },
                { GroupBuyingStatusForNeweggg.Pending, "P" },
                { GroupBuyingStatusForNeweggg.Active, "A" },
                { GroupBuyingStatusForNeweggg.Finished, "F" },
                { GroupBuyingStatusForNeweggg.Deactive, "D" },
            });



            EnumCodeMapper.AddMap <BannerType>(new Dictionary <BannerType, string> {
                { BannerType.Image, "I" },
                { BannerType.Flash, "F" },
                { BannerType.HTML, "H" },
                { BannerType.Text, "T" },
                { BannerType.Video, "V" }
            });

            EnumCodeMapper.AddMap <ModuleType>(new Dictionary <ModuleType, int> {
                { ModuleType.Banner, 0 },
                { ModuleType.SEO, 1 },
                { ModuleType.ProductRecommend, 2 },
                { ModuleType.HotSale, 3 },
                { ModuleType.Poll, 4 },
                { ModuleType.HotKeywords, 5 },
                { ModuleType.DefaultKeywords, 6 }
            });

            EnumCodeMapper.AddMap <CouponsMKTType>(new Dictionary <CouponsMKTType, string>
            {
                { CouponsMKTType.MKTAFC, "F" },
                { CouponsMKTType.MKTAmbassador, "A" },
                { CouponsMKTType.MKTBD, "B" },
                { CouponsMKTType.MKTCS, "C" },
                { CouponsMKTType.MKTEmail, "M" },
                { CouponsMKTType.MKTInternal, "N" },
                { CouponsMKTType.MKTNetworkAlliance, "W" },
                { CouponsMKTType.MKTOffline, "L" },
                { CouponsMKTType.MKTOnline, "O" },
                { CouponsMKTType.MKTPM, "P" },
                { CouponsMKTType.MKTPlace, "S" }
            });

            EnumCodeMapper.AddMap <CouponsStatus>(new Dictionary <CouponsStatus, string>
            {
                { CouponsStatus.Finish, "F" },
                { CouponsStatus.Init, "O" },
                { CouponsStatus.Ready, "R" },
                { CouponsStatus.Run, "A" },
                { CouponsStatus.Void, "D" },
                { CouponsStatus.WaitingAudit, "W" },
                { CouponsStatus.Stoped, "S" }
            });

            EnumCodeMapper.AddMap <OpenAPIStatus>(new Dictionary <OpenAPIStatus, string>
            {
                { OpenAPIStatus.Active, "A" },
                { OpenAPIStatus.Deactive, "D" }
            });

            //公告及促销评论状态
            EnumCodeMapper.AddMap <NewsAdvReplyStatus>(new Dictionary <NewsAdvReplyStatus, int>
            {
                { NewsAdvReplyStatus.Show, 0 },
                { NewsAdvReplyStatus.SystemHide, -1 },
                { NewsAdvReplyStatus.HandHide, -2 }
            });

            EnumCodeMapper.AddMap <CouponsProductRangeType>(new Dictionary <CouponsProductRangeType, string>
            {
                { CouponsProductRangeType.AllProducts, "A" },
                { CouponsProductRangeType.LimitCategoryBrand, "X" },
                { CouponsProductRangeType.LimitProduct, "I" }
            });

            EnumCodeMapper.AddMap <CouponsBindConditionType>(new Dictionary <CouponsBindConditionType, string>
            {
                { CouponsBindConditionType.None, "A" },
                { CouponsBindConditionType.Rigester, "R" },
                { CouponsBindConditionType.Birthday, "B" },
                { CouponsBindConditionType.SO, "O" },
                { CouponsBindConditionType.Get, "L" }
                //{CouponsBindConditionType.Alipay,"Z"}
            });
            EnumCodeMapper.AddMap <CouponsValidPeriodType>(new Dictionary <CouponsValidPeriodType, int>
            {
                { CouponsValidPeriodType.All, 0 },
                { CouponsValidPeriodType.PublishDayToOneWeek, 1 },
                { CouponsValidPeriodType.PublishDayToOneMonth, 2 },
                { CouponsValidPeriodType.PublishDayToTwoMonths, 3 },
                { CouponsValidPeriodType.PublishDayToThreeMonths, 4 },
                { CouponsValidPeriodType.PublishDayToSixMonths, 5 },
                { CouponsValidPeriodType.CustomPeriod, 6 }
            });


            EnumCodeMapper.AddMap <CouponsRuleType>(new Dictionary <CouponsRuleType, string>
            {
                { CouponsRuleType.ProductDiscount, "D" }
            });

            EnumCodeMapper.AddMap <CouponCodeType>(new Dictionary <CouponCodeType, string>
            {
                { CouponCodeType.Common, "C" },
                { CouponCodeType.ThrowIn, "T" }
            });

            EnumCodeMapper.AddMap <CouponCodeUsedStatus>(new Dictionary <CouponCodeUsedStatus, string>
            {
                { CouponCodeUsedStatus.Active, "A" },
                { CouponCodeUsedStatus.Deactive, "D" }
            });

            EnumCodeMapper.AddMap <PSDiscountTypeForOrderAmount>(new Dictionary <PSDiscountTypeForOrderAmount, string>
            {
                { PSDiscountTypeForOrderAmount.OrderAmountDiscount, "D" },
                { PSDiscountTypeForOrderAmount.OrderAmountPercentage, "P" }
            });

            EnumCodeMapper.AddMap <PSDiscountTypeForProductPrice>(new Dictionary <PSDiscountTypeForProductPrice, string>
            {
                { PSDiscountTypeForProductPrice.ProductPriceDiscount, "Z" },
                { PSDiscountTypeForProductPrice.ProductPriceFinal, "F" }
            });

            EnumCodeMapper.AddMap <SOStatus>(new Dictionary <SOStatus, int>
            {
                { SOStatus.Split, -6 },
                { SOStatus.Abandon, -1 },
                { SOStatus.Origin, 0 },
                { SOStatus.WaitingOutStock, 1 },
                { SOStatus.Shipping, 10 },
                { SOStatus.WaitingManagerAudit, 3 },
                { SOStatus.OutStock, 4 },
                { SOStatus.Reported, 41 },
                { SOStatus.CustomsPass, 45 },
                { SOStatus.Complete, 5 },
                { SOStatus.Reject, 6 },
                { SOStatus.CustomsReject, 65 },
                { SOStatus.ShippingReject, 7 }
            });

            EnumCodeMapper.AddMap <CommentProcessStatus>(new Dictionary <CommentProcessStatus, int>
            {
                { CommentProcessStatus.Finish, 2 },
                { CommentProcessStatus.Handling, 1 },
                { CommentProcessStatus.Invalid, -1 },
                { CommentProcessStatus.WaitHandling, 0 }
            });
            EnumCodeMapper.AddMap <KeywordsStatus>(new Dictionary <KeywordsStatus, string>
            {
                { KeywordsStatus.All, "R" },
                { KeywordsStatus.Passed, "A" },
                { KeywordsStatus.Reject, "D" },
                { KeywordsStatus.Waiting, "O" }
            });
            EnumCodeMapper.AddMap <ReplyVendor>(new Dictionary <ReplyVendor, string>
            {
                { ReplyVendor.YES, "M" },
                { ReplyVendor.NO, "N" }
            });
            EnumCodeMapper.AddMap <PollType>(new Dictionary <PollType, string>
            {
                { PollType.Single, "S" },
                { PollType.Multiple, "M" },
                { PollType.ShortAnswer, "A" },
                { PollType.Other, "C" }
            });

            EnumCodeMapper.AddMap <SaleGiftStatus>(new Dictionary <SaleGiftStatus, string>
            {
                { SaleGiftStatus.Finish, "F" },
                { SaleGiftStatus.Init, "O" },
                { SaleGiftStatus.Ready, "R" },
                { SaleGiftStatus.Run, "A" },
                { SaleGiftStatus.Void, "D" },
                { SaleGiftStatus.WaitingAudit, "P" },
                { SaleGiftStatus.Stoped, "S" }
            });
            EnumCodeMapper.AddExtraCodeMap <SaleGiftStatus>(SaleGiftStatus.WaitingAudit, new object[] { "P", "W" });
            EnumCodeMapper.AddMap <SaleGiftType>(new Dictionary <SaleGiftType, string>
            {
                { SaleGiftType.Full, "F" },
                { SaleGiftType.Multiple, "M" },
                { SaleGiftType.Single, "S" },
                { SaleGiftType.Vendor, "V" },
                //{SaleGiftType.FirstOrder,"O"},
                //{SaleGiftType.Additional,"B"}
            });

            EnumCodeMapper.AddMap <SaleGiftDiscountBelongType>(new Dictionary <SaleGiftDiscountBelongType, string>
            {
                { SaleGiftDiscountBelongType.BelongGiftItem, "G" },
                { SaleGiftDiscountBelongType.BelongMasterItem, "M" }
            });

            EnumCodeMapper.AddMap <SaleGiftSaleRuleType>(new Dictionary <SaleGiftSaleRuleType, string>
            {
                { SaleGiftSaleRuleType.Brand, "B" },
                { SaleGiftSaleRuleType.BrandC3Combo, "C" },
                { SaleGiftSaleRuleType.C3, "L" },
                { SaleGiftSaleRuleType.Item, "I" }
            });


            EnumCodeMapper.AddMap <SaleGiftGiftItemType>(new Dictionary <SaleGiftGiftItemType, string>
            {
                { SaleGiftGiftItemType.GiftPool, "O" },
                { SaleGiftGiftItemType.AssignGift, "A" }
            });

            ///捆绑方式,是组合捆绑M还是交叉捆绑S
            EnumCodeMapper.AddMap <SaleGiftCombineType>(new Dictionary <SaleGiftCombineType, string>
            {
                { SaleGiftCombineType.Assemble, "M" },
                { SaleGiftCombineType.Cross, "S" }
            });

            EnumCodeMapper.AddMap <AndOrType>(new Dictionary <AndOrType, string>
            {
                { AndOrType.Or, "O" },
                { AndOrType.And, "A" },
                { AndOrType.Not, "N" }
            });


            EnumCodeMapper.AddMap <ThesaurusWordsType>(new Dictionary <ThesaurusWordsType, string>
            {
                { ThesaurusWordsType.Doubleaction, "T" },
                { ThesaurusWordsType.Monodirectional, "O" }
            });
            EnumCodeMapper.AddMap <KeywordsOperateUserType>(new Dictionary <KeywordsOperateUserType, int>
            {
                { KeywordsOperateUserType.Customer, 1 },
                { KeywordsOperateUserType.MKTUser, 0 }
            });

            EnumCodeMapper.AddMap <ComboStatus>(new Dictionary <ComboStatus, int>
            {
                { ComboStatus.Active, 0 },
                { ComboStatus.Deactive, -1 },
                { ComboStatus.WaitingAudit, 1 }
            });

            EnumCodeMapper.AddMap <ComboType>(new Dictionary <ComboType, int>
            {
                { ComboType.Common, 0 }
                //{ComboType.NYuanSend,1}
            });

            EnumCodeMapper.AddMap <GroupType>(new Dictionary <GroupType, int>
            {
                { GroupType.Custom, 2 },
                { GroupType.LevelOne, 3 },
                { GroupType.LevelTwo, 0 },
                { GroupType.LevelThree, 1 }
            });
            EnumCodeMapper.AddMap <AreaRelationType>(new Dictionary <AreaRelationType, string>
            {
                { AreaRelationType.Banner, "B" },
                { AreaRelationType.News, "N" }
            });

            EnumCodeMapper.AddMap <ShowType>(new Dictionary <ShowType, string>
            {
                { ShowType.Table, "T" },
                { ShowType.ImageText, "I" }
            });

            EnumCodeMapper.AddMap <RecommendType>(new Dictionary <RecommendType, int>
            {
                { RecommendType.Normal, 0 },
                //{RecommendType.Top,1},
                //{RecommendType.ShowRecommendIcon,2}
                //{RecommendType.FiveItemPerRow,3},
                //{RecommendType.EightItemLeft,4},
                //{RecommendType.EightItemRight,5},
                //{RecommendType.EightItemUpperLeft,6},
                { RecommendType.SixItemLeft, 7 }
            });

            //前台显示分类级别
            EnumCodeMapper.AddMap <ECCategoryLevel>(new Dictionary <ECCategoryLevel, string>
            {
                { ECCategoryLevel.Category1, "H" },
                { ECCategoryLevel.Category2, "M" },
                { ECCategoryLevel.Category3, "L" }
            });

            //产品价格举报状态
            EnumCodeMapper.AddMap <ProductPriceCompareStatus>(new Dictionary <ProductPriceCompareStatus, int>
            {
                { ProductPriceCompareStatus.WaitAudit, 0 },
                { ProductPriceCompareStatus.AuditPass, 1 },
                { ProductPriceCompareStatus.AuditDecline, 2 }
            });

            //产品价格举报DisplayLinkStatus
            EnumCodeMapper.AddMap <DisplayLinkStatus>(new Dictionary <DisplayLinkStatus, int>
            {
                { DisplayLinkStatus.Hide, 0 },
                { DisplayLinkStatus.Display, 1 }
            });
            EnumCodeMapper.AddMap <SaleAdvStatus>(new Dictionary <SaleAdvStatus, int>
            {
                { SaleAdvStatus.Active, 0 },
                { SaleAdvStatus.Deactive, -1 }
            });

            EnumCodeMapper.AddMap <GroupBuyingSettlementStatus>(new Dictionary <GroupBuyingSettlementStatus, string>
            {
                { GroupBuyingSettlementStatus.MoreThan, "C" },
                { GroupBuyingSettlementStatus.Yes, "Y" },
                { GroupBuyingSettlementStatus.No, "N" }
            });

            EnumCodeMapper.AddMap <GiftIsOnlineShow>(new Dictionary <GiftIsOnlineShow, string>
            {
                { GiftIsOnlineShow.Online, "Y" },
                { GiftIsOnlineShow.Deline, "N" }
            });
            EnumCodeMapper.AddMap <CouponLimitType>(new Dictionary <CouponLimitType, string>
            {
                { CouponLimitType.PanicBuying, "C" },
                { CouponLimitType.Kill, "K" },
                //{CouponLimitType.FriedEgg,"T"},
                { CouponLimitType.GroupBuying, "G" },
                { CouponLimitType.GiftCard, "L" },
                { CouponLimitType.Manually, "M" }
            });
            EnumCodeMapper.AddMap <ClearType>(new Dictionary <ClearType, string>
            {
                { ClearType.WaitClear, "W" },
                { ClearType.CompleteClear, "F" }
            });
            EnumCodeMapper.AddMap <DynamicCategoryType>(new Dictionary <DynamicCategoryType, Int32>
            {
                { DynamicCategoryType.Standard, 0 },
                { DynamicCategoryType.WangJie, 1 }
            });
            //EnumCodeMapper.AddMap<DynamicCategoryStatus>(new Dictionary<DynamicCategoryStatus, Int32>
            //{
            //    {DynamicCategoryStatus.Active,0},
            //    {DynamicCategoryStatus.Deactive,-1}
            //});

            //限购规则类型
            EnumCodeMapper.AddMap <LimitType>(new Dictionary <LimitType, Int32>
            {
                { LimitType.SingleProduct, 0 },
                { LimitType.Combo, 1 }
            });

            //限购规则状态
            EnumCodeMapper.AddMap <LimitStatus>(new Dictionary <LimitStatus, Int32>
            {
                { LimitStatus.Invalid, 0 },
                { LimitStatus.Valid, 1 }
            });

            //销售立减规则类型
            EnumCodeMapper.AddMap <SaleDiscountRuleType>(new Dictionary <SaleDiscountRuleType, Int32>
            {
                { SaleDiscountRuleType.AmountRule, 0 },
                { SaleDiscountRuleType.QtyRule, 1 }
            });

            //销售立减规则状态
            EnumCodeMapper.AddMap <SaleDiscountRuleStatus>(new Dictionary <SaleDiscountRuleStatus, Int32>
            {
                { SaleDiscountRuleStatus.Invalid, 0 },
                { SaleDiscountRuleStatus.Valid, 1 }
            });
            //销售立减规则状态
            EnumCodeMapper.AddMap <GroupBuyingCategoryType>(new Dictionary <GroupBuyingCategoryType, Int32>
            {
                { GroupBuyingCategoryType.Physical, 0 },
                { GroupBuyingCategoryType.Virtual, 1 },
                { GroupBuyingCategoryType.ZeroLottery, 2 }
            });
            EnumCodeMapper.AddMap <GroupBuyingFeedbackStatus>(new Dictionary <GroupBuyingFeedbackStatus, Int32>
            {
                { GroupBuyingFeedbackStatus.UnRead, 0 },
                { GroupBuyingFeedbackStatus.Readed, 1 }
            });
            EnumCodeMapper.AddMap <BusinessCooperationStatus>(new Dictionary <BusinessCooperationStatus, Int32>
            {
                { BusinessCooperationStatus.UnHandled, 0 },
                { BusinessCooperationStatus.Handled, 1 }
            });
            EnumCodeMapper.AddMap <SettlementBillStatus>(new Dictionary <SettlementBillStatus, Int32>
            {
                { SettlementBillStatus.UnSettle, 0 },
                { SettlementBillStatus.Settled, 1 }
            });
            EnumCodeMapper.AddMap <GroupBuyingCategoryStatus>(new Dictionary <GroupBuyingCategoryStatus, Int32>
            {
                { GroupBuyingCategoryStatus.Valid, 0 },
                { GroupBuyingCategoryStatus.InValid, -1 }
            });
        }
Ejemplo n.º 2
0
        public void Start()
        {
            EnumCodeMapper.AddMap(new Dictionary <ValidStatus, string>
            {
                { ValidStatus.Active, "A" },
                { ValidStatus.DeActive, "D" }
            });


            EnumCodeMapper.AddMap(new Dictionary <ProductType, string>
            {
                { ProductType.Normal, "O" },
                { ProductType.OpenBox, "S" },
                { ProductType.Bad, "B" },
                { ProductType.Virtual, "V" }
            });

            EnumCodeMapper.AddMap(new Dictionary <Large, string>
            {
                { Large.Yes, "Y" },
                { Large.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductGroupImageShow, string>
            {
                { ProductGroupImageShow.Yes, "Y" },
                { ProductGroupImageShow.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductGroupPolymeric, string>
            {
                { ProductGroupPolymeric.Yes, "Y" },
                { ProductGroupPolymeric.No, "N" }
            });

            EnumCodeMapper.AddExtraCodeMap(ProductGroupPolymeric.No, new object[] { "n" });

            EnumCodeMapper.AddMap(new Dictionary <PropertyStatus, int>
            {
                { PropertyStatus.Active, 1 },
                { PropertyStatus.DeActive, 0 }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductAccessoryStatus, int>
            {
                { ProductAccessoryStatus.Active, 0 },
                { ProductAccessoryStatus.DeActive, -1 }
            });
            EnumCodeMapper.AddMap(new Dictionary <PropertyType, string>
            {
                { PropertyType.Grouping, "G" },
                { PropertyType.Other, "A" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductPropertyRequired, int>
            {
                { ProductPropertyRequired.Yes, 1 },
                { ProductPropertyRequired.No, 0 }
            });

            EnumCodeMapper.AddExtraCodeMap(PropertyType.Other, new object[] { "O" });
            EnumCodeMapper.AddMap(new Dictionary <ProductResourceStatus, string>
            {
                { ProductResourceStatus.Active, "A" },
                { ProductResourceStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductResourceIsShow, string>
            {
                { ProductResourceIsShow.Yes, "Y" },
                { ProductResourceIsShow.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ResourcesType, string>
            {
                { ResourcesType.Image, "I" },
                { ResourcesType.Image360, "D" },
                { ResourcesType.Video, "V" }
            });

            EnumCodeMapper.AddMap(new Dictionary <IsLarge, string>
            {
                { IsLarge.Yes, "L" },
                { IsLarge.No, "S" },
                { IsLarge.Undefined, "-" }
            });

            EnumCodeMapper.AddMap(new Dictionary <OfferVATInvoice, int>
            {
                { OfferVATInvoice.Yes, 1 },
                { OfferVATInvoice.No, 0 }
            });


            EnumCodeMapper.AddMap(new Dictionary <WarrantyShow, int>
            {
                { WarrantyShow.Yes, 1 },
                { WarrantyShow.No, 0 }
            });
            EnumCodeMapper.AddMap(new Dictionary <CustomerRank, int>
            {
                { CustomerRank.Ferrum, 1 },
                { CustomerRank.Copper, 2 },
                { CustomerRank.Silver, 3 },
                { CustomerRank.Golden, 4 },
                { CustomerRank.Diamond, 5 },
                { CustomerRank.Crown, 6 },
                { CustomerRank.Supremacy, 7 }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductRankPriceStatus, int>
            {
                { ProductRankPriceStatus.Active, 0 },
                { ProductRankPriceStatus.DeActive, -1 }
            });

            EnumCodeMapper.AddMap(new Dictionary <WholeSaleLevelType, int>
            {
                { WholeSaleLevelType.L1, 1 },
                { WholeSaleLevelType.L2, 2 },
                { WholeSaleLevelType.L3, 3 }
            });
            EnumCodeMapper.AddMap(new Dictionary <GiftCardStatus, string>
            {
                { GiftCardStatus.ManualActive, "H" },
                { GiftCardStatus.InValid, "D" },
                { GiftCardStatus.Void, "V" },
                { GiftCardStatus.Used, "U" },
                { GiftCardStatus.Valid, "A" }
            });
            EnumCodeMapper.AddMap(new Dictionary <CategoryExtendWarrantyStatus, string>
            {
                { CategoryExtendWarrantyStatus.Active, "A" },
                { CategoryExtendWarrantyStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <CategoryExtendWarrantyDisuseBrandStatus, string>
            {
                { CategoryExtendWarrantyDisuseBrandStatus.Active, "A" },
                { CategoryExtendWarrantyDisuseBrandStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ActionType, string>
            {
                { ActionType.Hold, "Hold" },
                { ActionType.AdjustExpireDate, "AdjustExpireDate" },
                { ActionType.ForwardCard, "ForwardCard" },
                { ActionType.MandatoryVoid, "MandatoryVoid" },
                { ActionType.UnHold, "UnHold" },
                { ActionType.SO, "SO" },
                { ActionType.RMA, "RMA" },
                { ActionType.ROBalance, "ROBalance" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestStatus, string>
            {
                { SellerProductRequestStatus.Approved, "A" },
                { SellerProductRequestStatus.Processing, "P" },
                { SellerProductRequestStatus.UnApproved, "D" },
                { SellerProductRequestStatus.WaitApproval, "O" },
                { SellerProductRequestStatus.Finish, "F" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestType, string>
            {
                { SellerProductRequestType.NewCreated, "N" },
                { SellerProductRequestType.ParameterUpdate, "P" },
                { SellerProductRequestType.ImageAndDescriptionUpdate, "I" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestTakePictures, string>
            {
                { SellerProductRequestTakePictures.Yes, "Y" },
                { SellerProductRequestTakePictures.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestFileType, string>
            {
                { SellerProductRequestFileType.Image, "I" },
                { SellerProductRequestFileType.Text, "P" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestFileStatus, string>
            {
                { SellerProductRequestFileStatus.WaitProcess, "O" },
                { SellerProductRequestFileStatus.Finish, "F" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductPriceRequestStatus, int>
            {
                { ProductPriceRequestStatus.Origin, 0 },
                { ProductPriceRequestStatus.Approved, 1 },
                { ProductPriceRequestStatus.Deny, -1 },
                { ProductPriceRequestStatus.Canceled, -2 },
                { ProductPriceRequestStatus.NeedSeniorApprove, 9 },
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductPriceRequestAuditType, string>
            {
                { ProductPriceRequestAuditType.Audit, "T" },
                { ProductPriceRequestAuditType.SeniorAudit, "P" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductIsTakePicture, string>
            {
                { ProductIsTakePicture.Yes, "Y" },
                { ProductIsTakePicture.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <SellerProductRequestOfferInvoice, string>
            {
                { SellerProductRequestOfferInvoice.Yes, "Y" },
                { SellerProductRequestOfferInvoice.No, "N" }
            });
            EnumCodeMapper.AddMap(new Dictionary <ProductStatus, int>
            {
                { ProductStatus.Abandon, -1 },
                { ProductStatus.Active, 1 },
                { ProductStatus.InActive_Show, 0 },
                { ProductStatus.InActive_UnShow, 2 }
            });
            EnumCodeMapper.AddMap(new Dictionary <IsDefault, int>
            {
                { IsDefault.Active, 0 },
                { IsDefault.DeActive, 1 }
            });

            EnumCodeMapper.AddMap(new Dictionary <TimelyPromotionTitleStatus, string>
            {
                { TimelyPromotionTitleStatus.Original, "O" },
                { TimelyPromotionTitleStatus.Active, "A" },
                { TimelyPromotionTitleStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductIsVirtualPic, string>
            {
                { ProductIsVirtualPic.Yes, "Y" },
                { ProductIsVirtualPic.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductIsAccessoryShow, string>
            {
                { ProductIsAccessoryShow.Yes, "Y" },
                { ProductIsAccessoryShow.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <NotifyStatus, int>
            {
                { NotifyStatus.NotifyYes, 1 },
                { NotifyStatus.NotifyBad, -1 },
                { NotifyStatus.NotifyNo, 0 }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductInfoFinishStatus, string>
            {
                { ProductInfoFinishStatus.Yes, "Y" },
                { ProductInfoFinishStatus.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ThirdPartner, string>
            {
                { ThirdPartner.Hengzhong, "H" },
                { ThirdPartner.Xijie, "X" },
                { ThirdPartner.Belle, "B" },
                { ThirdPartner.Yieke, "Y" },
                { ThirdPartner.Ingrammicro, "I" }
            });

            EnumCodeMapper.AddExtraCodeMap(new Dictionary <StockRules, object[]>
            {
                { StockRules.Limit, new object[] { "L" } },
                { StockRules.Direct, new object[] { "U" } },
                { StockRules.Customer, new object[] { "C", "T", "D" } },
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductMappingStatus, string>
            {
                { ProductMappingStatus.Active, "A" },
                { ProductMappingStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <IsUseAlipayVipPrice, string>
            {
                { IsUseAlipayVipPrice.Yes, "Y" },
                { IsUseAlipayVipPrice.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <IsAutoAdjustPrice, int>
            {
                { IsAutoAdjustPrice.Yes, 1 },
                { IsAutoAdjustPrice.No, 0 }
            });
            EnumCodeMapper.AddMap(new Dictionary <InventorySync, string>
            {
                { InventorySync.Yes, "Y" },
                { InventorySync.No, "N" }
            });
            EnumCodeMapper.AddMap(new Dictionary <BooleanEnum, string>
            {
                { BooleanEnum.Yes, "Y" },
                { BooleanEnum.No, "N" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductChannelInfoStatus, string>
            {
                { ProductChannelInfoStatus.Active, "A" },
                { ProductChannelInfoStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <ProductChannelPeriodPriceStatus, string>
            {
                { ProductChannelPeriodPriceStatus.Finish, "F" },
                { ProductChannelPeriodPriceStatus.Init, "O" },
                { ProductChannelPeriodPriceStatus.Abandon, "D" },
                { ProductChannelPeriodPriceStatus.Ready, "R" },
                { ProductChannelPeriodPriceStatus.Running, "A" },
                { ProductChannelPeriodPriceStatus.WaitApproved, "P" }
            });
            EnumCodeMapper.AddMap(new Dictionary <AuthorizedStatus, string>
            {
                { AuthorizedStatus.Active, "A" },
                { AuthorizedStatus.DeActive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <UnicomContractPhoneNumberStatus, string>
            {
                { UnicomContractPhoneNumberStatus.Active, "A" },
                { UnicomContractPhoneNumberStatus.DeActive, "D" },
                { UnicomContractPhoneNumberStatus.CreateOrder, "S" }
            });
            EnumCodeMapper.AddMap(new Dictionary <CategoryTemplateType, int>
            {
                { CategoryTemplateType.TemplateProductTitle, 0 },
                { CategoryTemplateType.TemplateProductDescription, 1 },
                { CategoryTemplateType.TemplateProductName, 2 },
                { CategoryTemplateType.TemplateWeb, 3 }
            });
            EnumCodeMapper.AddMap(new Dictionary <RmaPolicyType, string>
            {
                { RmaPolicyType.DiscountType, "D" },
                { RmaPolicyType.ExtendType, "E" },
                { RmaPolicyType.ManufacturerType, "M" },
                { RmaPolicyType.StandardType, "P" },
                { RmaPolicyType.SellerType, "S" }
            });
            EnumCodeMapper.AddMap(new Dictionary <RmaPolicyStatus, string>
            {
                { RmaPolicyStatus.Active, "A" },
                { RmaPolicyStatus.DeActive, "D" },
            });
            EnumCodeMapper.AddMap(new Dictionary <IsOnlineRequst, string>
            {
                { IsOnlineRequst.YES, "Y" },
                { IsOnlineRequst.NO, "N" },
            });
            EnumCodeMapper.AddMap(new Dictionary <RmaLogActionType, string>
            {
                { RmaLogActionType.Create, "C" },
                { RmaLogActionType.Active, "A" },
                { RmaLogActionType.DeActive, "D" },
                { RmaLogActionType.Edit, "E" },
            });

            EnumCodeMapper.AddMap(new Dictionary <CollectDateType, string>
            {
                { CollectDateType.ExpiredDate, "E" },
                { CollectDateType.ManufactureDate, "P" }
            });

            EnumCodeMapper.AddMap(new Dictionary <GiftVoucherRelateProductStatus, string>
            {
                { GiftVoucherRelateProductStatus.Active, "A" },
                { GiftVoucherRelateProductStatus.Deactive, "D" }
            });

            EnumCodeMapper.AddMap(new Dictionary <GiftVoucherProductStatus, int>
            {
                { GiftVoucherProductStatus.AuditFail, -2 },
                { GiftVoucherProductStatus.Void, -1 },
                { GiftVoucherProductStatus.WaittingAudit, 1 },
                { GiftVoucherProductStatus.Audit, 2 }
            });

            EnumCodeMapper.AddMap(new Dictionary <GVRReqType, int>
            {
                { GVRReqType.Add, 0 },
                { GVRReqType.Delete, 1 }
            });

            EnumCodeMapper.AddMap(new Dictionary <GVRReqAuditStatus, string>
            {
                { GVRReqAuditStatus.AuditWaitting, "W" },
                { GVRReqAuditStatus.AuditFailed, "F" },
                { GVRReqAuditStatus.AuditSuccess, "S" }
            });
        }
Ejemplo n.º 3
0
        public void Start()
        {
            EnumCodeMapper.AddMap <CustomerType>(new Dictionary <CustomerType, int> {
                { CustomerType.Personal, 0 },
                { CustomerType.Enterprise, 1 },
                { CustomerType.Campus, 2 },
                { CustomerType.Media, 3 },
                { CustomerType.Internal, 4 }
            });


            EnumCodeMapper.AddMap <AvtarShowStatus>(new Dictionary <AvtarShowStatus, string>()
            {
                { AvtarShowStatus.NotSet, "S" },
                { AvtarShowStatus.Show, "A" },
                { AvtarShowStatus.NotShow, "D" }
            });
            //兼容数据库中头像状态为S的情况
            EnumCodeMapper.AddExtraCodeMap <AvtarShowStatus>(AvtarShowStatus.NotSet, "0"); //前台注册时为0,其实

            EnumCodeMapper.AddExtraCodeMap <CustomerStatus>(CustomerStatus.InValid, -1);   //前台注册时为0,其实

            EnumCodeMapper.AddMap <OrderCheckStatus>(new Dictionary <OrderCheckStatus, int>()
            {
                { OrderCheckStatus.Invalid, 1 },
                { OrderCheckStatus.Valid, 0 }
            });

            EnumCodeMapper.AddMap <RefundRequestType>(new Dictionary <RefundRequestType, string>()
            {
                { RefundRequestType.SO, "S" },
                { RefundRequestType.Balance, "C" }
            });

            EnumCodeMapper.AddMap <RefundRequestStatus>(new Dictionary <RefundRequestStatus, string>()
            {
                { RefundRequestStatus.A, "A" },
                { RefundRequestStatus.O, "O" },
                { RefundRequestStatus.R, "R" }
            });

            EnumCodeMapper.AddMap <PrepayStatus>(new Dictionary <PrepayStatus, string>()
            {
                { PrepayStatus.Valid, "A" },
                { PrepayStatus.InValid, "D" }
            });

            //EnumCodeMapper.AddMap<CompanyCustomer>(new Dictionary<CompanyCustomer, int>()
            //{
            //    {CompanyCustomer.Newegg,0},
            //    {CompanyCustomer.AstraZeneca,1}
            //});
            EnumCodeMapper.AddMap <RefundAdjustStatus>(new Dictionary <RefundAdjustStatus, int>()
            {
                { RefundAdjustStatus.Abandon, -1 },
                { RefundAdjustStatus.Initial, 0 },
                { RefundAdjustStatus.WaitingAudit, 1 },
                { RefundAdjustStatus.AuditRefuesed, 2 },
                { RefundAdjustStatus.Audited, 3 },
                { RefundAdjustStatus.Refunded, 4 }
            });
            EnumCodeMapper.AddMap <RefundAdjustType>(new Dictionary <RefundAdjustType, int>()
            {
                { RefundAdjustType.ShippingAdjust, 1 },
                { RefundAdjustType.Other, 2 }
            });
        }
Ejemplo n.º 4
0
        public void Start()
        {
            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SODeliveryPromise>(new Dictionary <ECCentral.BizEntity.SO.SODeliveryPromise, string> {
                { ECCentral.BizEntity.SO.SODeliveryPromise.In24H, "24H" },
                { ECCentral.BizEntity.SO.SODeliveryPromise.NoPromise, "" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SOPriceStatus>(new Dictionary <ECCentral.BizEntity.SO.SOPriceStatus, string> {
                { ECCentral.BizEntity.SO.SOPriceStatus.Original, "O" },
                { ECCentral.BizEntity.SO.SOPriceStatus.Deactivate, "D" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SettlementStatus>(new Dictionary <ECCentral.BizEntity.SO.SettlementStatus, string> {
                { ECCentral.BizEntity.SO.SettlementStatus.PlanFail, "P" },
                { ECCentral.BizEntity.SO.SettlementStatus.Fail, "F" },
                { ECCentral.BizEntity.SO.SettlementStatus.Success, "S" }
            });

            EnumCodeMapper.AddExtraCodeMap <SOStatus>(new Dictionary <SOStatus, object[]> {
                { SOStatus.Abandon, new object[] { -1, -2, -3, -4 } },
                { SOStatus.Origin, new object[] { 0, 2 } }
            });

            EnumCodeMapper.AddExtraCodeMap <SOComplainReplyType>(SOComplainReplyType.Phone, ResSOEnum.SOComplainReplyType_Phone);
            EnumCodeMapper.AddExtraCodeMap <SOComplainReplyType>(SOComplainReplyType.Email, ResSOEnum.SOComplainReplyType_Email);

            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SOSplitType>(new Dictionary <ECCentral.BizEntity.SO.SOSplitType, string> {
                { ECCentral.BizEntity.SO.SOSplitType.Normal, "0" },
                { ECCentral.BizEntity.SO.SOSplitType.Force, "1" },
                { ECCentral.BizEntity.SO.SOSplitType.Customer, "2" },
                { ECCentral.BizEntity.SO.SOSplitType.SubSO, "3" }
            });

            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SOProductType>(new Dictionary <ECCentral.BizEntity.SO.SOProductType, string> {
                { ECCentral.BizEntity.SO.SOProductType.Product, "0" },
                { ECCentral.BizEntity.SO.SOProductType.Gift, "1" },
                { ECCentral.BizEntity.SO.SOProductType.Award, "2" },
                { ECCentral.BizEntity.SO.SOProductType.Coupon, "3" },
                { ECCentral.BizEntity.SO.SOProductType.ExtendWarranty, "4" },
                { ECCentral.BizEntity.SO.SOProductType.Accessory, "5" },
                { ECCentral.BizEntity.SO.SOProductType.SelfGift, "6" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.SOProductPriceType>(new Dictionary <ECCentral.BizEntity.SO.SOProductPriceType, string> {
                { ECCentral.BizEntity.SO.SOProductPriceType.Normal, "0" },
                { ECCentral.BizEntity.SO.SOProductPriceType.Member, "1" },
                { ECCentral.BizEntity.SO.SOProductPriceType.WholeSale, "2" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.IM.ProductPayType>(new Dictionary <ECCentral.BizEntity.IM.ProductPayType, string> {
                { ECCentral.BizEntity.IM.ProductPayType.MoneyOnly, "0" },
                { ECCentral.BizEntity.IM.ProductPayType.All, "1" },
                { ECCentral.BizEntity.IM.ProductPayType.PointOnly, "2" }
            });

            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.WMSAction>(new Dictionary <ECCentral.BizEntity.SO.WMSAction, string> {
                { ECCentral.BizEntity.SO.WMSAction.Abandon, "V" },
                { ECCentral.BizEntity.SO.WMSAction.AbandonHold, "D" },
                { ECCentral.BizEntity.SO.WMSAction.CancelAuditHold, "C" },
                { ECCentral.BizEntity.SO.WMSAction.Hold, "H" },
                { ECCentral.BizEntity.SO.WMSAction.UnHold, "U" }
            });

            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.OPCStatus>(new Dictionary <ECCentral.BizEntity.SO.OPCStatus, string> {
                { ECCentral.BizEntity.SO.OPCStatus.Close, "C" },
                { ECCentral.BizEntity.SO.OPCStatus.Error, "E" },
                { ECCentral.BizEntity.SO.OPCStatus.Fail, "F" },
                { ECCentral.BizEntity.SO.OPCStatus.Open, "O" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.SO.OPCTransStatus>(new Dictionary <ECCentral.BizEntity.SO.OPCTransStatus, string> {
                { ECCentral.BizEntity.SO.OPCTransStatus.Origin, "O" },
                { ECCentral.BizEntity.SO.OPCTransStatus.Error, "E" },
                { ECCentral.BizEntity.SO.OPCTransStatus.Fail, "F" },
                { ECCentral.BizEntity.SO.OPCTransStatus.Success, "S" }
            });
            EnumCodeMapper.AddMap(new Dictionary <ECCentral.BizEntity.SO.ValidStatus, string>
            {
                { ECCentral.BizEntity.SO.ValidStatus.Active, "A" },
                { ECCentral.BizEntity.SO.ValidStatus.DeActive, "D" }
            });


            EnumCodeMapper.AddMap(new Dictionary <ECCentral.BizEntity.SO.SOProductActivityType, string>
            {
                { ECCentral.BizEntity.SO.SOProductActivityType.GroupBuy, "G" },
                { ECCentral.BizEntity.SO.SOProductActivityType.SpecialAccount, "C" },
                { ECCentral.BizEntity.SO.SOProductActivityType.E_Promotion, "E" }
            });
        }
Ejemplo n.º 5
0
        public void Start()
        {
            EnumCodeMapper.AddMap <ECCentral.BizEntity.PO.VendorInvoiceType>(new Dictionary <ECCentral.BizEntity.PO.VendorInvoiceType, string> {
                { ECCentral.BizEntity.PO.VendorInvoiceType.NEG, "NEG" },
                { ECCentral.BizEntity.PO.VendorInvoiceType.MET, "MET" },
                { ECCentral.BizEntity.PO.VendorInvoiceType.GUD, "GUD" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.PO.VendorShippingType>(new Dictionary <ECCentral.BizEntity.PO.VendorShippingType, string> {
                { ECCentral.BizEntity.PO.VendorShippingType.NEG, "NEG" },
                { ECCentral.BizEntity.PO.VendorShippingType.MET, "MET" }
            });
            EnumCodeMapper.AddMap <ECCentral.BizEntity.PO.VendorStockType>(new Dictionary <ECCentral.BizEntity.PO.VendorStockType, string> {
                { ECCentral.BizEntity.PO.VendorStockType.NEG, "NEG" },
                { ECCentral.BizEntity.PO.VendorStockType.MET, "MET" },
                { ECCentral.BizEntity.PO.VendorStockType.NAM, "NAM" }
            });

            EnumCodeMapper.AddMap <GatherSettleStatus>(new Dictionary <GatherSettleStatus, string> {
                { GatherSettleStatus.ABD, "ABD" },
                { GatherSettleStatus.ORG, "ORG" },
                { GatherSettleStatus.AUD, "AUD" },
                { GatherSettleStatus.SET, "SET" }
            });

            EnumCodeMapper.AddMap <ECCentral.BizEntity.PO.ValidStatus>(new Dictionary <ECCentral.BizEntity.PO.ValidStatus, int> {
                { ECCentral.BizEntity.PO.ValidStatus.D, -1 },
                { ECCentral.BizEntity.PO.ValidStatus.A, 0 }
            });

            EnumCodeMapper.AddMap <ConsignToAccountLogStatus>(new Dictionary <ConsignToAccountLogStatus, string>
            {
                { ConsignToAccountLogStatus.Origin, "A" },
                { ConsignToAccountLogStatus.SystemCreated, "S" },
                { ConsignToAccountLogStatus.ManualCreated, "C" },
                { ConsignToAccountLogStatus.Settled, "F" }
            });
            EnumCodeMapper.AddMap <SettleType>(new Dictionary <SettleType, string>
            {
                { SettleType.O, "O" },
                { SettleType.P, "P" }
            });

            EnumCodeMapper.AddMap <ConsignToAccountType>(new Dictionary <ConsignToAccountType, string>
            {
                { ConsignToAccountType.Adjust, "AD" },
                { ConsignToAccountType.Manual, "RMA" },
                { ConsignToAccountType.RMA, "OR" },
                { ConsignToAccountType.SO, "SO" }
            });
            EnumCodeMapper.AddExtraCodeMap(ConsignToAccountType.Manual, new object[] { "IT" });

            EnumCodeMapper.AddMap <PurchaseOrderETAHalfDayType>(new Dictionary <PurchaseOrderETAHalfDayType, string> {
                { PurchaseOrderETAHalfDayType.AM, "AM" },
                { PurchaseOrderETAHalfDayType.PM, "PM" }
            });

            EnumCodeMapper.AddMap <PurchaseOrderTaxRate>(new Dictionary <PurchaseOrderTaxRate, int> {
                { PurchaseOrderTaxRate.Percent000, 0 },
                { PurchaseOrderTaxRate.Percent004, 4 },
                { PurchaseOrderTaxRate.Percent006, 6 },
                { PurchaseOrderTaxRate.Percent013, 13 },
                { PurchaseOrderTaxRate.Percent017, 17 }
            });
            EnumCodeMapper.AddMap <YNStatus>(new Dictionary <YNStatus, string>
            {
                { YNStatus.Yes, "Y" },
                { YNStatus.NO, "N" }
            });
            EnumCodeMapper.AddMap <VendorCommissionItemType>(new Dictionary <VendorCommissionItemType, string>
            {
                { VendorCommissionItemType.DEF, "DEF" },
                { VendorCommissionItemType.SOC, "SOC" },
                { VendorCommissionItemType.SAC, "SAC" }
            });
            EnumCodeMapper.AddMap <VendorCommissionReferenceType>(new Dictionary <VendorCommissionReferenceType, string>
            {
                { VendorCommissionReferenceType.SO, "SO" },
                { VendorCommissionReferenceType.RMA, "RMA" }
            });

            EnumCodeMapper.AddMap <VendorRank>(new Dictionary <VendorRank, string>
            {
                { VendorRank.A, "A" },
                { VendorRank.B, "B" },
                { VendorRank.C, "C" }
            });

            EnumCodeMapper.AddMap <ConsignSettleRuleStatus>(new Dictionary <ConsignSettleRuleStatus, string>
            {
                { ConsignSettleRuleStatus.Wait_Audit, "O" },
                { ConsignSettleRuleStatus.Stop, "S" },
                { ConsignSettleRuleStatus.Forbid, "F" },
                { ConsignSettleRuleStatus.Enable, "E" },
                { ConsignSettleRuleStatus.Disable, "D" },
                { ConsignSettleRuleStatus.Available, "A" }
            });
            EnumCodeMapper.AddMap <PurchaseOrderBatchInfoStatus>(new Dictionary <PurchaseOrderBatchInfoStatus, string>
            {
                { PurchaseOrderBatchInfoStatus.A, "A" },
                { PurchaseOrderBatchInfoStatus.I, "I" },
                { PurchaseOrderBatchInfoStatus.R, "R" }
            });
        }
Ejemplo n.º 6
0
        public void Start()
        {
            EnumCodeMapper.AddMap <UserStatus>(new Dictionary <UserStatus, string> {
                { UserStatus.A, "A" },
                { UserStatus.D, "D" }
            });

            EnumCodeMapper.AddMap <RoleStatus>(new Dictionary <RoleStatus, string> {
                { RoleStatus.Active, "A" },
                { RoleStatus.DeActive, "D" }
            });


            EnumCodeMapper.AddMap <SettleOrderStatus>(new Dictionary <SettleOrderStatus, string> {
                { SettleOrderStatus.CLS, "CLS" },
                { SettleOrderStatus.ORG, "ORG" },
                { SettleOrderStatus.SET, "SET" }
            });
            EnumCodeMapper.AddMap <CommissionType>(new Dictionary <CommissionType, string> {
                { CommissionType.DEF, "DEF" },
                { CommissionType.SAC, "SAC" },
                { CommissionType.SOC, "SOC" }
            });

            EnumCodeMapper.AddMap <ProductRangeType>(new Dictionary <ProductRangeType, string> {
                { ProductRangeType.All, "A" },
                { ProductRangeType.Limit, "I" }
            });

            EnumCodeMapper.AddMap <RelationType>(new Dictionary <RelationType, string> {
                { RelationType.Y, "Y" },
                { RelationType.N, "N" }
            });

            EnumCodeMapper.AddMap <CouponStatus>(new Dictionary <CouponStatus, string> {
                { CouponStatus.Init, "O" },
                { CouponStatus.WaitingAudit, "W" },
                { CouponStatus.Ready, "R" },
                { CouponStatus.Run, "A" },
                { CouponStatus.Void, "D" },
                { CouponStatus.Stoped, "S" },
                { CouponStatus.Finish, "F" }
            });

            EnumCodeMapper.AddMap <CouponDiscountRuleType>(new Dictionary <CouponDiscountRuleType, string> {
                { CouponDiscountRuleType.Discount, "D" },
                { CouponDiscountRuleType.Percentage, "P" }
            });

            EnumCodeMapper.AddMap <CouponsBindConditionType>(new Dictionary <CouponsBindConditionType, string> {
                { CouponsBindConditionType.None, "A" },
                { CouponsBindConditionType.SO, "O" },
                { CouponsBindConditionType.Get, "L" }
            });

            EnumCodeMapper.AddMap <CouponValidPeriodType>(new Dictionary <CouponValidPeriodType, int> {
                { CouponValidPeriodType.All, 0 },
                { CouponValidPeriodType.PublishDayToOneWeek, 1 },
                { CouponValidPeriodType.PublishDayToOneMonth, 2 },
                { CouponValidPeriodType.PublishDayToTwoMonths, 3 },
                { CouponValidPeriodType.PublishDayToThreeMonths, 4 },
                { CouponValidPeriodType.PublishDayToSixMonths, 5 },
                { CouponValidPeriodType.CustomPeriod, 6 }
            });

            EnumCodeMapper.AddMap <SaleGiftType>(new Dictionary <SaleGiftType, string> {
                { SaleGiftType.Single, "S" },
                { SaleGiftType.Multiple, "M" },
                { SaleGiftType.Full, "F" }
                //{ SaleGiftType.Vendor, "V" },
                //{ SaleGiftType.Additional, "F" }
            });
            EnumCodeMapper.AddMap <SaleGiftStatus>(new Dictionary <SaleGiftStatus, string> {
                { SaleGiftStatus.Origin, "O" },
                { SaleGiftStatus.WaitingAudit, "P" },
                { SaleGiftStatus.Ready, "R" },
                { SaleGiftStatus.Run, "A" },
                { SaleGiftStatus.Stoped, "S" },
                { SaleGiftStatus.Finish, "F" },
                { SaleGiftStatus.Void, "D" }
            });
            EnumCodeMapper.AddMap <SaleGiftDiscountBelongType>(new Dictionary <SaleGiftDiscountBelongType, string>
            {
                { SaleGiftDiscountBelongType.BelongGiftItem, "G" },
                { SaleGiftDiscountBelongType.BelongMasterItem, "M" }
            });

            EnumCodeMapper.AddMap <Specified>(new Dictionary <Specified, string>
            {
                { Specified.Y, "Y" },
                { Specified.N, "N" }
            });

            EnumCodeMapper.AddMap <CouponCodeType>(new Dictionary <CouponCodeType, string> {
                { CouponCodeType.Common, "C" },
                { CouponCodeType.ThrowIn, "T" }
            });
            EnumCodeMapper.AddMap <AndOrType>(new Dictionary <AndOrType, string>
            {
                { AndOrType.And, "A" },
                { AndOrType.Not, "N" }
            });

            EnumCodeMapper.AddMap <CouponCodeUsedStatus>(new Dictionary <CouponCodeUsedStatus, string> {
                { CouponCodeUsedStatus.Active, "A" },
                { CouponCodeUsedStatus.Deactive, "D" }
            });

            EnumCodeMapper.AddMap <CustomerType>(new Dictionary <CustomerType, int> {
                { CustomerType.Personal, 0 },
                { CustomerType.Enterprise, 1 },
                { CustomerType.Campus, 2 },
                { CustomerType.Media, 3 },
                { CustomerType.Internal, 4 }
            });

            EnumCodeMapper.AddExtraCodeMap <CustomerStatus>(CustomerStatus.InValid, -1);

            EnumCodeMapper.AddMap <SOPriceStatus>(new Dictionary <SOPriceStatus, string> {
                { SOPriceStatus.Original, "O" },
                { SOPriceStatus.Deactivate, "D" }
            });

            EnumCodeMapper.AddMap <ShippingStockType>(new Dictionary <ShippingStockType, string> {
                { ShippingStockType.MET, "MET" },
                { ShippingStockType.NEG, "NEG" }
            });

            EnumCodeMapper.AddMap <FreeShippingAmountSettingStatus>(new Dictionary <FreeShippingAmountSettingStatus, string> {
                { FreeShippingAmountSettingStatus.Active, "A" },
                { FreeShippingAmountSettingStatus.DeActive, "D" }
            });
        }