|
@@ -230,16 +230,16 @@ def get_staff_list():
|
|
|
@app.route("/api/getConversationList", methods=["GET"])
|
|
|
def get_conversation_list():
|
|
|
"""
|
|
|
- 获取staff && customer的 私聊对话列表
|
|
|
+ 获取staff && user 私聊对话列表
|
|
|
:return:
|
|
|
"""
|
|
|
staff_id = request.args.get("staff_id")
|
|
|
- customer_id = request.args.get("customer_id")
|
|
|
- if not staff_id or not customer_id:
|
|
|
- return wrap_response(404, msg="staff_id and customer_id are required")
|
|
|
+ user_id = request.args.get("user_id")
|
|
|
+ if not staff_id or not user_id:
|
|
|
+ return wrap_response(404, msg="staff_id and user_id are required")
|
|
|
|
|
|
page = request.args.get("page")
|
|
|
- response = app.session_manager.get_conversation_list(staff_id, customer_id, page, const.DEFAULT_CONVERSATION_SIZE)
|
|
|
+ response = app.session_manager.get_conversation_list(staff_id, user_id, page, const.DEFAULT_CONVERSATION_SIZE)
|
|
|
return wrap_response(200, data=response)
|
|
|
|
|
|
|
|
@@ -248,19 +248,18 @@ def send_message():
|
|
|
return wrap_response(200, msg="暂不实现功能")
|
|
|
|
|
|
|
|
|
-@app.route("/api/quitHumanInterventionStatus", methods=["GET"])
|
|
|
+@app.route("/api/quitHumanInterventionStatus", methods=["POST"])
|
|
|
def quit_human_interventions_status():
|
|
|
"""
|
|
|
退出人工介入状态
|
|
|
:return:
|
|
|
"""
|
|
|
- staff_id = request.args.get("staff_id")
|
|
|
- customer_id = request.args.get("customer_id")
|
|
|
- # 测试环境: staff_id 强制等于1688854492669990
|
|
|
- staff_id = 1688854492669990
|
|
|
- if not customer_id or not staff_id:
|
|
|
+ req_data = request.json
|
|
|
+ staff_id = req_data["staff_id"]
|
|
|
+ user_id = req_data["user_id"]
|
|
|
+ if not user_id or not staff_id:
|
|
|
return wrap_response(404, msg="user_id and staff_id are required")
|
|
|
- response = quit_human_intervention_status(customer_id, staff_id)
|
|
|
+ response = quit_human_intervention_status(user_id, staff_id)
|
|
|
|
|
|
return wrap_response(200, data=response)
|
|
|
|