service

package
v0.0.57 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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 (s *CommonUserService) CreateUser(user *CommonDTO.User) (*CommonDTO.User, error)

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 (s *RoleService) CreateRole(role *domain.Role) (*domain.Role, error)

func (*RoleService) DeleteById

func (s *RoleService) DeleteById(id string) error

func (*RoleService) ExistById

func (s *RoleService) ExistById(id string) (bool, error)

func (*RoleService) Find

func (s *RoleService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Role, error)

func (*RoleService) FindAvailable

func (s *RoleService) FindAvailable(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.Role, error)

func (*RoleService) GetById

func (s *RoleService) GetById(id string) (*domain.Role, error)

func (*RoleService) GetUserRoles

func (s *RoleService) GetUserRoles(userId string) ([]*domain.Role, error)

func (*RoleService) PatchRole

func (s *RoleService) PatchRole(role *domain.Role, data map[string]interface{}) (*domain.Role, error)

func (*RoleService) UpdateRole

func (s *RoleService) UpdateRole(role *domain.Role) (*domain.Role, error)

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 (u *RoleUserService) AddRoleUserIds(roleId string, userIds []string) ([]*domain.RoleUser, error)

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)

func (*RoleUserService) ListUsers

func (u *RoleUserService) ListUsers(roleId, search, tenantId string, pageable query.Pageable) (int64, []*domain.User)

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) Create

func (s *TenantService) Create(tenant *domain.Tenant) (*domain.Tenant, error)

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) Find

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

func (*TenantService) GetById

func (s *TenantService) GetById(id string) (*domain.Tenant, error)

func (*TenantService) GetByIds

func (s *TenantService) GetByIds(ids []string) ([]*domain.Tenant, error)

func (*TenantService) Patch

func (s *TenantService) Patch(id string, column string, value interface{}) (*domain.Tenant, error)

func (*TenantService) PatchAll

func (s *TenantService) PatchAll(id string, kv map[string]interface{}) (*domain.Tenant, error)

func (*TenantService) Update

func (s *TenantService) Update(tenant *domain.Tenant) (*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) Check

func (s *UserService) Check(username, password string) (bool, error)

func (*UserService) Count

func (s *UserService) Count(user *dto.User) (int64, error)

func (*UserService) Create

func (s *UserService) Create(user *dto.User) (*domain.User, error)

func (*UserService) Delete

func (s *UserService) Delete(user *domain.User) error

func (*UserService) DeleteById

func (s *UserService) DeleteById(id string) error

func (*UserService) ExistByID

func (s *UserService) ExistByID(id string) (bool, error)

func (*UserService) Find

func (a *UserService) Find(conds map[string]interface{}, pageable query.Pageable) (int64, []*domain.User)

func (*UserService) Get

func (s *UserService) Get(username string) (*domain.User, error)

func (*UserService) GetAll

func (s *UserService) GetAll(user *dto.User, pageable query.Pageable) (int64, []domain.User)

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) GetById

func (s *UserService) GetById(id 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) Patch

func (s *UserService) Patch(id string, column string, value interface{}) (*domain.User, error)

func (*UserService) PatchAll

func (s *UserService) PatchAll(id string, kv map[string]interface{}) (*domain.User, error)

func (*UserService) ResetUserPassword

func (s *UserService) ResetUserPassword(id string) (bool, error)

func (*UserService) Update

func (s *UserService) Update(user *dto.User) (*domain.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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