service

package
v0.0.0-...-ae394c8 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSvc

func InitSvc(dao dao.Dao)

Types

type Department

type Department interface {
	FindAllDepartByEnterprisePk(en *entity.Department) ([]*pb.DepartmentList, error)
	Create(*entity.Department) (*entity.Department, error)
	Update(*entity.Department, string) (*entity.Department, error)
	Delete(*entity.Department) error
	FindByPk(en *entity.Department) (*entity.Department, error)
	Select(*entity.Department, *dao.Pagination) ([]*entity.Department, *dao.Pagination, error)
	FindByEnterprisePkAndName(en *entity.Department) (*entity.Department, error)
}

func NewDepartment

func NewDepartment(dao dao.Dao) Department

type Enterprise

type Enterprise interface {
	ReadUserEnterprise(userPk int64) ([]*model.Enterprise, error)
	ReadAppUserEnterprise(userPk int64) ([]*model.Enterprise, error)
	Create(*entity.Enterprise) (*model.Enterprise, error)
	Delete(*entity.Enterprise) error
	Select(*entity.Enterprise, *dao.Pagination) ([]*model.Enterprise, *dao.Pagination, error)
	Update(*entity.Enterprise) (*model.Enterprise, error)
	FindByPk(en *entity.Enterprise) (*model.Enterprise, error)
	SelectEnterpriseForEnterpriseAreaPermission(list []*entity.EnterpriseAreaPermission, en *entity.Enterprise, pg *entity.Pagination) ([]*model.Enterprise, int32, error)
}

func NewEnterprise

func NewEnterprise(dao dao.Dao) Enterprise

type EnterpriseAreaPermission

type EnterpriseAreaPermission interface {
	CreateEnterpriseAreaPermission(areaPermission *entity.EnterpriseAreaPermission) (*entity.EnterpriseAreaPermission, error)
	SelectEnterpriseAreaPermission(areaPermission *entity.EnterpriseAreaPermission, page *entity.Pagination) ([]*entity.EnterpriseAreaPermission, int32, error)
	DeleteEnterpriseAreaPermission(areaPermission *entity.EnterpriseAreaPermission) error
	FindList(areaPermission *entity.EnterpriseAreaPermission) ([]*entity.EnterpriseAreaPermission, error)
}

func NewEnterpriseAreaPermission

func NewEnterpriseAreaPermission(dao dao.Dao) EnterpriseAreaPermission

type EnterpriseUser

type EnterpriseUser interface {
	Create(*entity.EnterpriseUser) (*entity.EnterpriseUser, error)
	Delete(*entity.EnterpriseUser) error
	Select(*entity.EnterpriseUser, *dao.Pagination) ([]*entity.EnterpriseUser, *dao.Pagination, error)
	Update(*entity.EnterpriseUser) (*entity.EnterpriseUser, error)
	FindByPk(en *entity.EnterpriseUser) (*entity.EnterpriseUser, error)
	FindByUserPkAndEnterprisePk(en *entity.EnterpriseUser) (*entity.EnterpriseUser, error)

	Count(user *entity.EnterpriseUser) (int32, error)
	DimissionEnterpriseUser(en *entity.EnterpriseUser) error
	CreateEnterpriseUser(*entity.EnterpriseUser) (*entity.EnterpriseUser, error)
}

func NewEnterpriseUser

func NewEnterpriseUser(dao dao.Dao) EnterpriseUser

type EnterpriseUserAttachment

type EnterpriseUserAttachment interface {
	Create(attachment *entity.EnterpriseUserAttachment) (*entity.EnterpriseUserAttachment, error)
	Delete(attachment *entity.EnterpriseUserAttachment) error
	List(attachment *entity.EnterpriseUserAttachment) ([]*entity.EnterpriseUserAttachment, error)
}

func NewEnterpriseUserAttachment

func NewEnterpriseUserAttachment(dao dao.Dao) EnterpriseUserAttachment

type Files

type Files interface {
	SaveFile(string, model.Oss) (model.Oss, error)
	RemoveFile(string, model.Oss) error
}

