repository

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRoleRepository

type IRoleRepository interface {
	server.IUserHandler
}

type InviteCodeRepository

type InviteCodeRepository struct {
	*gorm.DB `inject:"database"`
}

func (*InviteCodeRepository) FindByInviteCode

func (s *InviteCodeRepository) FindByInviteCode(inviteCode string) (*domain.InviteCode, error)

func (*InviteCodeRepository) GetUserInviteCode

func (s *InviteCodeRepository) GetUserInviteCode(userId string, channel string) (*domain.InviteCode, error)

type OrganizationRepository

type OrganizationRepository struct {
	*gorm.DB `inject:"database"`
}

func (*OrganizationRepository) DeleteData

func (r *OrganizationRepository) DeleteData(id int64) bool

删除

func (*OrganizationRepository) GetById

func (*OrganizationRepository) GetByIds

func (a *OrganizationRepository) GetByIds(ids []int64) (result []domain.Organization)

func (*OrganizationRepository) GetCount

func (r *OrganizationRepository) GetCount(fid int64, name string) (count int64)

func (*OrganizationRepository) GetSubListByfid

func (r *OrganizationRepository) GetSubListByfid(fid int64) []domain.Organization

根据fid查询子级节点全部数据

func (*OrganizationRepository) HasSubNode

func (r *OrganizationRepository) HasSubNode(id int64) (count int64)

查询该 id 是否存在子节点

func (*OrganizationRepository) InsertData

func (r *OrganizationRepository) InsertData(organization *domain.Organization) (bool, error)

新增

func (*OrganizationRepository) List

func (r *OrganizationRepository) List(fid int64, name string, pageable query.Pageable) (counts int64, list []domain.Organization)

查询

func (*OrganizationRepository) UpdateData

func (r *OrganizationRepository) UpdateData(organization *domain.Organization) (bool, error)

更新

type OrganizationUserRepository

type OrganizationUserRepository struct {
	*gorm.DB `inject:"database"`
}

func (*OrganizationUserRepository) DeleteData

func (a *OrganizationUserRepository) DeleteData(organizationId float64, userId string) bool

删除

func (*OrganizationUserRepository) GetByUserId

func (a *OrganizationUserRepository) GetByUserId(user_id string) (result []domain.OrganizationUser)

修改

func (*OrganizationUserRepository) GetCount

func (a *OrganizationUserRepository) GetCount(organizationId int64, userName string) (count int64)

查询类

func (*OrganizationUserRepository) InsertData

新增

func (*OrganizationUserRepository) List

func (a *OrganizationUserRepository) List(organizationId, userName string, pageable query.Pageable) (count int64, data []domain.OrganizationUser)

func (*OrganizationUserRepository) ListMembers

func (a *OrganizationUserRepository) ListMembers(organizationId int64, userName string, pageable query.Pageable) (count int64, data []domain.OrganizationMember)

func (*OrganizationUserRepository) UpdateData

修改

type RoleRepository

type RoleRepository struct {
	*gorm.DB `inject:"database"`
}

func (*RoleRepository) AddRole

func (r *RoleRepository) AddRole(data map[string]interface{}) (*domain.Role, error)

func (*RoleRepository) CheckRoleName

func (r *RoleRepository) CheckRoleName(name string) (bool, error)

func (*RoleRepository) CheckRoleNameId

func (r *RoleRepository) CheckRoleNameId(name string, id string) (bool, error)

func (*RoleRepository) CleanAllRole

func (r *RoleRepository) CleanAllRole() error

func (*RoleRepository) DeleteRole

func (r *RoleRepository) DeleteRole(id string) error

func (*RoleRepository) EditRole

func (r *RoleRepository) EditRole(id string, data map[string]interface{}) error

func (*RoleRepository) ExistRoleByID

func (r *RoleRepository) ExistRoleByID(id string) (bool, error)

func (*RoleRepository) GetByIds

func (r *RoleRepository) GetByIds(ids []string) (result []domain.Role)

func (*RoleRepository) GetRole

func (r *RoleRepository) GetRole(id string) (*domain.Role, error)

func (*RoleRepository) GetRoleTotal

func (r *RoleRepository) GetRoleTotal(maps interface{}) (int64, error)

func (*RoleRepository) GetRoles

func (r *RoleRepository) GetRoles(maps interface{}, pageable query.Pageable) ([]*domain.Role, error)

func (*RoleRepository) GetRolesAll

func (r *RoleRepository) GetRolesAll() ([]*domain.Role, error)

type RoleUserRepository

type RoleUserRepository struct {
	*gorm.DB `inject:"database"`
}

func (*RoleUserRepository) DeleteData

func (a *RoleUserRepository) DeleteData(roleId string, userId string) bool

删除

func (*RoleUserRepository) GetByUserId

func (a *RoleUserRepository) GetByUserId(user_id string) (result []domain.RoleUser)

修改

func (*RoleUserRepository) GetCount

func (a *RoleUserRepository) GetCount(roleId string, userName string) (count int64)

查询类

func (*RoleUserRepository) InsertData

func (a *RoleUserRepository) InsertData(data *domain.RoleUser) bool

