feat: rbac迁移完成,并已部署至dev服务器
This commit is contained in:
@@ -14,39 +14,63 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
ClientInfo = system.ClientInfo
|
||||
ClientListReq = system.ClientListReq
|
||||
ClientListResp = system.ClientListResp
|
||||
ClientReq = system.ClientReq
|
||||
ClientUpdateReq = system.ClientUpdateReq
|
||||
CommonResp = system.CommonResp
|
||||
DictInfo = system.DictInfo
|
||||
DictListReq = system.DictListReq
|
||||
DictListResp = system.DictListResp
|
||||
DictReq = system.DictReq
|
||||
DictUpdateReq = system.DictUpdateReq
|
||||
GetClientByIdReq = system.GetClientByIdReq
|
||||
GetClientByIdResp = system.GetClientByIdResp
|
||||
GetMenusByRoleIdReq = system.GetMenusByRoleIdReq
|
||||
GetMenusByRoleIdResp = system.GetMenusByRoleIdResp
|
||||
GetRolesByUserIdReq = system.GetRolesByUserIdReq
|
||||
GetRolesByUserIdResp = system.GetRolesByUserIdResp
|
||||
IdReq = system.IdReq
|
||||
IdsReq = system.IdsReq
|
||||
MenuInfo = system.MenuInfo
|
||||
MenuListResp = system.MenuListResp
|
||||
MenuReq = system.MenuReq
|
||||
MenuUpdateReq = system.MenuUpdateReq
|
||||
OperationRecordInfo = system.OperationRecordInfo
|
||||
OperationRecordListReq = system.OperationRecordListReq
|
||||
OperationRecordListResp = system.OperationRecordListResp
|
||||
RoleInfo = system.RoleInfo
|
||||
RoleListReq = system.RoleListReq
|
||||
RoleListResp = system.RoleListResp
|
||||
RoleReq = system.RoleReq
|
||||
RoleUpdateReq = system.RoleUpdateReq
|
||||
ClientInfo = system.ClientInfo
|
||||
ClientListReq = system.ClientListReq
|
||||
ClientListResp = system.ClientListResp
|
||||
ClientReq = system.ClientReq
|
||||
ClientUpdateReq = system.ClientUpdateReq
|
||||
CommonResp = system.CommonResp
|
||||
CreateOperationRecordReq = system.CreateOperationRecordReq
|
||||
CreateUserReq = system.CreateUserReq
|
||||
CreateUserResp = system.CreateUserResp
|
||||
DeleteUserReq = system.DeleteUserReq
|
||||
DictInfo = system.DictInfo
|
||||
DictListReq = system.DictListReq
|
||||
DictListResp = system.DictListResp
|
||||
DictReq = system.DictReq
|
||||
DictUpdateReq = system.DictUpdateReq
|
||||
GetClientByIdReq = system.GetClientByIdReq
|
||||
GetClientByIdResp = system.GetClientByIdResp
|
||||
GetMenusByRoleIdReq = system.GetMenusByRoleIdReq
|
||||
GetMenusByRoleIdResp = system.GetMenusByRoleIdResp
|
||||
GetRolesByUserIdReq = system.GetRolesByUserIdReq
|
||||
GetRolesByUserIdResp = system.GetRolesByUserIdResp
|
||||
GetUserByIdReq = system.GetUserByIdReq
|
||||
GetUserByIdResp = system.GetUserByIdResp
|
||||
GetUserByOpenIdReq = system.GetUserByOpenIdReq
|
||||
GetUserByOpenIdResp = system.GetUserByOpenIdResp
|
||||
GetUserListReq = system.GetUserListReq
|
||||
GetUserListResp = system.GetUserListResp
|
||||
IdReq = system.IdReq
|
||||
IdsReq = system.IdsReq
|
||||
LoginByAccountReq = system.LoginByAccountReq
|
||||
LoginByAccountResp = system.LoginByAccountResp
|
||||
MenuInfo = system.MenuInfo
|
||||
MenuListResp = system.MenuListResp
|
||||
MenuReq = system.MenuReq
|
||||
MenuUpdateReq = system.MenuUpdateReq
|
||||
OperationRecordInfo = system.OperationRecordInfo
|
||||
OperationRecordListReq = system.OperationRecordListReq
|
||||
OperationRecordListResp = system.OperationRecordListResp
|
||||
ResetPasswordReq = system.ResetPasswordReq
|
||||
RoleInfo = system.RoleInfo
|
||||
RoleListReq = system.RoleListReq
|
||||
RoleListResp = system.RoleListResp
|
||||
RoleReq = system.RoleReq
|
||||
RoleUpdateReq = system.RoleUpdateReq
|
||||
UpdateUserReq = system.UpdateUserReq
|
||||
UserInfo = system.UserInfo
|
||||
|
||||
SystemService interface {
|
||||
// --- 用户 ---
|
||||
GetUserById(ctx context.Context, in *GetUserByIdReq, opts ...grpc.CallOption) (*GetUserByIdResp, error)
|
||||
GetUserByOpenId(ctx context.Context, in *GetUserByOpenIdReq, opts ...grpc.CallOption) (*GetUserByOpenIdResp, error)
|
||||
LoginByAccount(ctx context.Context, in *LoginByAccountReq, opts ...grpc.CallOption) (*LoginByAccountResp, error)
|
||||
CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserResp, error)
|
||||
UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetUserList(ctx context.Context, in *GetUserListReq, opts ...grpc.CallOption) (*GetUserListResp, error)
|
||||
DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
ResetPassword(ctx context.Context, in *ResetPasswordReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
// --- 角色 ---
|
||||
GetRolesByUserId(ctx context.Context, in *GetRolesByUserIdReq, opts ...grpc.CallOption) (*GetRolesByUserIdResp, error)
|
||||
CreateRole(ctx context.Context, in *RoleReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
@@ -71,6 +95,7 @@ type (
|
||||
DeleteDict(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetDictList(ctx context.Context, in *DictListReq, opts ...grpc.CallOption) (*DictListResp, error)
|
||||
// --- 操作日志 ---
|
||||
CreateOperationRecord(ctx context.Context, in *CreateOperationRecordReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
DeleteOperationRecord(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetOperationRecordList(ctx context.Context, in *OperationRecordListReq, opts ...grpc.CallOption) (*OperationRecordListResp, error)
|
||||
}
|
||||
@@ -86,6 +111,47 @@ func NewSystemService(cli zrpc.Client) SystemService {
|
||||
}
|
||||
}
|
||||
|
||||
// --- 用户 ---
|
||||
func (m *defaultSystemService) GetUserById(ctx context.Context, in *GetUserByIdReq, opts ...grpc.CallOption) (*GetUserByIdResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.GetUserById(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) GetUserByOpenId(ctx context.Context, in *GetUserByOpenIdReq, opts ...grpc.CallOption) (*GetUserByOpenIdResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.GetUserByOpenId(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) LoginByAccount(ctx context.Context, in *LoginByAccountReq, opts ...grpc.CallOption) (*LoginByAccountResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.LoginByAccount(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.CreateUser(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.UpdateUser(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) GetUserList(ctx context.Context, in *GetUserListReq, opts ...grpc.CallOption) (*GetUserListResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.GetUserList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.DeleteUser(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) ResetPassword(ctx context.Context, in *ResetPasswordReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.ResetPassword(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// --- 角色 ---
|
||||
func (m *defaultSystemService) GetRolesByUserId(ctx context.Context, in *GetRolesByUserIdReq, opts ...grpc.CallOption) (*GetRolesByUserIdResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
@@ -186,6 +252,11 @@ func (m *defaultSystemService) GetDictList(ctx context.Context, in *DictListReq,
|
||||
}
|
||||
|
||||
// --- 操作日志 ---
|
||||
func (m *defaultSystemService) CreateOperationRecord(ctx context.Context, in *CreateOperationRecordReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.CreateOperationRecord(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultSystemService) DeleteOperationRecord(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := system.NewSystemServiceClient(m.cli.Conn())
|
||||
return client.DeleteOperationRecord(ctx, in, opts...)
|
||||
|
||||
Reference in New Issue
Block a user