ソースを参照

新增自动流转到会话池功能

dxc 2 年 前
コミット
1f07f6402d
共有1 個のファイルを変更した6 個の追加0 個の削除を含む
  1. 6 0
      internal/logic/callback/callbackmsglogic.go

+ 6 - 0
internal/logic/callback/callbackmsglogic.go

@@ -271,6 +271,12 @@ func msgTypeTextHandle(svcCtx *svc.ServiceContext, msg *model.CbMsg) {
 		if err != nil {
 			logx.Error("UpdateSessionState fail ", err)
 		}
+		//获取会话状态
+		err, sessionState := svcCtx.WxApi.GetSessionState(msg.OpenKfid, msg.ExternalUserid)
+		if err != nil {
+			logx.Error("GetSessionState fail ", err)
+		}
+		_ = svcCtx.Redis.Set(key, fmt.Sprintf("%v", sessionState.ServiceState))
 		return
 	}
 	return