Commit 3a08cfb0 by 黄静

hj

parent 78511aa5
...@@ -52,9 +52,8 @@ def talk(recommendId,source): ...@@ -52,9 +52,8 @@ def talk(recommendId,source):
print(source ,'------------------') print(source ,'------------------')
sa=list(source) sa=list(source)
print(sa) print(sa)
if source != '钉钉' and sa [0]!='阿' and sa[1] != '里' : if source == '钉钉' and sa [0] =='阿' and sa[1] == '里' :
print('1') select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s" and id<6000'%(name)
select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s" and id>6000'%(name)
# select_sql='select mq_text from tj_talking where id>6000' # select_sql='select mq_text from tj_talking where id>6000'
cur.execute(select_sql) cur.execute(select_sql)
print(select_sql) print(select_sql)
...@@ -72,8 +71,7 @@ def talk(recommendId,source): ...@@ -72,8 +71,7 @@ def talk(recommendId,source):
end_text="好的,老板,公司宝有公司注册、财税代理、知识产权、行业资质认证、薪 税服务、公司交易多达三百余项产品,贵公司在业务开展过程中,如果有其他上述的服务需求,随时欢迎找我们。感谢您的支持。(也可以继续推荐其他套餐)" end_text="好的,老板,公司宝有公司注册、财税代理、知识产权、行业资质认证、薪 税服务、公司交易多达三百余项产品,贵公司在业务开展过程中,如果有其他上述的服务需求,随时欢迎找我们。感谢您的支持。(也可以继续推荐其他套餐)"
list_test.append(end_text) list_test.append(end_text)
else: else:
print('2') select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s" and id>6000'%name
select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s"'%name
cur.execute(select_sql) cur.execute(select_sql)
print(select_sql) print(select_sql)
s=cur.fetchone() s=cur.fetchone()
...@@ -124,7 +122,9 @@ def talking(server): ...@@ -124,7 +122,9 @@ def talking(server):
try: try:
recommendId = request.get_json().get("recommendId") recommendId = request.get_json().get("recommendId")
name = getName(recommendId) name = getName(recommendId)
# name = 'tttt'
source = getSource(name) source = getSource(name)
print('source',source)
isSuss, talkings = talk(recommendId, source) isSuss, talkings = talk(recommendId, source)
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