func NewFiles

func NewFiles(dao dao.Dao) Files

NewFiles 实例化接口规范实现类

type Member

type Member interface {
	Create(m *entity.Member) (*entity.Member, error)
	CreateMemberUser(member *entity.Member, user *entity.User, userCredentials []*entity.UserCredentials) (*entity.Member, error)
	Delete(m *entity.Member) error
	DeleteByEnterprisePkAndUserPk(m *entity.Member) error
	Select(in *model.Member, pg *entity.Pagination) ([]*model.Member, *entity.Pagination, error)
	Count(m *entity.Member) (int32, error)
	UpdateMemberUser(in *entity.EnterpriseUser) (*entity.EnterpriseUser, error)
	UpdateUserDepartmentRelation(in *entity.Member, departmentPks []int64) error
	CreateMemberAndEnterpriseUser(eu *entity.EnterpriseUser, in *entity.Member) (*entity.Member, error)
	List(m *entity.Member) ([]*entity.Member, error)
}

func NewMember

func NewMember(dao dao.Dao) Member
type MenuResource interface {
	Create(*entity.MenuResource) (*entity.MenuResource, error)
	Delete(*entity.MenuResource) error
	Select(*entity.MenuResource, *dao.Pagination) ([]*model.MenuResourceModel, *dao.Pagination, error)
	Update(*entity.MenuResource) (*entity.MenuResource, error)
	FindByPk(en *entity.MenuResource) (*entity.MenuResource, error)
	SelectAllMenuWithDetail(en *entity.MenuResource) ([]*pb.MenuList, error)
}

func NewMenuResource

func NewMenuResource(dao dao.Dao) MenuResource

type Permission

type Permission interface {
	Create(*entity.Permission) (*entity.Permission, error)
	Delete(*entity.Permission) error
	Select(*entity.Permission, *dao.Pagination) ([]*entity.Permission, *dao.Pagination, error)
	SelectWithPageAndMenu(in *entity.Permission, pg *dao.Pagination) ([]*model.PermissionModel, *dao.Pagination, error)
	Update(*entity.Permission) (*entity.Permission, error)
	FindByPk(*entity.Permission) (*entity.Permission, error)
}

func NewPermission

func NewPermission(dao dao.Dao) Permission

NewPermission 实例化接口规范实现类

type PermissionGroup

func NewPermissionGroup

func NewPermissionGroup(dao dao.Dao) PermissionGroup

NewPermissionGroup 实例化接口规范实现类

type PermissionGroupPermission

func NewPermissionGroupPermission

func NewPermissionGroupPermission(dao dao.Dao) PermissionGroupPermission

NewPermissionGroupPermission 实例化接口规范实现类

type Position

type Position interface {
	Create(*entity.Position) (*entity.Position, error)
	Delete(*entity.Position) error
	Select(*entity.Position, *dao.Pagination, *time.Time, *time.Time) ([]*model.PositionModel, *dao.Pagination, error)
	Update(*entity.Position) (*entity.Position, error)
	FindByPk(en *entity.Position) (*entity.Position, error)
	Count(position2 *entity.Position, startTime, endTime *time.Time) (int32, error)
}

func NewPosition

func NewPosition(dao dao.Dao) Position

type Role

type Role interface {
	Create(*entity.Role) (*entity.Role, error)
	Delete(*entity.Role) error
	Select(*entity.Role, *dao.Pagination) ([]*entity.Role, *dao.Pagination, error)
	Update(*entity.Role) (*entity.Role, error)
	FindByPk(en *entity.Role) (*entity.Role, error)
	SelectWithDetail(in *entity.Role, pg *dao.Pagination) ([]*model.RoleModel, *dao.Pagination, error)
}

func NewRole

func NewRole(dao dao.Dao) Role

NewRole 实例化接口规范实现类

type RoleGroup

