| Line 15... |
Line 15... |
| 15 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
15 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
| 16 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
16 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
| 17 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
17 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
| 18 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
18 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
| 19 |
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, \
|
| 20 |
AmazonPromotion as TAmazonPromotion, ExclusiveAffiliateItemInfo as TExclusiveAffiliateItemInfo
|
20 |
AmazonPromotion as TAmazonPromotion, ExclusiveAffiliateItemInfo as TExclusiveAffiliateItemInfo, \
|
| - |
|
21 |
HsItem as THsItem
|
| 21 |
|
22 |
|
| 22 |
from shop2020.utils.Utils import to_java_date
|
23 |
from shop2020.utils.Utils import to_java_date, to_py_date
|
| 23 |
import datetime
|
24 |
import datetime
|
| 24 |
|
25 |
|
| 25 |
def to_t_item(item):
|
26 |
def to_t_item(item):
|
| 26 |
t_item = Item()
|
27 |
t_item = Item()
|
| 27 |
if item is None:
|
28 |
if item is None:
|
| Line 591... |
Line 592... |
| 591 |
dItem = item[2]
|
592 |
dItem = item[2]
|
| 592 |
t_sd_item = to_t_snapdeal_item(item)
|
593 |
t_sd_item = to_t_snapdeal_item(item)
|
| 593 |
t_sd_item.marketplaceItems = to_t_marketplace_items(mpItem)
|
594 |
t_sd_item.marketplaceItems = to_t_marketplace_items(mpItem)
|
| 594 |
t_sd_item.item = to_t_item(dItem)
|
595 |
t_sd_item.item = to_t_item(dItem)
|
| 595 |
return t_sd_item
|
596 |
return t_sd_item
|
| - |
|
597 |
'''
|
| - |
|
598 |
def to_t_deal_tag(dealTag):
|
| - |
|
599 |
t_deal_tag = TDealTag()
|
| - |
|
600 |
t_deal_tag.id = dealTag.id
|
| - |
|
601 |
t_deal_tag.name = dealTag.name
|
| - |
|
602 |
return t_deal_tag
|
| - |
|
603 |
|
| - |
|
604 |
def to_t_item_tag(itemTag):
|
| - |
|
605 |
t_item_tag = TItemTag()
|
| - |
|
606 |
t_item_tag.itemId = itemTag.itemId
|
| - |
|
607 |
t_item_tag.tagId = itemTag.tagId
|
| - |
|
608 |
t_item_tag.startDate = to_java_date(itemTag.startDate)
|
| - |
|
609 |
t_item_tag.endDate = to_java_date(itemTag.endDate)
|
| - |
|
610 |
t_item_tag.status = itemTag.status
|
| - |
|
611 |
return t_item_tag
|
| - |
|
612 |
'''
|
| 596 |
|
613 |
|
| 597 |
def to_t_flipkart_marketplace_item(item):
|
614 |
def to_t_flipkart_marketplace_item(item):
|
| 598 |
mpItem = item[1]
|
615 |
mpItem = item[1]
|
| 599 |
dItem = item[2]
|
616 |
dItem = item[2]
|
| 600 |
t_fk_item = to_t_flipkart_item(item)
|
617 |
t_fk_item = to_t_flipkart_item(item)
|
| Line 677... |
Line 694... |
| 677 |
tinfo.mOfferImageUrl = afItemInfo[0].mOfferUrl
|
694 |
tinfo.mOfferImageUrl = afItemInfo[0].mOfferUrl
|
| 678 |
tinfo.mOfferText = afItemInfo[0].mOfferText
|
695 |
tinfo.mOfferText = afItemInfo[0].mOfferText
|
| 679 |
tinfo.affiliateUrl = afItemInfo[0].affiliateUrl
|
696 |
tinfo.affiliateUrl = afItemInfo[0].affiliateUrl
|
| 680 |
return tinfo
|
697 |
return tinfo
|
| 681 |
|
698 |
|
| 682 |
|
- |
|
| 683 |
|
- |
|
| 684 |
|
699 |
def to_t_hsItem(hsItem):
|
| - |
|
700 |
t_hsItem = THsItem()
|
| - |
|
701 |
t_hsItem.addedBy = hsItem.addedBy
|
| - |
|
702 |
t_hsItem.addedTimestamp = to_java_date(hsItem.addedTimestamp)
|
| - |
|
703 |
t_hsItem.defaultWarehouseId = hsItem.defaultWarehouseId
|
| - |
|
704 |
t_hsItem.hsItemId = hsItem.hsItemId
|
| - |
|
705 |
t_hsItem.hsProductId = hsItem.hsProductId
|
| - |
|
706 |
t_hsItem.itemId = hsItem.itemId
|
| - |
|
707 |
t_hsItem.listingPrice = hsItem.listingPrice
|
| - |
|
708 |
return t_hsItem
|
| - |
|
709 |
|
| 685 |
|
710 |
|