Commit 8c4db3f8 by huangjing

hj

parent 9bda4dd5
...@@ -9,10 +9,10 @@ def talk(recommendId): ...@@ -9,10 +9,10 @@ def talk(recommendId):
cur = connection.cursor() cur = connection.cursor()
try: try:
list_test=[] list_test=[]
update_sql='UPDATE talking t1 ,tj_recommend_do_status t2 set t1.recommendId=t2.recommend_id where t1.recommend_product=t2.product_name' update_sql='UPDATE tj_talking t1 ,tj_recommend_do_status t2 set t1.recommendId=t2.recommend_id where t1.recommend_product=t2.product_name'
cur.execute(update_sql) cur.execute(update_sql)
connection.commit() connection.commit()
select_sql='select start_text,res_text,mq_text,end_text from talking where recommendId="%s"'%(recommendId) select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommendId="%s"'%(recommendId)
cur.execute(select_sql) cur.execute(select_sql)
s=cur.fetchone() s=cur.fetchone()
for i in range(0,len(s)): for i in range(0,len(s)):
...@@ -31,7 +31,7 @@ def talkName(recommend_product): ...@@ -31,7 +31,7 @@ def talkName(recommend_product):
cur = connection.cursor() cur = connection.cursor()
try: try:
list_test=[] list_test=[]
select_sql='select start_text,res_text,mq_text,end_text from talking where recommend_product="%s"'%(recommend_product) select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s"'%(recommend_product)
cur.execute(select_sql) cur.execute(select_sql)
s=cur.fetchone() s=cur.fetchone()
for i in range(0,len(s)): for i in range(0,len(s)):
......
...@@ -20,7 +20,7 @@ class Recom: ...@@ -20,7 +20,7 @@ class Recom:
behavior_json = {} behavior_json = {}
behavior_json['num'] = num behavior_json['num'] = num
behavior_json['goods_name'] = item['product_name'] behavior_json['goods_name'] = item['product_name']
behavior_json['purchase_date'] = item['order_add_time'] behavior_json['purchase_date'] = str(item['order_add_time'])
behavior_json['contract_amount'] = item['order_pay'] behavior_json['contract_amount'] = item['order_pay']
behavior_json['source'] = item['source'] behavior_json['source'] = item['source']
behavior_json['company_name'] = company_name behavior_json['company_name'] = company_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment