|
@@ -149,29 +149,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 根据任务ID查询执行记录列表 -->
|
|
<!-- 根据任务ID查询执行记录列表 -->
|
|
|
- <select id="selectExecRecordsByRoboticId" resultType="com.fs.company.vo.WorkflowExecRecordVo">
|
|
|
|
|
|
|
+<!-- <select id="selectExecRecordsByRoboticId" resultType="com.fs.company.vo.WorkflowExecRecordVo">-->
|
|
|
|
|
+<!-- SELECT-->
|
|
|
|
|
+<!-- b.id AS businessId,-->
|
|
|
|
|
+<!-- b.robotic_id AS roboticId,-->
|
|
|
|
|
+<!-- b.callee_id AS calleeId,-->
|
|
|
|
|
+<!-- c.user_id AS customerId,-->
|
|
|
|
|
+<!-- c.user_name AS customerName,-->
|
|
|
|
|
+<!-- c.phone AS customerPhone,-->
|
|
|
|
|
+<!-- b.wx_client_id AS wxClientId,-->
|
|
|
|
|
+<!-- e.workflow_instance_id AS workflowInstanceId,-->
|
|
|
|
|
+<!-- e.status AS workflowStatus,-->
|
|
|
|
|
+<!-- e.current_node_key AS currentNodeKey,-->
|
|
|
|
|
+<!-- e.current_node_name AS currentNodeName,-->
|
|
|
|
|
+<!-- e.current_node_type AS currentNodeType,-->
|
|
|
|
|
+<!-- e.start_time AS startTime,-->
|
|
|
|
|
+<!-- e.last_update_time AS lastUpdateTime,-->
|
|
|
|
|
+<!-- b.add_wx_done AS addWxDone,-->
|
|
|
|
|
+<!-- b.call_phone_done AS callPhoneDone,-->
|
|
|
|
|
+<!-- b.send_msg_done AS sendMsgDone-->
|
|
|
|
|
+<!-- FROM company_voice_robotic_business b-->
|
|
|
|
|
+<!-- LEFT JOIN company_ai_workflow_exec e ON b.id = e.business_key-->
|
|
|
|
|
+<!-- LEFT JOIN company_voice_robotic_callees c ON b.callee_id = c.id-->
|
|
|
|
|
+<!-- WHERE b.robotic_id = #{roboticId}-->
|
|
|
|
|
+<!-- ORDER BY e.start_time DESC-->
|
|
|
|
|
+<!-- </select>-->
|
|
|
|
|
+ <select id="selectExecRecordsByRoboticId"
|
|
|
|
|
+ resultType="com.fs.company.vo.WorkflowExecRecordVo">
|
|
|
|
|
+
|
|
|
SELECT
|
|
SELECT
|
|
|
- b.id AS businessId,
|
|
|
|
|
- b.robotic_id AS roboticId,
|
|
|
|
|
- b.callee_id AS calleeId,
|
|
|
|
|
- c.user_id AS customerId,
|
|
|
|
|
- c.user_name AS customerName,
|
|
|
|
|
- c.phone AS customerPhone,
|
|
|
|
|
- b.wx_client_id AS wxClientId,
|
|
|
|
|
- e.workflow_instance_id AS workflowInstanceId,
|
|
|
|
|
- e.status AS workflowStatus,
|
|
|
|
|
- e.current_node_key AS currentNodeKey,
|
|
|
|
|
- e.current_node_name AS currentNodeName,
|
|
|
|
|
- e.current_node_type AS currentNodeType,
|
|
|
|
|
- e.start_time AS startTime,
|
|
|
|
|
- e.last_update_time AS lastUpdateTime,
|
|
|
|
|
- b.add_wx_done AS addWxDone,
|
|
|
|
|
- b.call_phone_done AS callPhoneDone,
|
|
|
|
|
- b.send_msg_done AS sendMsgDone
|
|
|
|
|
|
|
+ b.id AS businessId,
|
|
|
|
|
+ b.robotic_id AS roboticId,
|
|
|
|
|
+ b.callee_id AS calleeId,
|
|
|
|
|
+ c.user_id AS customerId,
|
|
|
|
|
+ c.user_name AS customerName,
|
|
|
|
|
+ c.phone AS customerPhone,
|
|
|
|
|
+ b.wx_client_id AS wxClientId,
|
|
|
|
|
+ e.workflow_instance_id AS workflowInstanceId,
|
|
|
|
|
+ e.status AS workflowStatus,
|
|
|
|
|
+ e.current_node_key AS currentNodeKey,
|
|
|
|
|
+ e.current_node_name AS currentNodeName,
|
|
|
|
|
+ e.current_node_type AS currentNodeType,
|
|
|
|
|
+ e.start_time AS startTime,
|
|
|
|
|
+ e.last_update_time AS lastUpdateTime,
|
|
|
|
|
+ b.add_wx_done AS addWxDone,
|
|
|
|
|
+ b.call_phone_done AS callPhoneDone,
|
|
|
|
|
+ b.send_msg_done AS sendMsgDone
|
|
|
FROM company_voice_robotic_business b
|
|
FROM company_voice_robotic_business b
|
|
|
LEFT JOIN company_ai_workflow_exec e ON b.id = e.business_key
|
|
LEFT JOIN company_ai_workflow_exec e ON b.id = e.business_key
|
|
|
LEFT JOIN company_voice_robotic_callees c ON b.callee_id = c.id
|
|
LEFT JOIN company_voice_robotic_callees c ON b.callee_id = c.id
|
|
|
WHERE b.robotic_id = #{roboticId}
|
|
WHERE b.robotic_id = #{roboticId}
|
|
|
|
|
+ <if test="customerName != null and customerName != ''">
|
|
|
|
|
+ AND c.user_name LIKE CONCAT('%', #{customerName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="customerPhone != null and customerPhone != ''">
|
|
|
|
|
+ AND c.phone LIKE CONCAT('%', #{customerPhone}, '%')
|
|
|
|
|
+ </if>
|
|
|
ORDER BY e.start_time DESC
|
|
ORDER BY e.start_time DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|