Browse Source

升级

master
huangjiajun 4 days ago
parent
commit
b7475644fe
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      consume/egg_canal_user_down_consume.go

+ 10
- 2
consume/egg_canal_user_down_consume.go View File

@@ -58,11 +58,19 @@ func handleEggCanalUserDownConsume(msgData []byte) error {
engine := db.Db
NewUserDb := implement.NewUserDb(engine)
user, _ := NewUserDb.GetUser(utils.StrToInt64(msg.Uid))
if user == nil {
return nil
}
levelDb := implement.NewUserLevelDb(engine)
levelAll, _ := levelDb.UserLevelAllByAsc()
level := 1
if len(levelAll) > 0 {
level = levelAll[0].Id
if len(levelAll) == 0 {
return nil

}
level = levelAll[0].Id
if levelAll[0].Id == user.Level {
return nil
}
sort.Slice(levelAll, func(i, j int) bool {
return levelAll[i].LevelWeight > levelAll[j].LevelWeight


Loading…
Cancel
Save