type RoleGroup interface {
	Create(*entity.RoleGroup) (*entity.RoleGroup, error)
	Delete(*entity.RoleGroup) error
	Select(*entity.RoleGroup, *dao.Pagination) ([]*entity.RoleGroup, *dao.Pagination, error)
	Update(*entity.RoleGroup) (*entity.RoleGroup, error)
	FindByPk(en *entity.RoleGroup) (*entity.RoleGroup, error)
	SelectWithRoleMessage(in *entity.RoleGroup, pg *dao.Pagination) ([]*model.RoleGroupWithRoleMessageModel, *dao.Pagination, error)
	SelectAllRoleWithRoleMessage(in *entity.RoleGroup) ([]*model.RoleGroupWithRoleMessageModel, error)
}

func NewRoleGroup

func NewRoleGroup(dao dao.Dao) RoleGroup

NewRoleGroup 实例化接口规范实现类

type RoleGroupPermission

type RoleGroupPermission interface {
	Create(*entity.RoleGroupPermission) (*entity.RoleGroupPermission, error)
	Delete(*entity.RoleGroupPermission) error
	DeleteByGroupPk(in *entity.RoleGroupPermission) error
	Select(*entity.RoleGroupPermission, *dao.Pagination) ([]*entity.RoleGroupPermission, *dao.Pagination, error)
	Update(*entity.RoleGroupPermission) (*entity.RoleGroupPermission, error)
	FindByPk(en *entity.RoleGroupPermission) (*entity.RoleGroupPermission, error)
	SelectRoleGroupPermissionByRoleGroupPk(en *entity.RoleGroupPermission) ([]*model.RoleGroupPermissionModel, error)
	SelectAllRoleGroupPermission(en *entity.RoleGroupPermission) ([]*entity.RoleGroupPermission, error)
	SelectPermissionByRoleGroupPK(roleGroupPk int64) ([]*entity.Permission, error)
}

func NewRoleGroupPermission

func NewRoleGroupPermission(dao dao.Dao) RoleGroupPermission

NewRoleGroupPermission 实例化接口规范实现类

type RolePermission

type RolePermission interface {
	Create(*entity.RolePermission) (*entity.RolePermission, error)
	Delete(*entity.RolePermission) error
	DeleteByRolePk(in *entity.RolePermission) error
	Select(*entity.RolePermission, *dao.Pagination) ([]*entity.RolePermission, *dao.Pagination, error)
	Update(*entity.RolePermission) (*entity.RolePermission, error)
	SelectAllRolePermission(in *entity.RolePermission) ([]*entity.RolePermission, error)
	SelectRolePermissionByRolePk(in *entity.RolePermission) ([]*model.RolePermissionModel, error)
	SelectPermissionByRolePK(in *entity.RolePermission) ([]*entity.Permission, error)
}

func NewRolePermission

func NewRolePermission(dao dao.Dao) RolePermission

NewRolePermission 实例化接口规范实现类

type Sms

type Sms interface {
	SendCode(phone, tenantRid string) error
	CheckCode(phone, code string) error
}

func NewSms

func NewSms(dao dao.Dao) Sms

NewSms 实例化接口规范实现类

type Svc

type Svc interface {
	Wechat() Wechat
	UserPermission() UserPermission
	Permission() Permission
	Role() Role
	RoleGroup() RoleGroup
	RoleGroupPermission() RoleGroupPermission
	RolePermission() RolePermission
	PermissionGroup() PermissionGroup
	PermissionGroupPermission() PermissionGroupPermission
	User() User
	UserClient() UserClient
	Enterprise() Enterprise
	Files() Files
	UserProfession() UserProfession
	UserCredentials() UserCredentials
	PageResource() PageResource
	InterfaceResource() InterfaceResource
	PageInterface() PageInterface
	MenuResource() MenuResource
	Sms() Sms
	UserRealNameAuthenticationLog() UserRealNameAuthenticationLog
	EnterpriseAreaPermission() EnterpriseAreaPermission
	Department() Department
	Member() Member
	EnterpriseUser() EnterpriseUser
	RS() *helper.Redis
}

Svc 定义接口规范

