Error code standardization

This commit is contained in:
skiffer-git
2023-02-22 12:17:59 +08:00
parent cd00d91eee
commit 28fb738410
6 changed files with 66 additions and 262 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ import (
)
type userServer struct {
controller.UserInterface
controller.UserDatabase
notification *notification.Check
userCheck *check.UserCheck
ConversationChecker *check.ConversationChecker
@@ -38,7 +38,7 @@ func Start(client *openKeeper.ZkClient, server *grpc.Server) error {
return err
}
u := &userServer{
UserInterface: controller.NewUserController(controller.NewUserDatabase(relation.NewUserGorm(gormDB))),
UserDatabase: controller.NewUserDatabase(relation.NewUserGorm(gormDB)),
notification: notification.NewCheck(client),
userCheck: check.NewUserCheck(client),
RegisterCenter: client,
@@ -51,7 +51,7 @@ func Start(client *openKeeper.ZkClient, server *grpc.Server) error {
for k, v := range config.Config.Manager.AppManagerUid {
users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k]})
}
u.UserInterface.InitOnce(context.Background(), users)
u.UserDatabase.InitOnce(context.Background(), users)
return nil
}