service

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
}

func GetAuthService

func GetAuthService() *AuthService

func (*AuthService) ChangeMyPassword

func (a *AuthService) ChangeMyPassword(userId int64, oldPassword, newPassword string) error

func (*AuthService) FindPasswordById

func (a *AuthService) FindPasswordById(id int64) (*model.UserPassword, error)

func (*AuthService) Login

func (a *AuthService) Login(req *req.LoginReq) (*model.User, error)

func (*AuthService) PasswordHash

func (a *AuthService) PasswordHash(password string) string

func (*AuthService) UpdateMyInfo

func (a *AuthService) UpdateMyInfo(id int64, upsertReq *req.UpsertMyInfoReq) error

type DeptService

type DeptService struct {
}

func GetDeptService

func GetDeptService() *DeptService

func (*DeptService) CreateDept

func (s *DeptService) CreateDept(m *req.DeptUpsertReq) error

func (*DeptService) DeleteDept

func (s *DeptService) DeleteDept(id int64) error

func (*DeptService) ExistsByParentId

func (s *DeptService) ExistsByParentId(parentId int64) (bool, error)

func (*DeptService) FindDeptTree

func (s *DeptService) FindDeptTree(keyword string) ([]*res.DeptTree, error)

func (*DeptService) FindOneById

func (s *DeptService) FindOneById(id int64) (*model.Dept, error)

func (*DeptService) UpdateDept

func (s *DeptService) UpdateDept(id int64, m *req.DeptUpsertReq) error

type IconService

type IconService struct {
}

func GetIconService

func GetIconService() *IconService

func (*IconService) FindAll

func (s *IconService) FindAll() ([]*model.Icon, error)

type JobService

type JobService struct {
}

func GetJobService

func GetJobService() *JobService

func (*JobService) CreateJob

func (s *JobService) CreateJob(info *req.JobUpsertReq) error

func (*JobService) DeleteJob

func (s *JobService) DeleteJob(id int64) error

func (*JobService) FindOneById

func (s *JobService) FindOneById(id int64) (*model.Job, error)

func (*JobService) PageList

func (s *JobService) PageList(keyword string, page, pageSize int) (*res.PageableData[*model.Job], error)

func (*JobService) UpdateJob

func (s *JobService) UpdateJob(id int64, info *req.JobUpsertReq) error

type LogService

type LogService struct {
}

func GetLogService

func GetLogService() *LogService

func (*LogService) AddExceptionLog

func (s *LogService) AddExceptionLog(log *model.ExceptionLog) error

func (*LogService) AddLoginLog

func (s *LogService) AddLoginLog(log *model.LoginLog) error

func (*LogService) AddOpLog

func (s *LogService) AddOpLog(log *model.OpLog) error

func (*LogService) DeleteExceptionLog

func (s *LogService) DeleteExceptionLog(beforeTime time.Time) error

func (*LogService) DeleteLoginLog

func (s *LogService) DeleteLoginLog(beforeTime time.Time) error

func (*LogService) DeleteOpLog

func (s *LogService) DeleteOpLog(beforeTime time.Time) error

func (*LogService) ExceptionLogPageList

func (s *LogService) ExceptionLogPageList(keyword string, page, pageSize int) (*res.PageableData[*model.ExceptionLog], error)

func (*LogService) LoginLogPageList

func (s *LogService) LoginLogPageList(keyword string, page, pageSize int) (*res.PageableData[*model.LoginLog], error)

func (*LogService) OpLogPageList

func (s *LogService) OpLogPageList(keyword string, page, pageSize int) (*res.PageableData[*model.OpLog], error)
type MenuService struct {
}

func GetMenuService

func GetMenuService() *MenuService
func (s *MenuService) CreateMenu(m *req.MenuUpsertReq) error
func (s *MenuService) DeleteMenu(id int64) error
func (s *MenuService) ExistsByParentId(parentId int64) (bool, error)
func (s *MenuService) FindMenuTree() ([]*res.MenuTree, error)
func (s *MenuService) FindOneById(id int64) (*model.Menu, error)
func (s *MenuService) FindOneBySymbol(symbol string) (*model.Menu, error)
func (s *MenuService) FindSymbolsByIds(ids []int64) ([]string, error)
func (s *MenuService) FindUserMenuTree(userId int64, isRoot bool) ([]*res.MenuTree, error)
func (s *MenuService) FindUserPermissions(userId int64, isRoot bool) ([]string, error)
func (s *MenuService) UpdateMenu(id int64, m *req.MenuUpsertReq) error

type RoleService

type RoleService struct {
}

func GetRoleService

func GetRoleService() *RoleService

func (*RoleService) CreateRole

func (s *RoleService) CreateRole(info *req.RoleUpsertReq) error

func (*RoleService) DeleteRole

func (s *RoleService) DeleteRole(id int64) error

func (*RoleService) FindOneById

func (s *RoleService) FindOneById(id int64) (*model.Role, error)

func (*RoleService) PageList

func (s *RoleService) PageList(keyword string, page, pageSize int) (*res.PageableData[*model.Role], error)

func (*RoleService) UpdateRole

func (s *RoleService) UpdateRole(id int64, info *req.RoleUpsertReq) error

func (*RoleService) UpdateRoleMenus

func (s *RoleService) UpdateRoleMenus(id int64, updateReq *req.RoleMenusUpdateReq) error

type SettingsService

type SettingsService struct {
}

func GetSettingsService

func GetSettingsService() *SettingsService

func (*SettingsService) FindOneByUserIdAndKey

func (s *SettingsService) FindOneByUserIdAndKey(userId int64, key string) (*model.Settings, error)

func (*SettingsService) UpsertSettings

func (s *SettingsService) UpsertSettings(userId int64, settings *req.SettingsUpsertReq) error

type UserService

type UserService struct {
}

func GetUserService

func GetUserService() *UserService

func (*UserService) ChangePassword

func (s *UserService) ChangePassword(id int64, password string) error

func (*UserService) ChangeUserStatus

func (s *UserService) ChangeUserStatus(id int64, status int8) error

func (*UserService) CreateUser

func (s *UserService) CreateUser(info *req.UserUpsertReq) error

func (*UserService) DeleteUser

func (s *UserService) DeleteUser(id int64) error

func (*UserService) FindOneByEmail

func (s *UserService) FindOneByEmail(email string) *model.User

func (*UserService) FindOneById

func (s *UserService) FindOneById(id int64, preloads ...string) *model.User

func (*UserService) IsRootUser

func (s *UserService) IsRootUser(id int64) (result bool)

func (*UserService) PageList

func (s *UserService) PageList(keyword string, sex int8, status int8, start *time.Time, end *time.Time, page int, pageSize int) *res.PageableData[*model.User]

func (*UserService) ResetPassword

func (s *UserService) ResetPassword(id int64) error

func (*UserService) UpdateUser

func (s *UserService) UpdateUser(id int64, info *req.UserUpsertReq) error

func (*UserService) UpdateUserMenus

func (s *UserService) UpdateUserMenus(id int64, updateReq *req.UserMenusUpdateReq) error

Directories

Path Synopsis
dto
req
res

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL