202 lines
7.4 KiB
Go
202 lines
7.4 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: system.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"sundynix-micro-go/app/system/rpc/internal/logic"
|
|
"sundynix-micro-go/app/system/rpc/internal/svc"
|
|
"sundynix-micro-go/app/system/rpc/system"
|
|
)
|
|
|
|
type SystemServiceServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
system.UnimplementedSystemServiceServer
|
|
}
|
|
|
|
func NewSystemServiceServer(svcCtx *svc.ServiceContext) *SystemServiceServer {
|
|
return &SystemServiceServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// --- 用户 ---
|
|
func (s *SystemServiceServer) GetUserById(ctx context.Context, in *system.GetUserByIdReq) (*system.GetUserByIdResp, error) {
|
|
l := logic.NewGetUserByIdLogic(ctx, s.svcCtx)
|
|
return l.GetUserById(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetUserByOpenId(ctx context.Context, in *system.GetUserByOpenIdReq) (*system.GetUserByOpenIdResp, error) {
|
|
l := logic.NewGetUserByOpenIdLogic(ctx, s.svcCtx)
|
|
return l.GetUserByOpenId(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) LoginByAccount(ctx context.Context, in *system.LoginByAccountReq) (*system.LoginByAccountResp, error) {
|
|
l := logic.NewLoginByAccountLogic(ctx, s.svcCtx)
|
|
return l.LoginByAccount(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) CreateUser(ctx context.Context, in *system.CreateUserReq) (*system.CreateUserResp, error) {
|
|
l := logic.NewCreateUserLogic(ctx, s.svcCtx)
|
|
return l.CreateUser(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) UpdateUser(ctx context.Context, in *system.UpdateUserReq) (*system.CommonResp, error) {
|
|
l := logic.NewUpdateUserLogic(ctx, s.svcCtx)
|
|
return l.UpdateUser(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetUserList(ctx context.Context, in *system.GetUserListReq) (*system.GetUserListResp, error) {
|
|
l := logic.NewGetUserListLogic(ctx, s.svcCtx)
|
|
return l.GetUserList(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetUserDetail(ctx context.Context, in *system.GetUserDetailReq) (*system.UserDetailResp, error) {
|
|
l := logic.NewGetUserDetailLogic(ctx, s.svcCtx)
|
|
return l.GetUserDetail(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteUser(ctx context.Context, in *system.DeleteUserReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteUserLogic(ctx, s.svcCtx)
|
|
return l.DeleteUser(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) ResetPassword(ctx context.Context, in *system.ResetPasswordReq) (*system.CommonResp, error) {
|
|
l := logic.NewResetPasswordLogic(ctx, s.svcCtx)
|
|
return l.ResetPassword(in)
|
|
}
|
|
|
|
// --- 角色 ---
|
|
func (s *SystemServiceServer) GetRolesByUserId(ctx context.Context, in *system.GetRolesByUserIdReq) (*system.GetRolesByUserIdResp, error) {
|
|
l := logic.NewGetRolesByUserIdLogic(ctx, s.svcCtx)
|
|
return l.GetRolesByUserId(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) CreateRole(ctx context.Context, in *system.RoleReq) (*system.CommonResp, error) {
|
|
l := logic.NewCreateRoleLogic(ctx, s.svcCtx)
|
|
return l.CreateRole(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) UpdateRole(ctx context.Context, in *system.RoleUpdateReq) (*system.CommonResp, error) {
|
|
l := logic.NewUpdateRoleLogic(ctx, s.svcCtx)
|
|
return l.UpdateRole(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteRole(ctx context.Context, in *system.IdsReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteRoleLogic(ctx, s.svcCtx)
|
|
return l.DeleteRole(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetRoleList(ctx context.Context, in *system.RoleListReq) (*system.RoleListResp, error) {
|
|
l := logic.NewGetRoleListLogic(ctx, s.svcCtx)
|
|
return l.GetRoleList(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetRoleDetail(ctx context.Context, in *system.GetRoleDetailReq) (*system.RoleDetailResp, error) {
|
|
l := logic.NewGetRoleDetailLogic(ctx, s.svcCtx)
|
|
return l.GetRoleDetail(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) AssignRoleMenus(ctx context.Context, in *system.AssignRoleMenusReq) (*system.CommonResp, error) {
|
|
l := logic.NewAssignRoleMenusLogic(ctx, s.svcCtx)
|
|
return l.AssignRoleMenus(in)
|
|
}
|
|
|
|
// --- RBAC 用户授权 ---
|
|
func (s *SystemServiceServer) AssignUserRoles(ctx context.Context, in *system.AssignUserRolesReq) (*system.CommonResp, error) {
|
|
l := logic.NewAssignUserRolesLogic(ctx, s.svcCtx)
|
|
return l.AssignUserRoles(in)
|
|
}
|
|
|
|
// --- 菜单 ---
|
|
func (s *SystemServiceServer) GetMenusByRoleId(ctx context.Context, in *system.GetMenusByRoleIdReq) (*system.GetMenusByRoleIdResp, error) {
|
|
l := logic.NewGetMenusByRoleIdLogic(ctx, s.svcCtx)
|
|
return l.GetMenusByRoleId(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) CreateMenu(ctx context.Context, in *system.MenuReq) (*system.CommonResp, error) {
|
|
l := logic.NewCreateMenuLogic(ctx, s.svcCtx)
|
|
return l.CreateMenu(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) UpdateMenu(ctx context.Context, in *system.MenuUpdateReq) (*system.CommonResp, error) {
|
|
l := logic.NewUpdateMenuLogic(ctx, s.svcCtx)
|
|
return l.UpdateMenu(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteMenu(ctx context.Context, in *system.IdsReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteMenuLogic(ctx, s.svcCtx)
|
|
return l.DeleteMenu(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetMenuList(ctx context.Context, in *system.IdReq) (*system.MenuListResp, error) {
|
|
l := logic.NewGetMenuListLogic(ctx, s.svcCtx)
|
|
return l.GetMenuList(in)
|
|
}
|
|
|
|
// --- 客户端 ---
|
|
func (s *SystemServiceServer) GetClientById(ctx context.Context, in *system.GetClientByIdReq) (*system.GetClientByIdResp, error) {
|
|
l := logic.NewGetClientByIdLogic(ctx, s.svcCtx)
|
|
return l.GetClientById(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) CreateClient(ctx context.Context, in *system.ClientReq) (*system.CommonResp, error) {
|
|
l := logic.NewCreateClientLogic(ctx, s.svcCtx)
|
|
return l.CreateClient(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) UpdateClient(ctx context.Context, in *system.ClientUpdateReq) (*system.CommonResp, error) {
|
|
l := logic.NewUpdateClientLogic(ctx, s.svcCtx)
|
|
return l.UpdateClient(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteClient(ctx context.Context, in *system.IdsReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteClientLogic(ctx, s.svcCtx)
|
|
return l.DeleteClient(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetClientList(ctx context.Context, in *system.ClientListReq) (*system.ClientListResp, error) {
|
|
l := logic.NewGetClientListLogic(ctx, s.svcCtx)
|
|
return l.GetClientList(in)
|
|
}
|
|
|
|
// --- 字典 ---
|
|
func (s *SystemServiceServer) CreateDict(ctx context.Context, in *system.DictReq) (*system.CommonResp, error) {
|
|
l := logic.NewCreateDictLogic(ctx, s.svcCtx)
|
|
return l.CreateDict(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) UpdateDict(ctx context.Context, in *system.DictUpdateReq) (*system.CommonResp, error) {
|
|
l := logic.NewUpdateDictLogic(ctx, s.svcCtx)
|
|
return l.UpdateDict(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteDict(ctx context.Context, in *system.IdsReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteDictLogic(ctx, s.svcCtx)
|
|
return l.DeleteDict(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetDictList(ctx context.Context, in *system.DictListReq) (*system.DictListResp, error) {
|
|
l := logic.NewGetDictListLogic(ctx, s.svcCtx)
|
|
return l.GetDictList(in)
|
|
}
|
|
|
|
// --- 操作日志 ---
|
|
func (s *SystemServiceServer) CreateOperationRecord(ctx context.Context, in *system.CreateOperationRecordReq) (*system.CommonResp, error) {
|
|
l := logic.NewCreateOperationRecordLogic(ctx, s.svcCtx)
|
|
return l.CreateOperationRecord(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) DeleteOperationRecord(ctx context.Context, in *system.IdsReq) (*system.CommonResp, error) {
|
|
l := logic.NewDeleteOperationRecordLogic(ctx, s.svcCtx)
|
|
return l.DeleteOperationRecord(in)
|
|
}
|
|
|
|
func (s *SystemServiceServer) GetOperationRecordList(ctx context.Context, in *system.OperationRecordListReq) (*system.OperationRecordListResp, error) {
|
|
l := logic.NewGetOperationRecordListLogic(ctx, s.svcCtx)
|
|
return l.GetOperationRecordList(in)
|
|
}
|