table_name='jd_analytic_promo_deduction', num_cols=len(vlist[0]), value_list=vlist, is_many=True, need_history=False, sql_create_table=sql_cb_deduction, ) logging.debug("code = 19, cases = %s" %num_19 ) logging.debug("rows to insert = %s" %len(vlist19) ) pret19 = crawler_helper.persist_db_history_and_lastest_empty_first( table_name='jd_analytic_promo_discount', num_cols=len(vlist19[0]), value_list=vlist19, is_many=True, need_history=False, sql_create_table=sql_cb_discount, ) return _generate_mixed_ret([pret15, pret19]) if __name__ == "__main__": from tasks import task_logging task_logging.configLogging('debug_promo_item_trans') # print(processItemPromo()) # print(process_gift_value()) print(process_promo_detail()) pass
final_discount float DEFAULT NULL, total_discount_rate float DEFAULT NULL, activity_discount_rate float DEFAULT NULL, worthy_value1 float DEFAULT NULL, sample_count int(11) DEFAULT NULL, catalog_id bigint(20) DEFAULT NULL, catalog_name varchar(255) DEFAULT NULL, min_price_reached tinyint(4) NOT NULL, this_update_date date NOT NULL, min_ratio float NOT NULL, LPDR float NOT NULL, PRIMARY KEY (sku_id), KEY sku (sku_id), KEY worthy1 (worthy_value1), KEY cur_price (current_price), KEY cataid (catalog_id), KEY stock_a (a) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 """ % tbl_name ) return sqlcb if __name__ == "__main__": from tasks import task_logging task_logging.configLogging("worthy_mix") print generate_worthy_mix_main() print int(time.time())
table_name='jd_analytic_promo_deduction', num_cols=len(vlist[0]), value_list=vlist, is_many=True, need_history=False, sql_create_table=sql_cb_deduction, ) logging.debug("code = 19, cases = %s" % num_19) logging.debug("rows to insert = %s" % len(vlist19)) pret19 = crawler_helper.persist_db_history_and_lastest_empty_first( table_name='jd_analytic_promo_discount', num_cols=len(vlist19[0]), value_list=vlist19, is_many=True, need_history=False, sql_create_table=sql_cb_discount, ) return _generate_mixed_ret([pret15, pret19]) if __name__ == "__main__": from tasks import task_logging task_logging.configLogging('debug_promo_item_trans') # print(processItemPromo()) # print(process_gift_value()) print(process_promo_detail()) pass