|
@@ -125,7 +125,6 @@ def tell():
|
|
|
# 查询
|
|
|
exists_body = Customer.query.filter(Customer.unique_id == unique_id).first()
|
|
|
if not exists_body:
|
|
|
- body["createTime"] = body["lastUpdateTime"]
|
|
|
state = insert_body(body)
|
|
|
body["logCreateTime"] = body["lastUpdateTime"]
|
|
|
body["updateStatus"] = 1 if state else 0
|
|
@@ -155,14 +154,10 @@ def tell():
|
|
|
return "200"
|
|
|
|
|
|
|
|
|
-@app.route('/', methods=['POST'])
|
|
|
-def tell():
|
|
|
- pass
|
|
|
-
|
|
|
|
|
|
@app.route('/voice', methods=['GET'])
|
|
|
def voice_sync():
|
|
|
- time_dict = {"Ring": "time", "RingingTime": "time", "Begin": "time", 'End': "time", 'QueueTime': "time"}
|
|
|
+ time_dict = {"Ring": "time", "RingingTime": "time", "Begin": "time", 'End': "time", 'QueueTime': "time","CallTimeLength":"int"}
|
|
|
if request.method == 'GET':
|
|
|
body = dict(request.args)
|
|
|
is_real = verify_code(body)
|
|
@@ -184,7 +179,8 @@ def voice_sync():
|
|
|
setattr(call, "createTime", this_time)
|
|
|
for attr_key, value in body.items():
|
|
|
if attr_key in CallRecords.__dict__:
|
|
|
- value = value.strip()
|
|
|
+ if attr_key !="CallTimeLength":
|
|
|
+ value = value.strip()
|
|
|
setattr(call, attr_key, value)
|
|
|
state = insert2db(call, f"语音同步失败-->{call_sheet_id}")
|
|
|
if not state:
|