dao

package
v0.0.0-...-57ed434 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDepartmentById

func DeleteDepartmentById(id int64, operatorId int64, tx ...sqlbuilder.Tx) (int64, error)

func DeleteDepartmentByOrg

func DeleteDepartmentByOrg(id int64, orgId int64, operatorId int64, tx ...sqlbuilder.Tx) (int64, error)

func DeleteUserDepartmentById

func DeleteUserDepartmentById(id int64, operatorId int64, tx ...sqlbuilder.Tx) (int64, error)

func DeleteUserDepartmentByOrg

func DeleteUserDepartmentByOrg(id int64, orgId int64, operatorId int64, tx ...sqlbuilder.Tx) (int64, error)

func InsertDepartment

func InsertDepartment(po po.PpmOrgDepartment, tx ...sqlbuilder.Tx) error

func InsertDepartmentBatch

func InsertDepartmentBatch(pos []po.PpmOrgDepartment, tx ...sqlbuilder.Tx) error

func InsertUserDepartment

func InsertUserDepartment(po po.PpmOrgUserDepartment, tx ...sqlbuilder.Tx) error

func InsertUserDepartmentBatch

func InsertUserDepartmentBatch(pos []po.PpmOrgUserDepartment, tx ...sqlbuilder.Tx) error

func OrcConfigPageList

func OrcConfigPageList(page int, size int) (*[]*po.PpmOrcConfig, int64, error)

func SelectDepartment

func SelectDepartment(cond db.Cond) (*[]po.PpmOrgDepartment, error)

func SelectDepartmentById

func SelectDepartmentById(id int64) (*po.PpmOrgDepartment, error)

func SelectDepartmentByIdAndOrg

func SelectDepartmentByIdAndOrg(id int64, orgId int64) (*po.PpmOrgDepartment, error)

func SelectDepartmentByPage

func SelectDepartmentByPage(cond db.Cond, pageBo bo.PageBo) (*[]po.PpmOrgDepartment, uint64, error)

func SelectOneDepartment

func SelectOneDepartment(cond db.Cond) (*po.PpmOrgDepartment, error)

func SelectOneUserDepartment

func SelectOneUserDepartment(cond db.Cond) (*po.PpmOrgUserDepartment, error)

func SelectUserDepartment

func SelectUserDepartment(cond db.Cond) (*[]po.PpmOrgUserDepartment, error)

func SelectUserDepartmentById

func SelectUserDepartmentById(id int64) (*po.PpmOrgUserDepartment, error)

func SelectUserDepartmentByIdAndOrg

func SelectUserDepartmentByIdAndOrg(id int64, orgId int64) (*po.PpmOrgUserDepartment, error)

func SelectUserDepartmentByPage

func SelectUserDepartmentByPage(cond db.Cond, pageBo bo.PageBo) (*[]po.PpmOrgUserDepartment, uint64, error)

func UpdateDepartment

func UpdateDepartment(po po.PpmOrgDepartment, tx ...sqlbuilder.Tx) error

func UpdateDepartmentByCond

