Commit 1af66c37 authored by haoyanbin's avatar haoyanbin

1

parent 206bf171
......@@ -491,9 +491,8 @@ func GetAllList(key string) map[string]string {
}
func AppendConversationRecord(msg *SetMsgReq) {
msg.Sender = StrCut(msg.Sender)
msg.Receiver = StrCut(msg.Receiver)
Redis.HSetNX("msg:"+strconv.Itoa(msg.ConversationId), msg.Sender+":"+msg.Receiver+":"+msg.SendTime, string(SerializeJson(msg)))
Redis.HSetNX("msg:"+strconv.Itoa(msg.ConversationId), StrCut(msg.Sender)+":"+StrCut(msg.Receiver)+":"+msg.SendTime, string(SerializeJson(msg)))
//Redis.Set("msg:"+strconv.Itoa(msg.ConversationId),msg.SendTime,0)
return
}
......@@ -516,6 +515,17 @@ func DelClient(clientId, clientUser string) {
return
}
func SetDelConversation() {
res := Redis.HKeys("msg*")
data := res.Val()
//fmt.Println(err)
fmt.Println(data)
//for _,v := range data {
// DelConversation()
//}
}
func SetEnd() {
//conversationList := GetAllList(convKey)
//for _, vClients := range conversationList {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment