Explorar o código

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

dxc %!s(int64=2) %!d(string=hai) anos
pai
achega
1f07f6402d
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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