func UpdateDepartmentByCond(cond db.Cond, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

func UpdateDepartmentById

func UpdateDepartmentById(id int64, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

func UpdateDepartmentByOrg

func UpdateDepartmentByOrg(id int64, orgId int64, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

func UpdateUserDepartment

func UpdateUserDepartment(po po.PpmOrgUserDepartment, tx ...sqlbuilder.Tx) error

func UpdateUserDepartmentByCond

func UpdateUserDepartmentByCond(cond db.Cond, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

func UpdateUserDepartmentById

func UpdateUserDepartmentById(id int64, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

func UpdateUserDepartmentByOrg

func UpdateUserDepartmentByOrg(id int64, orgId int64, upd mysql.Upd, tx ...sqlbuilder.Tx) (int64, error)

Types

type DingCoolApInterface

type DingCoolApInterface interface {
	Get(conversationId string) (*po.PpmOrgDingCoolApp, errs.SystemErrorInfo)

	GetByProjectId(orgId, projectId int64) ([]*po.PpmOrgDingCoolApp, errs.SystemErrorInfo)

	CreateOrUpdate(m *po.PpmOrgDingCoolApp) errs.SystemErrorInfo

	Delete(conversationId string) errs.SystemErrorInfo

	DeleteByProjectId(orgId, projectId int64) errs.SystemErrorInfo
}

func GetDingCoolApp

func GetDingCoolApp() DingCoolApInterface

type GlobalUserInterface

type GlobalUserInterface interface {
	// Create 创建globalUser
	Create(m *po.PpmOrgGlobalUser, tx sqlbuilder.Tx) error
	// Delete 删除globalUser
	Delete(id int64, tx sqlbuilder.Tx) error
	// GetGlobalUserByMobile 根据手机号获取globalUser
	GetGlobalUserByMobile(mobile string) (*po.PpmOrgGlobalUser, error)
	// GetGlobalUsersByMobiles 根据手机号列表获取globalUser列表
	GetGlobalUsersByMobiles(mobiles []string) ([]*po.PpmOrgGlobalUser, error)
	// GetGlobalUserById 通过id获取globalUser
	GetGlobalUserById(globalId int64) (*po.PpmOrgGlobalUser, error)
	// GetGlobalUserByWeiXinId 通过id获取globalUser
	GetGlobalUserByWeiXinId(openId string) (*po.PpmOrgGlobalUser, error)
	// GetMobilesMapByIds 获取globalId对应mobile的map
	GetMobilesMapByIds(globalIds []int64) (map[int64]string, error)
	// UpdateGlobalLastLoginInfo 更新最后一次登陆的组织
	UpdateGlobalLastLoginInfo(globalUserId, userId, orgId int64) error
	// UpdateMobile 替换手机号
	UpdateMobile(globalUserId int64, mobile string, tx sqlbuilder.Tx) error

	UpdateWeiXinOpenId(tx sqlbuilder.Tx, mobile string, openId string) error

	UnbindWeiXinOpenId(tx sqlbuilder.Tx, globalUserId int64) error
}

func GetGlobalUser

func GetGlobalUser() GlobalUserInterface

type GlobalUserRelationInterface

type GlobalUserRelationInterface interface {
	// CreateRelations 创建关联关系
	CreateRelations(relations []*po.PpmOrgGlobalUserRelation, tx sqlbuilder.Tx) error
	// DeleteRelationsByGlobalUserId 删除关联关系
	DeleteRelationsByGlobalUserId(globalUserId int64, tx sqlbuilder.Tx) error
	// DeleteRelationsByUserId 根据userId删除关联关系
	DeleteRelationsByUserId(userId int64, tx sqlbuilder.Tx) error
	// GetGlobalUserIdByUserId 根据userId获取globalId
	GetGlobalUserIdByUserId(userId int64) (int64, error)
	// GetGlobalUserIdsMapByUserIds 根据userIds获取globalIds
	GetGlobalUserIdsMapByUserIds(userIds []int64) (map[int64][]int64, error)
	// GetUserIdsByGlobalUserId 获取一个globalUser下所有绑定的用户
	GetUserIdsByGlobalUserId(globalUserId int64) ([]int64, error)
	// GetUserIdsByUserId 根据userId,获取其他一起绑定的userId
	GetUserIdsByUserId(userId int64) ([]int64, error)
	// GetRelationsByGlobalUserIds 获取关系列表
	GetRelationsByGlobalUserIds(globalUserIds []int64) ([]*po.PpmOrgGlobalUserRelation, error)
	// UpdateUsersToNewGlobalId 替换绑定关系
	UpdateUsersToNewGlobalId(oldGlobalId, newGlobalId int64, tx sqlbuilder.Tx) error
}

func GetGlobalUserRelation

func GetGlobalUserRelation() GlobalUserRelationInterface

type ThirdLoginInterface

type ThirdLoginInterface interface {
	GetThirdLoginInfo(thirdUserId string) (*po.PpmOrgThirdLoginUser, error)
	GetThirdLoginInfoByUserIds(userIds []int64) ([]*po.PpmOrgThirdLoginUser, error)
	AddThirdLoginInfo(tx sqlbuilder.Tx, info *po.PpmOrgThirdLoginUser) error
	UnBindThirdLogin(tx sqlbuilder.Tx, thirdId string) error
}

func GetThirdLogin

func GetThirdLogin() ThirdLoginInterface

Jump to

Keyboard shortcuts

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