| Line 1... |
Line 1... |
| 1 |
'''
|
1 |
'''
|
| 2 |
Created on 23-Mar-2010
|
2 |
Created on 23-Mar-2010
|
| 3 |
|
3 |
|
| 4 |
@author: ashish
|
4 |
@author: ashish
|
| 5 |
'''
|
5 |
'''
|
| 6 |
from shop2020.model.v1.catalog.impl.DataService import Insurer, SnapdealItem, Item
|
6 |
from shop2020.model.v1.catalog.impl.DataService import Insurer, SnapdealItem, Item,\
|
| - |
|
7 |
ExclusiveAffiliateItemInfo
|
| 7 |
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
|
8 |
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
|
| 8 |
SourceItemPricing, Source, ItemType, \
|
9 |
SourceItemPricing, Source, ItemType, \
|
| 9 |
ProductNotificationRequest as TProductNotificationRequest, \
|
10 |
ProductNotificationRequest as TProductNotificationRequest, \
|
| 10 |
ProductNotificationRequestCount as TProductNotificationRequestCount, \
|
11 |
ProductNotificationRequestCount as TProductNotificationRequestCount, \
|
| 11 |
VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
|
12 |
VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
|
| Line 14... |
Line 15... |
| 14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
15 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
| 15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
16 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
| 16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
17 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
| 17 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
18 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
| 18 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp, CompetitorPricing as TCompetitorPricing, \
|
19 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp, CompetitorPricing as TCompetitorPricing, \
|
| 19 |
AmazonPromotion as TAmazonPromotion
|
20 |
AmazonPromotion as TAmazonPromotion, ExclusiveAffiliateItemInfo as TExclusiveAffiliateItemInfo
|
| - |
|
21 |
|
| 20 |
from shop2020.utils.Utils import to_java_date
|
22 |
from shop2020.utils.Utils import to_java_date
|
| 21 |
import datetime
|
23 |
import datetime
|
| 22 |
|
24 |
|
| 23 |
def to_t_item(item):
|
25 |
def to_t_item(item):
|
| 24 |
t_item = Item()
|
26 |
t_item = Item()
|
| Line 640... |
Line 642... |
| 640 |
if not (fbaPromo is None or len(fbaPromo)==0):
|
642 |
if not (fbaPromo is None or len(fbaPromo)==0):
|
| 641 |
t_amazon.fbaSalePrice = fbaPromo[0].salePrice
|
643 |
t_amazon.fbaSalePrice = fbaPromo[0].salePrice
|
| 642 |
if not (fbbPromo is None or len(fbbPromo)==0):
|
644 |
if not (fbbPromo is None or len(fbbPromo)==0):
|
| 643 |
t_amazon.fbbSalePrice = fbbPromo[0].salePrice
|
645 |
t_amazon.fbbSalePrice = fbbPromo[0].salePrice
|
| 644 |
return t_amazon
|
646 |
return t_amazon
|
| - |
|
647 |
|
| - |
|
648 |
def to_t_exclusive_affiliate_item_info(afItemInfo):
|
| - |
|
649 |
tinfo = TExclusiveAffiliateItemInfo()
|
| - |
|
650 |
tinfo.affiliateId = afItemInfo[0].affiliateId
|
| - |
|
651 |
tinfo.active = afItemInfo[0].isActive
|
| - |
|
652 |
tinfo.affiliateName = afItemInfo[1]
|
| - |
|
653 |
tinfo.offerImageUrl = afItemInfo[0].offerUrl
|
| - |
|
654 |
tinfo.offerText = afItemInfo[0].offerText
|
| - |
|
655 |
tinfo.itemId = afItemInfo[0].itemId
|
| - |
|
656 |
tinfo.mOfferImageUrl = afItemInfo[0].mOfferUrl
|
| - |
|
657 |
tinfo.mOfferText = afItemInfo[0].mOfferText
|
| - |
|
658 |
tinfo.affiliateUrl = afItemInfo[0].affiliateUrl
|
| - |
|
659 |
return tinfo
|
| 645 |
|
660 |
|
| 646 |
|
661 |
|
| 647 |
|
662 |
|
| 648 |
|
663 |
|