Commit 7d76e403 by huangjing

hj

parent 593f4369
...@@ -11,9 +11,11 @@ def talk(recommendId): ...@@ -11,9 +11,11 @@ def talk(recommendId):
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 talking t1 ,tj_recommend_do_status t2 set t1.recommendId=t2.recommend_id where t1.recommend_product=t2.product_name'
print(update_sql,"==============根据id查询话术,update_sql")
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 talking where recommendId="%s"'%(recommendId)
print(select_sql,"=======根据id查询话术")
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)):
...@@ -30,6 +32,7 @@ def talkName(recommend_product): ...@@ -30,6 +32,7 @@ def talkName(recommend_product):
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 talking where recommend_product="%s"'%(recommend_product)
print(select_sql,"==============查询话术")
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)):
...@@ -48,6 +51,7 @@ def talking(server): ...@@ -48,6 +51,7 @@ def talking(server):
def SingleLogoApi(): def SingleLogoApi():
try: try:
recommendId = request.get_json().get("recommendId") recommendId = request.get_json().get("recommendId")
print(recommendId,"=======获取recommendId")
isSuss, talkings = talk(recommendId) isSuss, talkings = talk(recommendId)
if isSuss: if isSuss:
return json.dumps({"status": 0, "msg": "成功", "data": talkings}, ensure_ascii=False) return json.dumps({"status": 0, "msg": "成功", "data": talkings}, ensure_ascii=False)
......
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