| Line 17... |
Line 17... |
| 17 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
17 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
| 18 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
18 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
| 19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
| 20 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
20 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
| 21 |
PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
|
21 |
PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
|
| 22 |
SnapdealItemUpdateHistory
|
22 |
SnapdealItemUpdateHistory, ProductFeedSubmit
|
| 23 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
23 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
| 24 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, \
|
24 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, \
|
| 25 |
StorePricing as tStorePricing, CatalogServiceException, \
|
25 |
StorePricing as tStorePricing, CatalogServiceException, \
|
| 26 |
BannerType, InsurerType
|
26 |
BannerType, InsurerType
|
| 27 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
27 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
| Line 2222... |
Line 2222... |
| 2222 |
if snapdeal_item is not None:
|
2222 |
if snapdeal_item is not None:
|
| 2223 |
item = session.query(SnapdealItem,Item).join((Item,SnapdealItem.item_id==Item.id)).filter(SnapdealItem.item_id==snapdeal_item.item_id).first()
|
2223 |
item = session.query(SnapdealItem,Item).join((Item,SnapdealItem.item_id==Item.id)).filter(SnapdealItem.item_id==snapdeal_item.item_id).first()
|
| 2224 |
else:
|
2224 |
else:
|
| 2225 |
return None
|
2225 |
return None
|
| 2226 |
return item
|
2226 |
return item
|
| 2227 |
|
- |
|
| 2228 |
|
- |
|
| 2229 |
|
2227 |
|
| - |
|
2228 |
def get_product_feed_submit(catalog_itemId):
|
| - |
|
2229 |
product_feedsubmit = ProductFeedSubmit.get_by(catalogItemId=catalog_itemId)
|
| - |
|
2230 |
return product_feedsubmit
|
| - |
|
2231 |
|
| - |
|
2232 |
def add_product_feed_submit(productFeedSubmit):
|
| - |
|
2233 |
feedSubmit = ProductFeedSubmit()
|
| - |
|
2234 |
feedSubmit.catalogItemId = productFeedSubmit.catalogItemId
|
| - |
|
2235 |
feedSubmit.stockLinkedFeed = productFeedSubmit.stockLinkedFeed
|
| - |
|
2236 |
session.commit()
|
| 2230 |
|
2237 |
return True
|
| - |
|
2238 |
|
| - |
|
2239 |
def update_product_feed_submit(productFeedSubmit):
|
| - |
|
2240 |
feedSubmit = get_product_feed_submit(productFeedSubmit.catalogItemId)
|
| - |
|
2241 |
if feedSubmit:
|
| - |
|
2242 |
feedSubmit.catalogItemId = productFeedSubmit.catalogItemId
|
| - |
|
2243 |
feedSubmit.stockLinkedFeed = productFeedSubmit.stockLinkedFeed
|
| - |
|
2244 |
session.commit()
|
| - |
|
2245 |
return True
|
| - |
|
2246 |
return False
|
| - |
|
2247 |
|
| - |
|
2248 |
def delete_product_feed_submit(catalog_itemId):
|
| - |
|
2249 |
feedSubmit = get_product_feed_submit(catalog_itemId)
|
| - |
|
2250 |
if feedSubmit:
|
| - |
|
2251 |
feedSubmit.delete()
|
| - |
|
2252 |
session.commit()
|
| - |
|
2253 |
return True
|
| - |
|
2254 |
return False
|
| - |
|
2255 |
|
| - |
|
2256 |
def get_all_product_feed_submit():
|
| - |
|
2257 |
print session.query(ProductFeedSubmit).all()
|
| - |
|
2258 |
return session.query(ProductFeedSubmit).all()
|
| 2231 |
|
2259 |
|