repository

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 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) CheckRoleName

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

func (*RoleRepository) CheckRoleNameId

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

func (*RoleRepository) CleanAllRole

func (r *RoleRepository) CleanAllRole() error

func (*RoleRepository) CreateRole

func (r *RoleRepository) CreateRole(role *domain.Role) (*domain.Role, error)

func (*RoleRepository) DeleteById

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

func (*RoleRepository) ExistById

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

func (*RoleRepository) FindAvailableRoles

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

func (*RoleRepository) FindRoles

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

func (*RoleRepository) GetById

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

func (*RoleRepository) GetByIds

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

func (*RoleRepository) GetRoleTotal

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

func (*RoleRepository) GetRoles

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

func (*RoleRepository) GetRolesAll

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

func (*RoleRepository) PatchRole

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

func (*RoleRepository) UpdateRole

func (r *RoleRepository) UpdateRole(role *domain.Role) (*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) DeleteRoleUserWithTenantId

func (a *RoleUserRepository) DeleteRoleUserWithTenantId(roleId, userId, tenantId string) bool

删除

func (*RoleUserRepository) GetByRoleId

func (a *RoleUserRepository) GetByRoleId(roleId string) (result []*domain.RoleUser)

修改

func (*RoleUserRepository) GetByUserId

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

修改

func (*RoleUserRepository) GetCount

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

查询类

func (*RoleUserRepository) InsertData

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

新增

func (*RoleUserRepository) List

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

func (*RoleUserRepository) ListMembers

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

func (*RoleUserRepository) ListRoles

func (a *RoleUserRepository) ListRoles(userId string, pageable query.Pageable) (count int64, data []*domain.Role)

func (*RoleUserRepository) ListUsers

func (a *RoleUserRepository) ListUsers(roleId, search, tenantId string, pageable query.Pageable) (count int64, data []*domain.User)

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 TenantRepository

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

func (*TenantRepository) CreateTenant

func (r *TenantRepository) CreateTenant(tenant *domain.Tenant) (*domain.Tenant, error)

新增

func (*TenantRepository) DeleteById

func (r *TenantRepository) DeleteById(id string) bool

删除

func (*TenantRepository) Find

func (r *TenantRepository) Find(conds map[string]interface{}, pageable query.Pageable) (total int64, list []*domain.Tenant)

func (*TenantRepository) GetById

func (r *TenantRepository) GetById(id string) (*domain.Tenant, error)

func (*TenantRepository) GetByIds

func (a *TenantRepository) GetByIds(ids []string) (result []*domain.Tenant, err error)

func (*TenantRepository) UpdateTenant

func (r *TenantRepository) UpdateTenant(tenant *domain.Tenant) (bool, 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) Find

func (r *UserRepository) Find(conds map[string]interface{}, pageable query.Pageable) (total int64, list []*domain.User)

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

Jump to

Keyboard shortcuts

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