Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release

This commit is contained in:
wangchuxiao
2022-09-01 21:18:46 +08:00
14 changed files with 217 additions and 199 deletions
+10
View File
@@ -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()
}
+1
View File
@@ -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())