diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 93783c8fd..3b54d73eb 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -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()) diff --git a/pkg/common/db/table/relation/user.go b/pkg/common/db/table/relation/user.go index c840f7070..10a715bda 100644 --- a/pkg/common/db/table/relation/user.go +++ b/pkg/common/db/table/relation/user.go @@ -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"` }