def last_update_date(): """ :return: """ sql = 'SELECT MAX(last_update_date) as last_update_date FROM t_stamps_amazon ' return db_sales.item_dict(sql)
def order_item(order, orderitem): sql = "select amazon_order_id from t_stamps_amazon_item " \ " where amazon_order_id='%s' and seller_id='%s' and amazon_marketplaceid='%s'" \ " and seller_sku='%s' " % (order.amazon_order_id, order.sellerid, order.marketplaceid, orderitem.seller_sku) return db_sales.item_dict(sql)
def stamp_order(amazon_id, sellerid): sql = "select amazon_id, amazon_order_id, marketplace_id,last_update_date, order_status from t_stamps_amazon " \ "where amazon_order_id='%s' and seller_id='%s'" % (amazon_id, sellerid) return db_sales.item_dict(sql)
def shop(seller_id): sql = "SELECT shop_id, seller_id FROM `t_amazon_shop` where seller_id = '%s'" % seller_id return db_sales.item_dict(sql)
def marketplace(seller_id, marketplaceid): sql = "select marketplace_id, amazon_shop_id, seller_id, amazon_marketplaceid from t_amazon_marketplace " \ "where seller_id='%s' and amazon_marketplaceid='%s' " % (seller_id, marketplaceid) return db_sales.item_dict(sql)
def get_shop_product(seller_id, marketplaceid, seller_sku): sql = "select shop_product_id, seller_id, amazon_marketplaceid, seller_sku from t_amazon_shop_product " \ " where seller_id='%s' and amazon_marketplaceid='%s' and seller_sku='%s' " % (seller_id, marketplaceid, seller_sku) return db_sales.item_dict(sql)