Documentation ¶
Index ¶
- type CommonUserService
- func (s *CommonUserService) CreateUser(user *CommonDTO.User) (*CommonDTO.User, error)
- func (s *CommonUserService) GetByEmail(email string) (*CommonDTO.User, error)
- func (s *CommonUserService) GetById(id string) (*CommonDTO.User, error)
- func (s *CommonUserService) GetByMobile(mobile string) (*CommonDTO.User, error)
- type InviteCodeService
- type OrganizationService
- func (s *OrganizationService) CreateOrganization(organization *domain.Organization) (*domain.Organization, error)
- func (s *OrganizationService) DeleteOrganization(id int64) (bool, error)
- func (s *OrganizationService) GetById(id int64) (*domain.Organization, error)
- func (s *OrganizationService) GetSubList(fid int64) []domain.Organization
- func (s *OrganizationService) HasSubNode(fid int64) int64
- func (s *OrganizationService) List(fid int64, name string, pageable query.Pageable) (total int64, list []domain.Organization)
- func (s *OrganizationService) UpdateOrganization(organization *domain.Organization) (*domain.Organization, error)
- type OrganizationUserService
- type RoleService
- func (s *RoleService) Count(conds map[string]interface{}) (int64, error)
- func (s *RoleService) CreateRole(role *domain.Role) (*domain.Role, error)
- func (s *RoleService) DeleteById(id string) error
- func (s *RoleService) ExistById(id string) (bool, error)
- func (s *RoleService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Role, error)
- func (s *RoleService) FindAvailable(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Role, error)
- func (s *RoleService) GetById(id string) (*domain.Role, error)
- func (s *RoleService) GetUserRoles(userId string) ([]*domain.Role, error)
- func (s *RoleService) PatchRole(role *domain.Role, data map[string]interface{}) (*domain.Role, error)
- func (s *RoleService) UpdateRole(role *domain.Role) (*domain.Role, error)
- type RoleUserService
- func (u *RoleUserService) AddRoleUserIds(roleId string, userIds []string) ([]*domain.RoleUser, error)
- func (u *RoleUserService) DeleteRoleUserIds(roleId string, userIds []string) error
- func (u *RoleUserService) GetRoleUserIds(roleId string) []string
- func (u *RoleUserService) GetUserRoleIds(userId string) []string
- func (u *RoleUserService) ListMembers(roleId, search, tenantId string, pageable query.Pageable) (int64, []*domain.RoleMember)
- func (u *RoleUserService) ListUsers(roleId, search, tenantId string, pageable query.Pageable) (int64, []*domain.User)
- type SocialUserService
- func (s *SocialUserService) BoundSocialUser(socialUserId string, userId string, socialUser *domain.SocialUser) (*domain.SocialUser, error)
- func (s *SocialUserService) CreateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
- func (s *SocialUserService) GetById(id string) (*domain.SocialUser, error)
- func (s *SocialUserService) GetBySocialId(socialType string, socialId string) (*domain.SocialUser, error)
- func (s *SocialUserService) GetByUserId(socialType string, userId string) (*domain.SocialUser, error)
- func (s *SocialUserService) UpdateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
- type TenantService
- func (s *TenantService) Create(tenant *domain.Tenant) (*domain.Tenant, error)
- func (s *TenantService) DeleteById(id string) (bool, error)
- func (s *TenantService) DeleteTenant(tenant *domain.Tenant) (bool, error)
- func (s *TenantService) Find(conds map[string]interface{}, pageable query.Pageable) (total int64, list []*domain.Tenant)
- func (s *TenantService) GetById(id string) (*domain.Tenant, error)
- func (s *TenantService) GetByIds(ids []string) ([]*domain.Tenant, error)
- func (s *TenantService) Patch(id string, column string, value interface{}) (*domain.Tenant, error)
- func (s *TenantService) PatchAll(id string, kv map[string]interface{}) (*domain.Tenant, error)
- func (s *TenantService) Update(tenant *domain.Tenant) (*domain.Tenant, error)
- type UserService
- func (s *UserService) ChangeUserPassword(id string, oldpassword, password string) (bool, error)
- func (s *UserService) Check(username, password string) (bool, error)
- func (s *UserService) Count(user *dto.User) (int64, error)
- func (s *UserService) Create(user *dto.User) (*domain.User, error)
- func (s *UserService) Delete(user *domain.User) error
- func (s *UserService) DeleteById(id string) error
- func (s *UserService) ExistByID(id string) (bool, error)
- func (a *UserService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.User)
- func (s *UserService) Get(username string) (*domain.User, error)
- func (s *UserService) GetAll(user *dto.User, pageable query.Pageable) (int64, []domain.User)
- func (a *UserService) GetAllWithOrganization(name string, pageable query.Pageable) (int64, []domain.UserWithOrganization)
- func (s *UserService) GetByEmail(email string) (*domain.User, error)
- func (s *UserService) GetById(id string) (*domain.User, error)
- func (s *UserService) GetByLogin(login string) (*domain.User, error)
- func (s *UserService) GetByMobile(mobile string) (*domain.User, error)
- func (s *UserService) Patch(id string, column string, value interface{}) (*domain.User, error)
- func (s *UserService) PatchAll(id string, kv map[string]interface{}) (*domain.User, error)
- func (s *UserService) ResetUserPassword(id string) (bool, error)
- func (s *UserService) Update(user *dto.User) (*domain.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonUserService ¶
type CommonUserService struct{}
func (*CommonUserService) CreateUser ¶
func (*CommonUserService) GetByEmail ¶
func (s *CommonUserService) GetByEmail(email string) (*CommonDTO.User, error)
func (*CommonUserService) GetById ¶
func (s *CommonUserService) GetById(id string) (*CommonDTO.User, error)
func (*CommonUserService) GetByMobile ¶
func (s *CommonUserService) GetByMobile(mobile string) (*CommonDTO.User, error)
type InviteCodeService ¶
type InviteCodeService struct { service.BaseService InviteCodeRepository *repository.InviteCodeRepository `inject:"inviteCodeRepository"` UserRepository *repository.UserRepository `inject:"userRepository"` }
func (*InviteCodeService) FindByInviteCode ¶
func (s *InviteCodeService) FindByInviteCode(inviteCode string) (*domain.InviteCode, error)
func (*InviteCodeService) GetUserInviteCode ¶
func (s *InviteCodeService) GetUserInviteCode(userId string, channel string) (*domain.InviteCode, error)
type OrganizationService ¶
type OrganizationService struct { service.BaseService OrganizationRepository *repository.OrganizationRepository `inject:"organizationRepository"` }
func GetOrganizationService ¶
func GetOrganizationService() *OrganizationService
func (*OrganizationService) CreateOrganization ¶
func (s *OrganizationService) CreateOrganization(organization *domain.Organization) (*domain.Organization, error)
func (*OrganizationService) DeleteOrganization ¶
func (s *OrganizationService) DeleteOrganization(id int64) (bool, error)
func (*OrganizationService) GetById ¶
func (s *OrganizationService) GetById(id int64) (*domain.Organization, error)
func (*OrganizationService) GetSubList ¶
func (s *OrganizationService) GetSubList(fid int64) []domain.Organization
func (*OrganizationService) HasSubNode ¶
func (s *OrganizationService) HasSubNode(fid int64) int64
func (*OrganizationService) List ¶
func (s *OrganizationService) List(fid int64, name string, pageable query.Pageable) (total int64, list []domain.Organization)
func (*OrganizationService) UpdateOrganization ¶
func (s *OrganizationService) UpdateOrganization(organization *domain.Organization) (*domain.Organization, error)
type OrganizationUserService ¶
type OrganizationUserService struct { service.BaseService OrganizationUserRepository *repository.OrganizationUserRepository `inject:"organizationUserRepository"` OrganizationRepository *repository.OrganizationRepository `inject:"organizationRepository"` }
func (*OrganizationUserService) GetUserOrganizationIds ¶
func (u *OrganizationUserService) GetUserOrganizationIds(userId string) []int
根据用户id查询所有可能的岗位节点id
func (*OrganizationUserService) ListMembers ¶
func (u *OrganizationUserService) ListMembers(organizationId int64, userName string, pageable query.Pageable) (int64, []domain.OrganizationMember)
type RoleService ¶
type RoleService struct { service.BaseService RoleRepository *repository.RoleRepository `inject:"roleRepository"` }
func (*RoleService) Count ¶
func (s *RoleService) Count(conds map[string]interface{}) (int64, error)
func (*RoleService) CreateRole ¶
func (*RoleService) DeleteById ¶
func (s *RoleService) DeleteById(id string) error
func (*RoleService) FindAvailable ¶
func (*RoleService) GetUserRoles ¶
func (s *RoleService) GetUserRoles(userId string) ([]*domain.Role, error)
func (*RoleService) UpdateRole ¶
type RoleUserService ¶
type RoleUserService struct { service.BaseService RoleUserRepository *repository.RoleUserRepository `inject:"roleUserRepository"` RoleRepository *repository.RoleRepository `inject:"roleRepository"` UserService *UserService `inject:"userService"` }
func (*RoleUserService) AddRoleUserIds ¶
func (*RoleUserService) DeleteRoleUserIds ¶
func (u *RoleUserService) DeleteRoleUserIds(roleId string, userIds []string) error
func (*RoleUserService) GetRoleUserIds ¶
func (u *RoleUserService) GetRoleUserIds(roleId string) []string
func (*RoleUserService) GetUserRoleIds ¶
func (u *RoleUserService) GetUserRoleIds(userId string) []string
根据用户id查询所有可能的岗位节点id
func (*RoleUserService) ListMembers ¶
func (u *RoleUserService) ListMembers(roleId, search, tenantId string, pageable query.Pageable) (int64, []*domain.RoleMember)
type SocialUserService ¶
type SocialUserService struct { service.BaseService SocialUserRepository *repository.SocialUserRepository `inject:"socialUserRepository"` }
func GetSocialUserService ¶
func GetSocialUserService() *SocialUserService
func (*SocialUserService) BoundSocialUser ¶
func (s *SocialUserService) BoundSocialUser(socialUserId string, userId string, socialUser *domain.SocialUser) (*domain.SocialUser, error)
func (*SocialUserService) CreateSocialUser ¶
func (s *SocialUserService) CreateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
func (*SocialUserService) GetById ¶
func (s *SocialUserService) GetById(id string) (*domain.SocialUser, error)
func (*SocialUserService) GetBySocialId ¶
func (s *SocialUserService) GetBySocialId(socialType string, socialId string) (*domain.SocialUser, error)
func (*SocialUserService) GetByUserId ¶
func (s *SocialUserService) GetByUserId(socialType string, userId string) (*domain.SocialUser, error)
func (*SocialUserService) UpdateSocialUser ¶
func (s *SocialUserService) UpdateSocialUser(socialUser *domain.SocialUser) (*domain.SocialUser, error)
type TenantService ¶
type TenantService struct { service.BaseService TenantRepository *repository.TenantRepository `inject:"tenantRepository"` }
func GetTenantService ¶
func GetTenantService() *TenantService
func (*TenantService) DeleteById ¶
func (s *TenantService) DeleteById(id string) (bool, error)
func (*TenantService) DeleteTenant ¶
func (s *TenantService) DeleteTenant(tenant *domain.Tenant) (bool, error)
func (*TenantService) GetByIds ¶
func (s *TenantService) GetByIds(ids []string) ([]*domain.Tenant, error)
type UserService ¶
type UserService struct { service.BaseService UserRepository *repository.UserRepository `inject:"userRepository"` Enforcer *casbin.SyncedEnforcer `inject:"enforcer"` }
func GetUserService ¶
func GetUserService() *UserService
func (*UserService) ChangeUserPassword ¶
func (s *UserService) ChangeUserPassword(id string, oldpassword, password string) (bool, error)
func (*UserService) DeleteById ¶
func (s *UserService) DeleteById(id string) error
func (*UserService) GetAllWithOrganization ¶
func (a *UserService) GetAllWithOrganization(name string, pageable query.Pageable) (int64, []domain.UserWithOrganization)
查询用户信息(带岗位)
func (*UserService) GetByEmail ¶
func (s *UserService) GetByEmail(email string) (*domain.User, error)
func (*UserService) GetByLogin ¶
func (s *UserService) GetByLogin(login string) (*domain.User, error)
func (*UserService) GetByMobile ¶
func (s *UserService) GetByMobile(mobile string) (*domain.User, error)
func (*UserService) ResetUserPassword ¶
func (s *UserService) ResetUserPassword(id string) (bool, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.