| Line 11... |
Line 11... |
| 11 |
VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
|
11 |
VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
|
| 12 |
Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
|
12 |
Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
|
| 13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
| 14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
| 15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
| 16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem
|
16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
| - |
|
17 |
FlipkartItemDetails as TFlipkartItemDetails
|
| 17 |
from shop2020.utils.Utils import to_java_date
|
18 |
from shop2020.utils.Utils import to_java_date
|
| 18 |
|
19 |
|
| 19 |
def to_t_item(item):
|
20 |
def to_t_item(item):
|
| 20 |
t_item = Item()
|
21 |
t_item = Item()
|
| 21 |
if item is None:
|
22 |
if item is None:
|
| Line 177... |
Line 178... |
| 177 |
def to_t_uri_mapping(uriMapping):
|
178 |
def to_t_uri_mapping(uriMapping):
|
| 178 |
t_uri_mapping =TBannerUriMapping()
|
179 |
t_uri_mapping =TBannerUriMapping()
|
| 179 |
t_uri_mapping.bannerName = uriMapping.bannerName
|
180 |
t_uri_mapping.bannerName = uriMapping.bannerName
|
| 180 |
t_uri_mapping.uri = uriMapping.uri
|
181 |
t_uri_mapping.uri = uriMapping.uri
|
| 181 |
t_uri_mapping.isActive = uriMapping.isActive
|
182 |
t_uri_mapping.isActive = uriMapping.isActive
|
| - |
|
183 |
t_uri_mapping.target = uriMapping.target
|
| 182 |
return t_uri_mapping
|
184 |
return t_uri_mapping
|
| 183 |
|
185 |
|
| 184 |
def to_t_campaign(campaign):
|
186 |
def to_t_campaign(campaign):
|
| 185 |
t_campaign = TCampaign()
|
187 |
t_campaign = TCampaign()
|
| 186 |
t_campaign.id = campaign.id
|
188 |
t_campaign.id = campaign.id
|
| Line 353... |
Line 355... |
| 353 |
|
355 |
|
| 354 |
def to_t_flipkart_item(flipkartItem):
|
356 |
def to_t_flipkart_item(flipkartItem):
|
| 355 |
t_flipkartitem = TFlipkartItem()
|
357 |
t_flipkartitem = TFlipkartItem()
|
| 356 |
if flipkartItem is None:
|
358 |
if flipkartItem is None:
|
| 357 |
return t_flipkartitem
|
359 |
return t_flipkartitem
|
| 358 |
t_flipkartitem.item_id = flipkartItem.item_id
|
360 |
t_flipkartitem.item_id = flipkartItem[0].item_id
|
| 359 |
t_flipkartitem.exceptionPrice = flipkartItem.exceptionPrice
|
361 |
t_flipkartitem.exceptionPrice = flipkartItem[0].exceptionPrice
|
| 360 |
t_flipkartitem.warehouseId = flipkartItem.warehouseId
|
362 |
t_flipkartitem.warehouseId = flipkartItem[0].warehouseId
|
| 361 |
t_flipkartitem.commissionValue = flipkartItem.commissionValue
|
363 |
t_flipkartitem.commissionValue = flipkartItem[0].commissionValue
|
| 362 |
t_flipkartitem.serviceTaxValue = flipkartItem.serviceTaxValue
|
364 |
t_flipkartitem.serviceTaxValue = flipkartItem[0].serviceTaxValue
|
| 363 |
t_flipkartitem.maxNlc = flipkartItem.maxNlc
|
365 |
t_flipkartitem.maxNlc = flipkartItem[0].maxNlc
|
| 364 |
t_flipkartitem.skuAtFlipkart = flipkartItem.skuAtFlipkart
|
366 |
t_flipkartitem.skuAtFlipkart = flipkartItem[0].skuAtFlipkart
|
| 365 |
t_flipkartitem.isListedOnFlipkart = flipkartItem.isListedOnFlipkart
|
367 |
t_flipkartitem.isListedOnFlipkart = flipkartItem[0].isListedOnFlipkart
|
| 366 |
t_flipkartitem.suppressPriceFeed = flipkartItem.suppressPriceFeed
|
368 |
t_flipkartitem.suppressPriceFeed = flipkartItem[0].suppressPriceFeed
|
| 367 |
t_flipkartitem.suppressInventoryFeed = flipkartItem.suppressInventoryFeed
|
369 |
t_flipkartitem.suppressInventoryFeed = flipkartItem[0].suppressInventoryFeed
|
| 368 |
t_flipkartitem.updatedOn = to_java_date(flipkartItem.updatedOn)
|
370 |
#t_flipkartitem.updatedOn = to_java_date(flipkartItem.updatedOn)
|
| 369 |
t_flipkartitem.updatedBy = flipkartItem.updatedBy
|
371 |
t_flipkartitem.updatedBy = flipkartItem[0].updatedBy
|
| - |
|
372 |
t_flipkartitem.flipkartSerialNumber = flipkartItem[0].flipkartSerialNumber
|
| 370 |
return t_flipkartitem
|
373 |
return t_flipkartitem
|
| 371 |
|
- |
|
| 372 |
|
374 |
|
| - |
|
375 |
def to_t_flipkart_item_details(flipkartitem,flipkartItemInventory):
|
| 373 |
|
376 |
if flipkartitem is None:
|
| - |
|
377 |
t_flipkart_item_details = TFlipkartItemDetails()
|
| 374 |
|
378 |
return t_flipkart_item_details
|
| 375 |
|
- |
|
| - |
|
379 |
t_flipkart_item_details = TFlipkartItemDetails()
|
| - |
|
380 |
t_flipkart_item_details.item_id = flipkartitem[0].item_id
|
| - |
|
381 |
t_flipkart_item_details.warehouseId = flipkartitem[0].warehouseId
|
| - |
|
382 |
t_flipkart_item_details.exceptionPrice = flipkartitem[0].exceptionPrice
|
| - |
|
383 |
t_flipkart_item_details.commission = flipkartitem[0].commissionValue
|
| - |
|
384 |
t_flipkart_item_details.serviceTax = flipkartitem[0].serviceTaxValue
|
| - |
|
385 |
t_flipkart_item_details.brand = flipkartitem[1].brand
|
| - |
|
386 |
t_flipkart_item_details.model_name = flipkartitem[1].model_name
|
| - |
|
387 |
t_flipkart_item_details.model_number = flipkartitem[1].model_number
|
| - |
|
388 |
t_flipkart_item_details.color = flipkartitem[1].color
|
| - |
|
389 |
t_flipkart_item_details.risky = flipkartitem[1].risky
|
| - |
|
390 |
t_flipkart_item_details.itemStatus = flipkartitem[1].status
|
| - |
|
391 |
t_flipkart_item_details.isListedOnFlipkart = flipkartitem[0].isListedOnFlipkart
|
| - |
|
392 |
t_flipkart_item_details.weight = flipkartitem[1].weight
|
| - |
|
393 |
t_flipkart_item_details.mrp = flipkartitem[1].mrp
|
| - |
|
394 |
t_flipkart_item_details.websiteSellingPrice = flipkartitem[1].sellingPrice
|
| - |
|
395 |
t_flipkart_item_details.suppressPriceFeed = flipkartitem[0].suppressPriceFeed
|
| - |
|
396 |
t_flipkart_item_details.suppressInventoryFeed = flipkartitem[0].suppressInventoryFeed
|
| - |
|
397 |
t_flipkart_item_details.maxNlc = flipkartitem[0].maxNlc
|
| - |
|
398 |
t_flipkart_item_details.skuAtFlipkart = flipkartitem[0].skuAtFlipkart
|
| - |
|
399 |
t_flipkart_item_details.flipkartSerialNumber = flipkartitem[0].flipkartSerialNumber
|
| 376 |
|
400 |
if flipkartItemInventory is not None:
|
| - |
|
401 |
t_flipkart_item_details.lastUpdatedInventory = flipkartItemInventory.availability
|
| - |
|
402 |
#t_flipkart_item_details.lastUpdatedInventoryTimestamp = flipkartItemInventory.lastUpdatedOnFlipkart
|
| 377 |
|
403 |
return t_flipkart_item_details
|
| 378 |
|
404 |
|
| 379 |
|
405 |
|