mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 18:15:59 +08:00
Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
This commit is contained in:
@@ -37,6 +37,7 @@ const (
|
||||
groupMaxSeq = "GROUP_MAX_SEQ:"
|
||||
groupMinSeq = "GROUP_MIN_SEQ:"
|
||||
sendMsgFailedFlag = "SEND_MSG_FAILED_FLAG:"
|
||||
userBadgeUnreadCountSum = "USER_BADGE_UNREAD_COUNT_SUM:"
|
||||
)
|
||||
|
||||
func (d *DataBases) JudgeAccountEXISTS(account string) (bool, error) {
|
||||
@@ -411,3 +412,12 @@ func (d *DataBases) GetFcmToken(account string, platformid int) (string, error)
|
||||
key := FcmToken + account + ":" + strconv.Itoa(platformid)
|
||||
return d.RDB.Get(context.Background(), key).Result()
|
||||
}
|
||||
func (d *DataBases) IncrUserBadgeUnreadCountSum(uid string) (int, error) {
|
||||
key := userBadgeUnreadCountSum + uid
|
||||
seq, err := d.RDB.Incr(context.Background(), key).Result()
|
||||
return int(seq), err
|
||||
}
|
||||
func (d *DataBases) SetUserBadgeUnreadCountSum(uid string, value int) error {
|
||||
key := userBadgeUnreadCountSum + uid
|
||||
return d.RDB.Set(context.Background(), key, value, 0).Err()
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ func loggerInit(moduleName string) *Logger {
|
||||
//All logs will be printed
|
||||
logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel))
|
||||
//Close std console output
|
||||
//os.O_WRONLY | os.O_CREATE | os.O_APPEND
|
||||
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user