var S Svc

func NewSvc

func NewSvc(dao dao.Dao) Svc

NewSvc 实例化接口规范实现类

type TemporaryWorker

type TemporaryWorker interface {
	SelectTemporaryWorker(en *model.TemporaryWorker, pg *entity.Pagination) ([]*model.TemporaryWorker, int32, error)
	CreateTemporaryWorker(en *entity.TemporaryWorker) (*entity.TemporaryWorker, error)
}

func NewTemporaryWorker

func NewTemporaryWorker(dao dao.Dao) TemporaryWorker

type TurnoverRecord

type TurnoverRecord interface {
	SelectTurnoverRecord(record *entity.TurnoverRecord, pg *entity.Pagination) ([]*model.TurnoverRecord, int32, error)
	ApplicationForResignation(record *entity.TurnoverRecord) (*entity.TurnoverRecord, error)
	ApprovalApplication(record *entity.TurnoverRecord, userPk int64) (*entity.TurnoverRecord, error)
}

func NewTurnoverRecord

func NewTurnoverRecord(dao dao.Dao) TurnoverRecord

type User

type User interface {
	Find(*entity.User) (*entity.User, error)
	Save(*entity.User) (*entity.User, error)
	UpdatePhone(*entity.User) error
	SelectAccountPage(*entity.User, *entity.Pagination) ([]*model.QfqzAccountModel, int64, error)
	SelectEnterpriseAccountPage(user *model.QfqzAccountModelForEnterprise, page *entity.Pagination) ([]*model.QfqzAccountModelForEnterprise, int64, error)
	SelectUser(*entity.User, *entity.Pagination) ([]*model.QfqzUserModel, int64, error)
	FindUser(*entity.User) (*model.QfqzUserModel, error)
	FindOaOpenid(unionId string) (openid string)
	UpdateBaseInfo(*entity.User) error
}

func NewUser

func NewUser(dao dao.Dao) User

NewUser 实例化接口规范实现类

type UserClient

type UserClient interface {
	DeleteByUserPkAndClientType(client *entity.UserClient) error
}

func NewUserClient

func NewUserClient(dao dao.Dao) UserClient

NewUserClient 实例化接口规范实现类

type UserCredentials

type UserCredentials interface {
	FindCardByUserPk(credentials *entity.UserCredentials) (*entity.UserCredentials, error)
	FindListCardByUserPk(credentials *entity.UserCredentials) ([]*entity.UserCredentials, error)
	Find(credentials *entity.UserCredentials) (*entity.UserCredentials, error)
	Create(credentials *entity.UserCredentials) (*entity.UserCredentials, error)
	Delete(credentials *entity.UserCredentials) error
	Update(credentials *entity.UserCredentials) error
}

func NewUserCredentials

func NewUserCredentials(dao dao.Dao) UserCredentials

NewQfqzUser 实例化接口规范实现类

type UserEntry

type UserEntry interface {
	Create(en *entity.UserEntry) (*entity.UserEntry, error)
	Select(en *model.UserEntryModel, pg *entity.Pagination, st, et *time.Time) ([]*model.UserEntryModel, int32, error)
	Update(en *entity.UserEntry) (*entity.UserEntry, error)
	FindByPk(en *entity.UserEntry) (*entity.UserEntry, error)
	CreateUserEntry(us *entity.User, e *entity.UserEntry) (*entity.UserEntry, error)
	Count(en *entity.UserEntry, st, et *time.Time) (int32, error)
}

func NewUserEntry

func NewUserEntry(dao dao.Dao) UserEntry

type UserPermission

