domain

package
v0.0.0-...-0cac348 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: AGPL-3.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const LoginCodeFreezeTimeBlankObj = "BLANK"
View Source
const OrcConfigSql = consts.TemplateDirPrefix + "ppm_orc_config.template"
View Source
const PpmTemTeamSql = consts.TemplateDirPrefix + "ppm_tem_team.template"

Variables

This section is empty.

Functions

func AddOrgMember

func AddOrgMember(orgId, userId int64, operatorId int64, inCheck bool, inDisabled bool) errs.SystemErrorInfo

增加组织成员,添加关联以及加入顶级部门 inCheck:是否需要被审核

func AddUserOrgRelation

func AddUserOrgRelation(orgId, userId int64, inUsed bool, inCheck bool, inDisabled bool) errs.SystemErrorInfo

添加用户和组织关联

func AssemblyOrg

func AssemblyOrg(corpId string, org *po.PpmOrgOrganization) errs.SystemErrorInfo

func AssemblyOrgOutInfo

func AssemblyOrgOutInfo(corpId string, orgOutInfo *po.PpmOrgOrganizationOutInfo) errs.SystemErrorInfo

组装外部信息

func AssemblyUser

func AssemblyUser(user *po.PpmOrgUser, userDetailResp sdk.GetUserDetailResp)

func AssemblyUserOutInfo

func AssemblyUserOutInfo(userOutInfo *po.PpmOrgUserOutInfo, userDetailResp sdk.GetUserDetailResp)

func AuthCodeVerify

func AuthCodeVerify(authType, addressType int, contactAddress, authCode string) errs.SystemErrorInfo

func BatchGetUserDetailInfo

func BatchGetUserDetailInfo(userIds []int64) ([]bo.UserInfoBo, errs.SystemErrorInfo)

func BindUserName

func BindUserName(userId int64, addressType int, username string) errs.SystemErrorInfo

func BoundDepartmentUser

func BoundDepartmentUser(orgId int64, userIds []int64, departmentId, operatorId int64, isLeaderFlag bool) errs.SystemErrorInfo

绑定部门用户,带分布式锁

func BoundOrgMemberToTopDepartment

func BoundOrgMemberToTopDepartment(orgId int64, userIds []int64, operatorId int64) (int64, errs.SystemErrorInfo)

func CheckSMSLoginCodeFreezeTime

func CheckSMSLoginCodeFreezeTime(authType, addressType int, address string) errs.SystemErrorInfo

func ClearBaseUserInfo

func ClearBaseUserInfo(orgId, userId int64) errs.SystemErrorInfo

func ClearBaseUserInfoBatch

func ClearBaseUserInfoBatch(orgId int64, userIds []int64) errs.SystemErrorInfo

批量清楚用户缓存信息

func ClearCacheBaseOrgInfo

func ClearCacheBaseOrgInfo(sourceChannel string, orgId int64) errs.SystemErrorInfo

func ClearPwdLoginCode

func ClearPwdLoginCode(loginName string) errs.SystemErrorInfo

func ClearSMSLoginCode

func ClearSMSLoginCode(authType, addressType int, phoneNumber string) errs.SystemErrorInfo

func ClearSMSLoginCodeAllCache

func ClearSMSLoginCodeAllCache(authType, addressType int, phoneNumber string) errs.SystemErrorInfo

func ClearSMSLoginCodeFreezeTime

func ClearSMSLoginCodeFreezeTime(authType, addressType int, phoneNumber string) errs.SystemErrorInfo

func ClearSMSLoginCodeVerifyFailTimesIncrement

func ClearSMSLoginCodeVerifyFailTimesIncrement(authType, addressType int, phoneNumber string) errs.SystemErrorInfo

func ClearUserCacheInfo

func ClearUserCacheInfo(token string) errs.SystemErrorInfo

func CreateOrg

func CreateOrg(createOrgBo bo.CreateOrgBo, creatorId int64, sourceChannel, sourcePlatform string, outOrgId string) (int64, errs.SystemErrorInfo)

func DeleteUserConfigInfo

func DeleteUserConfigInfo(orgId int64, userId int64) errs.SystemErrorInfo

func DingAuth

