diff --git a/doc/运维语句.sql b/doc/运维语句.sql index c81ee8a..e848d92 100644 --- a/doc/运维语句.sql +++ b/doc/运维语句.sql @@ -22,6 +22,13 @@ SELECT opi.OPI_Code, on opi.opi_sn = tpa.TPA_OPI_SN where opi.DeleteFlag = 0 +// 查找没关联订单的会话 +SELECT * +FROM whatsapp_session +WHERE coli_sn = 0 AND last_received_time IS NOT NULL ## AND opi_sn = 599 +ORDER BY last_received_time DESC + + // 查找未分配顾问的会话 SELECT * FROM whatsapp_session @@ -30,4 +37,4 @@ WHERE opi_sn IS null // 查找 WA 号码不一致 SELECT * FROM whatsapp_session -WHERE opi_sn IS null \ No newline at end of file +WHERE whatsapp_phone_number_bak IS not NULL \ No newline at end of file