type UserPermission interface {
	Create(*entity.UserPermission) (*entity.UserPermission, error)
	CreateForCorporate(in *entity.UserPermission) error
	Delete(*entity.UserPermission) error
	Select(*entity.UserPermission, *dao.Pagination) ([]*entity.UserPermission, *dao.Pagination, error)
	SelectWithUserMessage(in *entity.UserPermission, pg *dao.Pagination) ([]*model.UserPermissionModel, *dao.Pagination, error)
	SelectWithEnterpriseUserMessage(in *entity.UserPermission, pg *dao.Pagination) ([]*model.UserPermissionForEnterprise, *dao.Pagination, error)
	SelectPermissionByUserPkAndEnterprisePk(in *entity.UserPermission) ([]*entity.Permission, error)
	Update(*entity.UserPermission) (*entity.UserPermission, error)
	SelectAllUserPermission(in *entity.UserPermission) ([]*entity.UserPermission, error)
	SelectUserInterfaceKeyByUserPkAndEnterprisePk(in *entity.UserPermission) ([]string, error)
	CompareUserInterfaceKey(in *entity.UserPermission, interfaceKey string) (bool, error)
	FullRefreshUserPermissionByUserPkAndEnterprisePk(userPk, enterprisePk int64) error
	CheckFullRefreshUserPermissionByUserPkAndEnterprisePk(userPk, enterprisePk int64) bool
	GetUserPermissionByUserPkAndEnterprisePkForRedis(userPk, enterprisePk int64) (*pb.FullUserPermissionResp, error)
}

func NewUserPermission

func NewUserPermission(dao dao.Dao) UserPermission

NewUserPermission 实例化接口规范实现类

type UserProfession

type UserProfession interface {
	GetProfessionUsers(user *model.QfqzProfessionUserModel, e *entity.Pagination) ([]*model.QfqzProfessionUserModel, int32, error)
	SelectUserProfession(in *model.UserProfessionQuery, pg *dao.Pagination) ([]*model.UserProfession, *dao.Pagination, error)
	SelectUserProfessionForPlatform(in *model.UserProfessionForPlatformQuery, pg *dao.Pagination) ([]*model.UserProfessionForPlatform, *dao.Pagination, error)
	SelectProjectForUserProfession(in *model.ProjectQueryForUserProfession) ([]*model.Project, error)
	CheckUserProfessionIsRealName(userName string, userPk int64) int32
	SelectUserCredentials(in *entity.UserCredentials) ([]*entity.UserCredentials, error)
	SelectUserEnterpriseByUserPk(userPk int64) ([]*model.UserProfessionWithEnterpriseNameAndStatus, error)
	FindEnterpriseAddressCodeList(areaPermission *entity.EnterpriseAreaPermission) ([]*entity.EnterpriseAreaPermission, error)
	SelectUserProfessionForSupervisePlatform(in *model.UserProfessionForSupervisePlatformQuery, pg *dao.Pagination) ([]*model.UserProfessionForPlatform, *dao.Pagination, error)
	SelectProjectNoPage(in *entity.Project) ([]*entity.Project, error)
}

func NewUserProfession

func NewUserProfession(dao dao.Dao) UserProfession

NewUserProfession 实例化接口规范实现类

type UserRealNameAuthenticationLog

type UserRealNameAuthenticationLog interface {
	VerifyUser(name, idCard, face string) error
}

func NewUserRealNameAuthenticationLog

func NewUserRealNameAuthenticationLog(dao dao.Dao) UserRealNameAuthenticationLog

NewUserRealNameAuthenticationLog 实例化接口规范实现类

type Wechat

type Wechat interface {
	Oa() oa.App
	Mp() mp.App
	OaSaveSubscribe(string, string, int64)
	OaScan(string, string, string) error
	GetWxOaQrCode() (*pb.LoginQrCodeResp, error)
	PlatformLogin(string, string) error
	PlatformLoginLoop(key string) (string, error)
	AppletLogin(code string) (string, error)
	AppletRegister(loginCode, phoneCode, name string) (string, error)
	GetWxMpPhoneNumber(code string) (string, error)
	CreateEnterprise(*entity.User, string, *entity.Enterprise) error
	CreateEnterpriseForRelationProject(user *entity.User, code string, enterprise *entity.Enterprise) (*entity.Enterprise, error)
}

func NewWechat

func NewWechat(dao dao.Dao) Wechat

Jump to

Keyboard shortcuts

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