This commit is contained in:
wangchuxiao 2022-06-06 23:27:16 +08:00
parent f8b4cbcc13
commit 34c091f232
2 changed files with 21 additions and 3 deletions

View File

@ -10,12 +10,15 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"github.com/garyburd/redigo/redis" "github.com/garyburd/redigo/redis"
//goRedis "github.com/go-redis/redis/v8" //goRedis "github.com/go-redis/redis/v8"
"github.com/golang/protobuf/proto"
"github.com/mitchellh/mapstructure"
"strconv" "strconv"
"time" "time"
"github.com/golang/protobuf/proto"
"github.com/mitchellh/mapstructure"
) )
//func (d * DataBases)pubMessage(channel, msg string) { //func (d * DataBases)pubMessage(channel, msg string) {
@ -177,5 +180,18 @@ func (d *DataBases) GetAvailableSignalInvitationInfo(userID string) (invitationI
} }
log2.NewDebug("", utils.GetSelfFuncName(), result, result.String()) log2.NewDebug("", utils.GetSelfFuncName(), result, result.String())
invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(key) invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(key)
return invitationInfo, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID") if err != nil {
return nil, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID")
}
err = d.delUserSingalList(userID)
if err != nil {
return nil, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID")
}
return invitationInfo, nil
}
func (d *DataBases) delUserSingalList(userID string) error {
keyList := SignalListCache + userID
err := d.rdb.Del(context.Background(), keyList).Err()
return err
} }

View File

@ -11,9 +11,11 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/garyburd/redigo/redis" "github.com/garyburd/redigo/redis"
"github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
//osconfig "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha" //osconfig "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha"
"strconv" "strconv"
) )