新增

func (*RoleUserRepository) List

func (a *RoleUserRepository) List(roleId, userName string, pageable query.Pageable) (count int64, data []domain.RoleUser)

func (*RoleUserRepository) ListMembers

func (a *RoleUserRepository) ListMembers(roleId string, userName string, pageable query.Pageable) (count int64, data []domain.RoleMember)

func (*RoleUserRepository) UpdateData

func (a *RoleUserRepository) UpdateData(data *domain.RoleUser) bool

修改

type SocialUserRepository

type SocialUserRepository struct {
	*gorm.DB `inject:"database"`
}

func (*SocialUserRepository) GetById

func (r *SocialUserRepository) GetById(id string) (*domain.SocialUser, error)

func (*SocialUserRepository) GetBySocialId

func (r *SocialUserRepository) GetBySocialId(socialType string, socialId string) (*domain.SocialUser, error)

func (*SocialUserRepository) GetByUserId

func (r *SocialUserRepository) GetByUserId(socialType string, userId string) (*domain.SocialUser, error)

type SysOptionRepository

type SysOptionRepository struct {
	*gorm.DB `inject:"database"`
}

func (*SysOptionRepository) GetDefaultOptions

func (r *SysOptionRepository) GetDefaultOptions() (*domain.SysOptions, error)

func (*SysOptionRepository) GetSystemOptions

func (r *SysOptionRepository) GetSystemOptions() (*domain.SysOptions, error)

func (*SysOptionRepository) GetTenantOptions

func (r *SysOptionRepository) GetTenantOptions(tenantId string) (*domain.SysOptions, error)

func (*SysOptionRepository) RemoveAllTenantOptions

func (r *SysOptionRepository) RemoveAllTenantOptions(tenantId string) error

type UserOptionRepository

type UserOptionRepository struct {
	*gorm.DB `inject:"database"`
}

func (*UserOptionRepository) GetUserOptions

func (r *UserOptionRepository) GetUserOptions(userId string) (*domain.UserOptions, error)

func (*UserOptionRepository) RemoveAllUserOptions

func (r *UserOptionRepository) RemoveAllUserOptions(userId string) error

type UserRepository

type UserRepository struct {
	*gorm.DB `inject:"database"`
}

func (*UserRepository) CheckUser

func (h *UserRepository) CheckUser(username, password string) (bool, error)

func (*UserRepository) CheckUserEmail

func (h *UserRepository) CheckUserEmail(username string) (bool, error)

func (*UserRepository) CheckUserEmailId

func (h *UserRepository) CheckUserEmailId(email string, id string) (bool, error)

func (*UserRepository) CheckUserLogin

func (h *UserRepository) CheckUserLogin(username string) (bool, error)

func (*UserRepository) CheckUserLoginId

func (h *UserRepository) CheckUserLoginId(login string, id string) (bool, error)

func (*UserRepository) CheckUserMobile

func (h *UserRepository) CheckUserMobile(username string) (bool, error)

func (*UserRepository) CheckUserMobileId

func (h *UserRepository) CheckUserMobileId(mobile string, id string) (bool, error)

func (*UserRepository) CleanAllUser

func (h *UserRepository) CleanAllUser() error

func (*UserRepository) CreateUser

func (h *UserRepository) CreateUser(user *domain.User) (*domain.User, error)

func (*UserRepository) DeleteUser

func (h *UserRepository) DeleteUser(id string) error

func (*UserRepository) ExistUserByID

func (h *UserRepository) ExistUserByID(id string) (bool, error)

func (*UserRepository) GetUser

func (h *UserRepository) GetUser(username string) (*domain.User, error)

func (*UserRepository) GetUserByEmail

func (h *UserRepository) GetUserByEmail(email string) (*domain.User, error)

func (*UserRepository) GetUserById

func (h *UserRepository) GetUserById(id string) (*domain.User, error)

func (*UserRepository) GetUserByLogin

func (h *UserRepository) GetUserByLogin(login string) (*domain.User, error)

func (*UserRepository) GetUserByMobile

func (h *UserRepository) GetUserByMobile(mobile string) (*domain.User, error)

func (*UserRepository) GetUserByUserNamePassword

func (h *UserRepository) GetUserByUserNamePassword(username, password string) (*domain.User, error)

func (*UserRepository) GetUserTotal

func (h *UserRepository) GetUserTotal(maps interface{}) (int64, error)

func (*UserRepository) GetUserWithOrganizations

func (a *UserRepository) GetUserWithOrganizations(userName string, pageable query.Pageable) (totalCounts int64, list []domain.UserWithOrganization)

权限分配查询(包含用户岗位信息)

func (*UserRepository) GetUsers

func (h *UserRepository) GetUsers(maps interface{}, pageable query.Pageable) (int64, []domain.User)

func (*UserRepository) GetUsersAll

func (h *UserRepository) GetUsersAll() ([]*domain.User, error)

func (*UserRepository) LogUserLogin

func (a *UserRepository) LogUserLogin(userId string, loginIp string) error

func (*UserRepository) UpdateUser

func (h *UserRepository) UpdateUser(entity *domain.User) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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