You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
201 B

package utils
import "fmt"
// 生成通讯会话id,待优化
func GenerateSessionId(a int64, b int64) string {
if a < b {
return fmt.Sprintf("%d%d", a, b)
}
return fmt.Sprintf("%d%d", b, a)
}