Commit 1af66c37 authored by haoyanbin's avatar haoyanbin

1

parent 206bf171
...@@ -491,9 +491,8 @@ func GetAllList(key string) map[string]string { ...@@ -491,9 +491,8 @@ func GetAllList(key string) map[string]string {
} }
func AppendConversationRecord(msg *SetMsgReq) { func AppendConversationRecord(msg *SetMsgReq) {
msg.Sender = StrCut(msg.Sender) Redis.HSetNX("msg:"+strconv.Itoa(msg.ConversationId), StrCut(msg.Sender)+":"+StrCut(msg.Receiver)+":"+msg.SendTime, string(SerializeJson(msg)))
msg.Receiver = StrCut(msg.Receiver) //Redis.Set("msg:"+strconv.Itoa(msg.ConversationId),msg.SendTime,0)
Redis.HSetNX("msg:"+strconv.Itoa(msg.ConversationId), msg.Sender+":"+msg.Receiver+":"+msg.SendTime, string(SerializeJson(msg)))
return return
} }
...@@ -516,6 +515,17 @@ func DelClient(clientId, clientUser string) { ...@@ -516,6 +515,17 @@ func DelClient(clientId, clientUser string) {
return return
} }
func SetDelConversation() {
res := Redis.HKeys("msg*")
data := res.Val()
//fmt.Println(err)
fmt.Println(data)
//for _,v := range data {
// DelConversation()
//}
}
func SetEnd() { func SetEnd() {
//conversationList := GetAllList(convKey) //conversationList := GetAllList(convKey)
//for _, vClients := range conversationList { //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