func DingAuth(corpId, openId, name string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func DingDingInit

func DingDingInit(corpId string, orgId int64, roleInitResp *bo.RoleInitResp, tx sqlbuilder.Tx) error

暂时钉钉专有的初始化流程

func FsAuth

func FsAuth(tenantKey, outUserId string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GeneralInitOrg

func GeneralInitOrg(initOrgBo bo.InitOrgBo, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

通用版

func GeneralOrgConfigInfoInit

func GeneralOrgConfigInfoInit(orgId int64, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织配置初始化

func GeneralOrgInfoInit

func GeneralOrgInfoInit(initOrgBo bo.InitOrgBo, isDingTalk bool, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织信息初始化

func GeneralOrgOutInfoInit

func GeneralOrgOutInfoInit(initOrgBo bo.InitOrgBo, orgId int64, isDingTalk bool, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织外部信息初始化

func GetBaseOrgInfo

func GetBaseOrgInfo(sourceChannel string, orgId int64) (*bo.BaseOrgInfoBo, errs.SystemErrorInfo)

func GetBaseOrgInfoByOutOrgId

func GetBaseOrgInfoByOutOrgId(sourceChannel string, outOrgId string) (*bo.BaseOrgInfoBo, errs.SystemErrorInfo)

func GetBaseOrgOutInfo

func GetBaseOrgOutInfo(sourceChannel string, orgId int64) (*bo.BaseOrgOutInfoBo, errs.SystemErrorInfo)

func GetBaseUserInfo

func GetBaseUserInfo(sourceChannel string, orgId int64, userId int64) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

sourceChannel可以为空

func GetBaseUserInfoBatch

func GetBaseUserInfoBatch(sourceChannel string, orgId int64, userIds []int64) ([]bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetBaseUserInfoByEmpId

func GetBaseUserInfoByEmpId(sourceChannel string, orgId int64, empId string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetBaseUserOutInfo

func GetBaseUserOutInfo(sourceChannel string, orgId int64, userId int64) (*bo.BaseUserOutInfoBo, errs.SystemErrorInfo)

func GetBaseUserOutInfoBatch

func GetBaseUserOutInfoBatch(sourceChannel string, orgId int64, userIds []int64) ([]bo.BaseUserOutInfoBo, errs.SystemErrorInfo)

func GetBaseUserOutInfoByUserIds

func GetBaseUserOutInfoByUserIds(sourceChannel string, orgId int64, userIds []int64) ([]bo.BaseUserOutInfoBo, errs.SystemErrorInfo)

func GetCorpAuthInfo

func GetCorpAuthInfo(corpId string) (sdk.GetAuthInfoResp, errs.SystemErrorInfo)

func GetDepartmentBoList

func GetDepartmentBoList(page uint, size uint, cond db.Cond) (*[]bo.DepartmentBo, int64, errs.SystemErrorInfo)

func GetDepartmentBoWithOrg

func GetDepartmentBoWithOrg(id int64, orgId int64) (*bo.DepartmentBo, errs.SystemErrorInfo)

func GetDepartmentMembers

func GetDepartmentMembers(orgId int64, departmentId *int64) ([]bo.DepartmentMemberInfoBo, errs.SystemErrorInfo)

func GetDingTalkBaseUserInfo

func GetDingTalkBaseUserInfo(orgId int64, userId int64) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetDingTalkBaseUserInfoByEmpId

func GetDingTalkBaseUserInfoByEmpId(orgId int64, empId string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetFeiShuBaseUserInfo

func GetFeiShuBaseUserInfo(orgId int64, userId int64) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetFeiShuBaseUserInfoByEmpId

func GetFeiShuBaseUserInfoByEmpId(orgId int64, empId string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetGeneralOrgInfoByOutOrgId

func GetGeneralOrgInfoByOutOrgId(outOrgId string, permanentCode string, sourceChannel string, isDingTalk bool, tx sqlbuilder.Tx) (baseOrgInfo *bo.BaseOrgInfoBo, updateFlag *bool, returnErr errs.SystemErrorInfo)

func GetOrgBoByCode

func GetOrgBoByCode(code string) (*bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgBoById

func GetOrgBoById(orgId int64) (*bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgBoList

func GetOrgBoList() ([]bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgBoListByIds

func GetOrgBoListByIds(orgIds []int64) (*[]bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgByOutOrgId

func GetOrgByOutOrgId(sourceChannel, outOrgId string) (*bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgIdByOutOrgId

func GetOrgIdByOutOrgId(sourceChannel string, outOrgId string) (int64, errs.SystemErrorInfo)

func GetOrgIdListBySourceChannel

func GetOrgIdListBySourceChannel(sourceChannel string, page int, size int) ([]int64, errs.SystemErrorInfo)

func GetOrgInfoByOutOrgId

func GetOrgInfoByOutOrgId(outOrgId string, sourceChannel string) (*bo.BaseOrgInfoBo, errs.SystemErrorInfo)

func GetOrgUserInfoListBySourceChannel

func GetOrgUserInfoListBySourceChannel(orgId int64, sourceChannel string, page, size int) ([]bo.OrgUserInfo, int64, errs.SystemErrorInfo)

通过渠道获取组织用户信息

func GetOrganizationUserList

func GetOrganizationUserList(orgId int64, page, size int, input *vo.OrgUserListReq, allUserHaveRoleIds []int64) (uint64, []bo.PpmOrgUserOrganizationBo, errs.SystemErrorInfo)

func GetOutDeptAndInnerDept

func GetOutDeptAndInnerDept(orgId int64, tx *sqlbuilder.Tx) (map[string]int64, errs.SystemErrorInfo)

func GetOutUserInfo

func GetOutUserInfo(outUserId, sourceChannel string) (*bo.UserOutInfoBo, errs.SystemErrorInfo)

func GetOutUserInfoListBySourceChannel

func GetOutUserInfoListBySourceChannel(sourceChannel string, page int, size int) ([]bo.UserOutInfoBo, errs.SystemErrorInfo)

func GetPhoneNumberWhiteList

func GetPhoneNumberWhiteList() ([]string, errs.SystemErrorInfo)

func GetPwdLoginCode

func GetPwdLoginCode(loginName string) (string, errs.SystemErrorInfo)

func GetSMSLoginCode

func GetSMSLoginCode(authType, addressType int, phoneNumber string) (string, errs.SystemErrorInfo)

func GetSuiteTicket

func GetSuiteTicket() (string, errs.SystemErrorInfo)

func GetTopDepartmentInfo

func GetTopDepartmentInfo(orgId int64) (*bo.DepartmentBo, errs.SystemErrorInfo)

func GetTopDepartmentInfoList

func GetTopDepartmentInfoList(orgId int64) ([]bo.DepartmentBo, errs.SystemErrorInfo)

func GetUserBo

func GetUserBo(userId int64) (*bo.UserInfoBo, bool, errs.SystemErrorInfo)

func GetUserConfigInfo

func GetUserConfigInfo(orgId int64, userId int64) (*bo.UserConfigBo, errs.SystemErrorInfo)

func GetUserDetail

func GetUserDetail(userId, corpId string) (*sdk.GetUserDetailResp, errs.SystemErrorInfo)

func GetUserIdBatchByEmpId

func GetUserIdBatchByEmpId(sourceChannel string, orgId int64, empIds []string) ([]int64, errs.SystemErrorInfo)

func GetUserIdByEmpId

func GetUserIdByEmpId(sourceChannel string, orgId int64, empId string) (int64, errs.SystemErrorInfo)

func GetUserInfo

func GetUserInfo(orgId int64, userId int64, sourceChannel string) (*bo.UserInfoBo, bool, errs.SystemErrorInfo)

func GetUserInfoByEmail

func GetUserInfoByEmail(email string) (*bo.UserInfoBo, errs.SystemErrorInfo)

func GetUserInfoByLoginName

func GetUserInfoByLoginName(loginName string) (*bo.UserInfoBo, errs.SystemErrorInfo)

loginName为允许为账号,邮箱,手机号

func GetUserInfoByLoginNameAndPwd

func GetUserInfoByLoginNameAndPwd(loginName string, pwd string) (*bo.UserInfoBo, errs.SystemErrorInfo)

如果err不等于空,说明用户未注册

func GetUserInfoByMobile

func GetUserInfoByMobile(phoneNumber string) (*bo.UserInfoBo, errs.SystemErrorInfo)

如果err不等于空,说明用户未注册

func GetUserInfoByPwd

func GetUserInfoByPwd(loginName string, pwd string) (*bo.UserInfoBo, errs.SystemErrorInfo)

loginName为允许为账号,邮箱,手机号

func GetUserInfoListByOrg

func GetUserInfoListByOrg(orgId int64) ([]bo.SimpleUserInfoBo, errs.SystemErrorInfo)

func GetUserInviteCodeInfo

func GetUserInviteCodeInfo(inviteCode string) (*bo.InviteInfoBo, errs.SystemErrorInfo)

func GetUserOrganizationIdList

func GetUserOrganizationIdList(userId int64) (*[]bo.PpmOrgUserOrganizationBo, errs.SystemErrorInfo)

用来返回用户组织列表

func GetUserOrganizationNewestRelation

func GetUserOrganizationNewestRelation(orgId, userId int64) (*bo.PpmOrgUserOrganizationBo, errs.SystemErrorInfo)

用来获取用户最新的组织关系

func InitDepartment

func InitDepartment(orgId int64, outOrgId string, sourceChannel string, superAdminRoleId, normalAdminRoleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

初始化部门

func InitDingTalkDepartment

func InitDingTalkDepartment(orgId int64, corpId string, superAdminRoleId, normalAdminRoleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func InitDingTalkUser

func InitDingTalkUser(orgId int64, corpId string, unionId string, tx sqlbuilder.Tx) (*bo.UserInfoBo, errs.SystemErrorInfo)

func InitDingTalkUserList

func InitDingTalkUserList(orgId int64, tenantKey string, fsDepIdMap map[int64]int64, superAdminRoleId, normalAdminRoleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func InitFsDepartment

func InitFsDepartment(orgId int64, tenantKey string, superAdminRoleId, normalAdminRoleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func InitFsManager

func InitFsManager(orgId int64, userId int64, roleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func InitFsUser

func InitFsUser(orgId int64, tenantKey string, openUserId string, tx sqlbuilder.Tx) (*bo.UserInfoBo, errs.SystemErrorInfo)

func InitFsUserList

func InitFsUserList(orgId int64, tenantKey string, fsDepIdMap map[string]int64, superAdminRoleId, normalAdminRoleId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

* orgId: 组织id fsDepIdMap: 飞书部门id-内部部门id

func InitOrg

func InitOrg(initOrgBo bo.InitOrgBo, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

留着做对比方便的注释

func InitUserRoles

func InitUserRoles(dingtalkUserRoleBos []*bo.DingTalkUserRoleBo, orgId, teamId int64, corpId string,
	roleInitResp *bo.RoleInitResp, tx sqlbuilder.Tx) (int64, error)

func InsertUserConfig

func InsertUserConfig(orgId, userId int64) (*bo.UserConfigBo, errs.SystemErrorInfo)

func JudgeDepartmentIsExist

func JudgeDepartmentIsExist(orgId int64, name string) (bool, errs.SystemErrorInfo)

func JudgeUserIsAdmin

func JudgeUserIsAdmin(outOrgId string, outUserId string, sourceChannel string) bool

func LarkDepartmentInit

func LarkDepartmentInit(orgId int64, sourceChannel, sourcePlatform string, orgName string, creator int64) (int64, errs.SystemErrorInfo)

func LarkUserInit

func LarkUserInit(orgId int64, sourceChannel, sourcePlatform string, departmentId int64) (int64, int64, errs.SystemErrorInfo)

初始化张三和李四

func ModifyOrgMemberCheckStatus

func ModifyOrgMemberCheckStatus(orgId int64, memberIds []int64, checkStatus int, operatorId int64) errs.SystemErrorInfo

修改组织成员审核状态, 审核状态,1待审核,2审核通过,3审核不过

func ModifyOrgMemberStatus

func ModifyOrgMemberStatus(orgId int64, memberIds []int64, status int, operatorId int64) errs.SystemErrorInfo

修改组织成员状态,企业用户状态, 1可用,2禁用

func OrgConfigInfoInit

func OrgConfigInfoInit(orgId int64, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织配置初始化

func OrgInfoInit

func OrgInfoInit(initOrgBo bo.InitOrgBo, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织信息初始化

func OrgInit

func OrgInit(corpId string, permanentCode string, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

func OrgOutInfoInit

func OrgOutInfoInit(initOrgBo bo.InitOrgBo, orgId int64, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织外部信息初始化

func OrgOwnerInit

func OrgOwnerInit(orgId int64, owner int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func OrgSysConfigInit

func OrgSysConfigInit(tx sqlbuilder.Tx, orgId int64) errs.SystemErrorInfo

func PushAddOrgMemberNotice

func PushAddOrgMemberNotice(orgId, depId int64, memberIds []int64)

func PushOrgTrends

func PushOrgTrends(orgTrendsBo bo.OrgTrendsBo)

func PushRemoveOrgMemberNotice

func PushRemoveOrgMemberNotice(orgId int64, memberIds []int64)

func RemoveOrgMember

func RemoveOrgMember(orgId int64, memberIds []int64, operatorId int64) errs.SystemErrorInfo

修改组织成员

func ScheduleOrganizationPageList

func ScheduleOrganizationPageList(size int, page int) (*[]*bo.ScheduleOrganizationListBo, int64, errs.SystemErrorInfo)

func SetPhoneNumberWhiteList

func SetPhoneNumberWhiteList() ([]string, errs.SystemErrorInfo)

func SetPwdLoginCode

func SetPwdLoginCode(loginName, code string) errs.SystemErrorInfo

func SetSMSLoginCode

func SetSMSLoginCode(authType, addressType int, phoneNumber string, authCode string) errs.SystemErrorInfo

func SetSMSLoginCodeFreezeTime

func SetSMSLoginCodeFreezeTime(authType, addressType int, phoneNumber string, minute int) errs.SystemErrorInfo

func SetSMSLoginCodeVerifyFailTimesIncrement

func SetSMSLoginCodeVerifyFailTimesIncrement(authType, addressType int, phoneNumber string) (int64, errs.SystemErrorInfo)

func SetUserInviteCodeInfo

func SetUserInviteCodeInfo(inviteCode string, inviteInfo bo.InviteInfoBo) errs.SystemErrorInfo

func SetUserPassword

func SetUserPassword(userId int64, password string, salt string, operatorId int64) errs.SystemErrorInfo

func TeamInit

func TeamInit(orgId int64, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

func TeamOwnerInit

func TeamOwnerInit(teamId int64, owner int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

func TeamUserInit

func TeamUserInit(orgId int64, teamId int64, userId int64, isRoot bool, tx sqlbuilder.Tx) errs.SystemErrorInfo

func UnBoundDepartmentUser

func UnBoundDepartmentUser(orgId int64, userIds []int64, operatorId int64, tx sqlbuilder.Tx) errs.SystemErrorInfo

解绑部门用户,解绑当前用户所在的所有部门

func UnbindUserName

func UnbindUserName(userId int64, addressType int) errs.SystemErrorInfo

func UpdateOrg

func UpdateOrg(updateBo bo.UpdateOrganizationBo) errs.SystemErrorInfo

func UpdateUserConfig

func UpdateUserConfig(orgId, operatorId int64, userConfigBo bo.UserConfigBo) errs.SystemErrorInfo

func UpdateUserDefaultOrg

func UpdateUserDefaultOrg(userId, orgId int64) errs.SystemErrorInfo

func UpdateUserDefaultProjectIdConfig

func UpdateUserDefaultProjectIdConfig(orgId, operatorId int64, userConfigBo bo.UserConfigBo, defaultProjectId int64) errs.SystemErrorInfo

func UpdateUserInfo

func UpdateUserInfo(userId int64, upd mysql.Upd) errs.SystemErrorInfo

func UpdateUserPcConfig

func UpdateUserPcConfig(orgId, operatorId int64, userConfigBo bo.UserConfigBo) errs.SystemErrorInfo

func UserInit

func UserInit(orgId int64, corpId string, outUserId string, sourceChannel string) (*bo.BaseUserInfoBo, errs.SystemErrorInfo)

func UserInitByOrg

func UserInitByOrg(userId string, corpId string, orgId int64, tx sqlbuilder.Tx) (int64, errs.SystemErrorInfo)

组织初始化时-用户初始化

func UserLoginHook

func UserLoginHook(userId int64, orgId int64) errs.SystemErrorInfo

用户登录时回调

func UserRegister

func UserRegister(regInfo bo.UserSMSRegisterInfo) (*bo.UserInfoBo, errs.SystemErrorInfo)

func VerifyOrg

func VerifyOrg(orgId int64, userId int64) bool

校验当前用户是否有效

func VerifyOrgUsers

func VerifyOrgUsers(orgId int64, userIds []int64) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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