fix: user app_manger_level (#584)

Signed-off-by: withchao <993506633@qq.com>
pull/602/head
withchao 1 year ago committed by GitHub
parent c2a848a89e
commit 5cb5de4970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,7 +67,7 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
return errors.New("len(config.Config.Manager.AppManagerUid) != len(config.Config.Manager.Nickname)")
}
for k, v := range config.Config.Manager.UserID {
users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k]})
users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k], AppMangerLevel: constant.AppAdmin})
}
userDB := relation.NewUserGorm(db)
cache := cache.NewUserCacheRedis(rdb, userDB, cache.GetDefaultOpt())

@ -29,7 +29,7 @@ type UserModel struct {
FaceURL string `gorm:"column:face_url;size:255"`
Ex string `gorm:"column:ex;size:1024"`
CreateTime time.Time `gorm:"column:create_time;index:create_time;autoCreateTime"`
AppMangerLevel int32 `gorm:"column:app_manger_level;default:18"`
AppMangerLevel int32 `gorm:"column:app_manger_level;default:1"`
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"`
}

Loading…
Cancel
Save