domain

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: 61 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 AddLoginRecord

func AddLoginRecord(orgId, userId int64, sourceChannel string) errs.SystemErrorInfo

添加登录记录

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 AppendUserIntoAdminGroup

func AppendUserIntoAdminGroup(id int64, operateUid int64, userId int64, tx sqlbuilder.Tx) (int64, error)

AppendUserIntoAdminGroup 向管理组中增加一个人

func AssemblyOrgRemarkConfigForAppId

func AssemblyOrgRemarkConfigForAppId(orgBo *bo.OrganizationBo, value int64) string

func AssemblyOrgRemarkConfigForSomeAppId

func AssemblyOrgRemarkConfigForSomeAppId(orgBo *bo.OrganizationBo, valueObj orgvo.SaveOrgSummaryTableAppIdReqVoData) string

func AuthCodeVerify

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

func BatchGetUserDetailInfo

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

func BatchGetUserDetailInfoWithMobile

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

BatchGetUserDetailInfoWithMobile 批量获取用户信息,并查询手机号码

func BindUserDepartments

func BindUserDepartments(orgId, userId int64, departmentIds []int64) errs.SystemErrorInfo

func BindUserName

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

func BindUserRoleGroups

func BindUserRoleGroups(orgId, operator int64, groupIds []int64, userIds []int64) 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 ChangeUserDept

func ChangeUserDept(orgId, operatorId int64, userId int64, deptIds []int64) errs.SystemErrorInfo

func ChangeUserManageGroup

func ChangeUserManageGroup(orgId, operatorId int64, req orgvo.ChangeUserManageGroupReq) errs.SystemErrorInfo

切换用户管理组

func CheckIsActivity11

func CheckIsActivity11() (bool, errs.SystemErrorInfo)

func CheckIsAdmin

func CheckIsAdmin(orgId, curUserId int64) bool

CheckIsAdmin 检查是否是组织的管理员(包含组织拥有者,超管,子管理员)

func CheckIsAdminByAuthRespData

func CheckIsAdminByAuthRespData(authRespData uservo.GetUserAuthorityData) bool

CheckIsAdminByAuthRespData 通过接口返回的数据,判断是否是组织的管理员

func CheckIsLessCodeAccount

func CheckIsLessCodeAccount(userPwd, salt, loginName, inputPwd string) bool

校验是否是无码系统的用户体系。因为无码系统的校验方式和极星的不一致,因此需要多一次校验尝试。

func CheckIsPrivateDeploy

func CheckIsPrivateDeploy() bool

CheckIsPrivateDeploy 检查是否是私有化部署

func CheckLoginNameIsExist

func CheckLoginNameIsExist(addressType int, loginName string) errs.SystemErrorInfo

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

func CheckPhoneAndEmail

func CheckPhoneAndEmail(phoneNumber, email string) errs.SystemErrorInfo

func CheckSMSLoginCodeFreezeTime

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

func CheckUserAccountByLoginName

func CheckUserAccountByLoginName(orgId int64, loginName string) bool

func CheckUserOrgIsConflict

func CheckUserOrgIsConflict(userId, orgId int64) (bool, errs.SystemErrorInfo)

CheckUserOrgIsConflict 检查用户组织是否冲突,先用userId查到对应的globalUserId,然后再通过globalUserId查到绑定的所有组织

func ClearAllOrgUserPayCache

func ClearAllOrgUserPayCache(orgId int64) errs.SystemErrorInfo

ClearAllOrgUserPayCache 清除org的用户的付费缓存,解决付费后延迟问题

func ClearBaseUserInfo

func ClearBaseUserInfo(orgId, userId int64) errs.SystemErrorInfo

func ClearBaseUserInfoBatch

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

批量清楚用户缓存信息

func ClearCacheBaseOrgInfo

func ClearCacheBaseOrgInfo(orgId int64) errs.SystemErrorInfo

func ClearChangeLoginNameSign

func ClearChangeLoginNameSign(orgId, userId int64, addressType int) errs.SystemErrorInfo

func ClearOrgConfig

func ClearOrgConfig(orgId int64) errs.SystemErrorInfo

func ClearPwdLoginCode

func ClearPwdLoginCode(loginName string) errs.SystemErrorInfo

func ClearPwdLoginCodeVerifyFailTimesIncrement

func ClearPwdLoginCodeVerifyFailTimesIncrement(authType, addressType int, 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 CreateIssueSummaryTable

func CreateIssueSummaryTable(orgId, opUserId int64, appName string, remarkObj *orgvo.OrgRemarkConfigType, pkgId int64) (int64, errs.SystemErrorInfo)

CreateIssueSummaryTable 初始化企业后的执行逻辑 调用无码的 app 服务创建任务**汇总表**(创建项目时触发)

func CreateLcFolder

func CreateLcFolder(orgId, opUserId int64, appName string) (appId int64, info errs.SystemErrorInfo)

创建一个目录用于存放表/表单

func CreateOrg

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

func CreateUser

func CreateUser(orgId, userId int64, regInfo orgvo.CreateUserReq) (*bo.UserInfoBo, errs.SystemErrorInfo)

func DeleteDepartmentByDepartmentIds

func DeleteDepartmentByDepartmentIds(orgId int64, departmentIds []string) error

通过 department ids 删除部门信息

func DeleteDepartmentByOrgId

func DeleteDepartmentByOrgId(orgId int64) error

通过 department ids 删除部门信息

func DeleteDepartmentOutInfoByOrgId

func DeleteDepartmentOutInfoByOrgId(orgId int64) error

通过 out department ids 删除部门 out 信息

func DeleteUserConfigInfo

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

func DeleteUserDepartmentByOrgId

func DeleteUserDepartmentByOrgId(orgId int64) error

通过 department ids 删除用户与部门的关联关系

func DeleteUserLocationWithAppId

func DeleteUserLocationWithAppId(orgId, userId int64, appId int64) errs.SystemErrorInfo

func DetectUserInfoInUser

func DetectUserInfoInUser(orgId int64, loginPhones []string) (needRegister []string, needRelateUserIdsMap, needResetCheckStatusUserIdsMap map[int64]string, retErr errs.SystemErrorInfo)

DetectUserInfoInUser 检查是否已经在 user 表中存在的记录、是否已经和组织关联 返回值 needRegister 表示需要重新开始注册; 返回值 needRelate 表示只需要与组织进行关联 新版账户体系下,登录名即手机号(包含地区代码),因而 loginPhones 即 loginNames,而实际上表中的 login_name 不直接使用。 由于统一账户逻辑,一个手机号可能绑定多个user,这个时候要选一个user去跟orgId绑定,默认选第一个,如果有一个user绑定了该org,则globalUser下的所有user都要排除

func FeishuMemberHelpMsgToMq

func FeishuMemberHelpMsgToMq(feishuHelpObjectBo bo.FeishuHelpObjectBo)

func GenDefaultNameByPhone

func GenDefaultNameByPhone(phone string) string

GenNameByPhone 通过手机号生成默认的用户姓名

func GenInviteCode

func GenInviteCode(currentUserId int64, sourcePlatform string) string

func GetActivity20221111Info

func GetActivity20221111Info(orgId int64, userConfigBo bo.UserConfigBo, payActivity11Flag int, userExtraDataMap map[string]interface{}) errs.SystemErrorInfo

func GetAppDeployType

func GetAppDeployType(runMode int) string

GetAppDeployType 获取应用部署类型。public:saas 公共模式;private: 私有化部署

func GetBaseOrgInfo

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

GetBaseOrgInfo usercenter有一份一样的代码,导致缓存有问题,所以这个方法目前先要兼容这些问题

func GetBaseOrgInfoByOutOrgId

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

func GetBaseOrgOutInfo

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

func GetBaseUserInfo

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

sourceChannel可以为空

func GetBaseUserInfoBatch

func GetBaseUserInfoBatch(orgId int64, originUserIds []int64) ([]bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetBaseUserInfoByOpenIdBatch

func GetBaseUserInfoByOpenIdBatch(orgId int64, openIds []string) ([]bo.BaseUserInfoBo,
	errs.SystemErrorInfo)

GetBaseUserInfoByOpenIdBatch 通过 openId 批量查询用户信息

func GetBaseUserOutInfo

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

func GetBaseUserOutInfoBatch

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

func GetBaseUserOutInfoByUserIds

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

func GetCardConfig

func GetCardConfig(orgId, userId int64) (*orgvo.VersionResp, errs.SystemErrorInfo)

func GetChangeLoginNameSign

func GetChangeLoginNameSign(orgId, userId int64, addressType int) errs.SystemErrorInfo

func GetChildrenDepartmentIds

func GetChildrenDepartmentIds(orgId int64, departmentIds []int64) ([]int64, errs.SystemErrorInfo)

func GetCreateTableConfigForSummaryIssue

func GetCreateTableConfigForSummaryIssue(remarkObj *orgvo.OrgRemarkConfigType) string

GetCreateTableConfigForSummaryIssue 汇总表的配置(新的表头定义)

func GetCurrentUserInfoByUserId

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

func GetDepartmentBoList

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

func GetDepartmentBoListByIds

func GetDepartmentBoListByIds(orgId int64, deptIds []int64) (*[]bo.DepartmentBo, errs.SystemErrorInfo)

func GetDepartmentBoWithOrg

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

func GetDepartmentIdsByOutDepartmentIds

func GetDepartmentIdsByOutDepartmentIds(orgId int64, outDepartmentIds []string) ([]int64, errs.SystemErrorInfo)

通过 out department ids 获取星书方的 department ids

func GetDepartmentInfo

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

func GetDepartmentMembers

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

func GetDepartmentMembersPaginate

func GetDepartmentMembersPaginate(orgId int64, sourceChannel string, name *string, page, size int, userIds []int64, ignoreDelete bool, projectId, relationType int64) (int64, []bo.DepartmentMemberInfoBo, errs.SystemErrorInfo)

func GetDuration2Noon

func GetDuration2Noon() int64

GetDuration2Noon 计算当前时间到中午或第二天中午的秒数

func GetExistUserByPhones

func GetExistUserByPhones(orgId int64, phoneNumbers []string) ([]bo.UserInfoBo, errs.SystemErrorInfo)

GetExistUserByPhones 通过多个手机号(即登录名)查询已经存在的部分的用户 通过手机号判断用户是否存在,并且是否关联对应的组织

func GetFunctionConfig

func GetFunctionConfig(orgIds []int64) ([]bo.PpmOrcFunctionConfig, errs.SystemErrorInfo)

特殊功能配置,暂时用不上了

func GetFunctionKeyListByFunctions

func GetFunctionKeyListByFunctions(functions []ordervo.FunctionLimitObj) []string

func GetGlobalUserByMobile

func GetGlobalUserByMobile(mobile string) (*po.PpmOrgGlobalUser, error)

func GetGlobalUserByUserId

func GetGlobalUserByUserId(userId int64) (*po.PpmOrgGlobalUser, errs.SystemErrorInfo)

func GetGlobalUserRelationsByMobile

func GetGlobalUserRelationsByMobile(mobile string) (*bo.GlobalUserRelations, errs.SystemErrorInfo)

func GetGlobalUserRelationsByUserId

func GetGlobalUserRelationsByUserId(userId int64) (*bo.GlobalUserRelations, errs.SystemErrorInfo)

func GetLabConfig

func GetLabConfig(orgId int64) (*bo.GetLabConfigBo, errs.SystemErrorInfo)

func GetLocalOrgUserIdMap

func GetLocalOrgUserIdMap(userIds []int64) (map[int64][]int64, errs.SystemErrorInfo)

userId: orgIds

func GetManageGroupList

func GetManageGroupList(orgId int64, groupIds []int64) ([]*po.LcPerManageGroup, errs.SystemErrorInfo)

func GetManageGroupListByUser

func GetManageGroupListByUser(orgId int64, userId int64) (*po.LcPerManageGroup, errs.SystemErrorInfo)

func GetManageGroupListByUsers

func GetManageGroupListByUsers(orgId int64, userIds []int64) ([]*po.LcPerManageGroup, errs.SystemErrorInfo)

func GetNewUserGuideInfo

func GetNewUserGuideInfo(orgId int64, userConfigBo bo.UserConfigBo,
	userExtraDataMap map[string]interface{}) errs.SystemErrorInfo

func GetNewbieGuideTemplateId

func GetNewbieGuideTemplateId(sourceChannel string) int64

func GetOrgAppTicket

func GetOrgAppTicket(orgId int64) (*bo.AppTicketBo, errs.SystemErrorInfo)

func GetOrgAppTicketFromCache

func GetOrgAppTicketFromCache(key string) (*bo.AppTicketBo, errs.SystemErrorInfo)

func GetOrgBoByCode

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

func GetOrgBoById

func GetOrgBoById(orgId int64, tx ...sqlbuilder.Tx) (*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(outOrgId string) (*bo.OrganizationBo, errs.SystemErrorInfo)

func GetOrgConfig

func GetOrgConfig(orgId int64) (*bo.OrgConfigBo, errs.SystemErrorInfo)

func GetOrgConfigRich

func GetOrgConfigRich(orgId int64) (*orgvo.OrgConfig, errs.SystemErrorInfo)

GetOrgConfigRich 获取组织配置

func GetOrgIdByOutOrgId

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

func GetOrgIdListByPage

func GetOrgIdListByPage(input *orgvo.GetOrgIdListByPageReqVoData, page, size int) ([]int64, errs.SystemErrorInfo)

func GetOrgIdListBySourceChannel

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

GetOrgIdListBySourceChannel 获取组织 id 列表 sourceChannel 为 "-1" 时,表示忽略此筛选条件 isPaid 为 -1 时,表示忽略此筛选条件

func GetOrgInfoByOutOrgId

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

func GetOrgInfosByUserIds

func GetOrgInfosByUserIds(userIds []int64) ([]*po.PpmOrgOrganization, errs.SystemErrorInfo)

func GetOrgMemberBaseInfoListByUser

func GetOrgMemberBaseInfoListByUser(orgId, userId int64) (*bo.OrgMemberBaseInfoBo, errs.SystemErrorInfo)

func GetOrgMemberCount

func GetOrgMemberCount(orgId int64) (uint64, errs.SystemErrorInfo)

func GetOrgMemberInfoByUserId

func GetOrgMemberInfoByUserId(orgId, userId int64) (*bo.UserInfoBo, errs.SystemErrorInfo)

func GetOrgOutInfo

func GetOrgOutInfo(orgId int64) (*bo.OrgOutInfoBo, errs.SystemErrorInfo)

func GetOrgOutInfoByOutOrgId

func GetOrgOutInfoByOutOrgId(orgId int64, outOrgId string) (*po.PpmOrgOrganizationOutInfo, errs.SystemErrorInfo)

func GetOrgOutInfoByTenantKey

func GetOrgOutInfoByTenantKey(tenantKey string) (*bo.OrgOutInfoBo, errs.SystemErrorInfo)

func GetOrgOutInfoWithoutLocal

func GetOrgOutInfoWithoutLocal(orgId int64) (*bo.OrgOutInfoBo, errs.SystemErrorInfo)

func GetOrgPayFunction

func GetOrgPayFunction(orgId int64) ([]ordervo.FunctionLimitObj, errs.SystemErrorInfo)

func GetOrgSourceChannel

func GetOrgSourceChannel(orgId int64, sourceChannel string) string

func GetOrgSuperAdminInfo

func GetOrgSuperAdminInfo(orgId int64) ([]*orgvo.GetOrgSuperAdminInfoData, errs.SystemErrorInfo)

func GetOrgSysAdmin

func GetOrgSysAdmin(orgIds []int64) (map[int64][]int64, errs.SystemErrorInfo)

GetOrgSysAdmin 获取组织超管,返回结果 orgId -> adminIds

func GetOrgUserInfo

func GetOrgUserInfo(userId, orgId int64) (*po.PpmOrgUserOrganization, error)

GetOrgUserInfo 这个userId其实有可能并不属于orgId,所以需要先查询这个userId绑定的globalUserId下的所有userIds,看看到底这个org属于哪个userId

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 GetOutDeptIdMapToDeptId

func GetOutDeptIdMapToDeptId(orgId int64, outDeptIds []string) (map[string]int64, error)

通过多个 outDeptId,查询对应的我方部门id

func GetOutOrgInfoByOrgIdBatch

func GetOutOrgInfoByOrgIdBatch(orgIds []int64) ([]*po.PpmOrgOrganizationOutInfo, errs.SystemErrorInfo)

func GetOutOrgListByOutOrgIdsAndSource

func GetOutOrgListByOutOrgIdsAndSource(outOrgIds []string) ([]po.PpmOrgOrganizationOutInfo, errs.SystemErrorInfo)

GetOutOrgListByOutOrgIdsAndSource 通过 outOrgIds 查询外部组织信息

func GetOutUserInfoListByOrgId

func GetOutUserInfoListByOrgId(orgId int64) ([]*po.PpmOrgUserOutInfo, errs.SystemErrorInfo)

func GetOutUserInfoListBySourceChannel

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

func GetOutUserInfoListByUserIds

func GetOutUserInfoListByUserIds(idList []int64) ([]bo.UserOutInfoBo, errs.SystemErrorInfo)

批量查询用户外部信息

func GetOutUserName

func GetOutUserName(orgId, userId int64, sourceChannel string) (string, errs.SystemErrorInfo)

func GetPhoneNumberWhiteList

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

func GetPwdLoginCode

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

func GetPwdLoginCodeVerifyFreeze

func GetPwdLoginCodeVerifyFreeze(authType, addressType int, loginName string) (string, errs.SystemErrorInfo)

func GetRemainDays

func GetRemainDays(payEndTime time.Time) uint

GetRemainDays 根据用户使用付费产品的截止时间,计算剩余天数。不足一天的按一天计算。

func GetRemindPopUp

func GetRemindPopUp(userConfigBo *bo.UserConfigBo, remindBindPhone int) int

func GetSMSLoginCode

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

func GetShareUrl

func GetShareUrl(key string) (string, errs.SystemErrorInfo)

func GetSimpleOrgOutInfo

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

func GetSysManageGroup

func GetSysManageGroup(orgId int64) (*po.LcPerManageGroup, error)

func GetTopDepartmentInfo

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

func GetTopDepartmentInfoList

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

func GetTransferOrgUserMatchInfo

func GetTransferOrgUserMatchInfo(originOrgId, newOrgId int64) (*bo.TransferMatchInfo, errs.SystemErrorInfo)

GetTransferOrgUserMatchInfo 获取两个组织里面的用户分别都绑定同一个手机的map,newUserId->originUserId

func GetUserBo

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

func GetUserConfigInfo

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

func GetUserConfigInfoBatch

func GetUserConfigInfoBatch(orgId int64, userIds []int64) ([]bo.UserConfigBo, errs.SystemErrorInfo)

func GetUserDepartmentIdMap

func GetUserDepartmentIdMap(orgId int64, userIds []int64) (map[int64]int64, error)

获取员工部门id的映射,员工id => 部门id

func GetUserDepartmentIdsByUserIds

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

func GetUserDepartmentInfo

func GetUserDepartmentInfo(orgId int64, userIds []int64) ([]bo.UserDepartmentInfo, errs.SystemErrorInfo)

func GetUserIdsMobileMap

func GetUserIdsMobileMap(userIds []int64) (map[int64]string, errs.SystemErrorInfo)

GetUserIdsMobileMap 根据userIds获取手机号map

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 GetUserInfoByGlobalUser

func GetUserInfoByGlobalUser(globalUser *po.PpmOrgGlobalUser) (*bo.UserInfoBo, errs.SystemErrorInfo)

func GetUserInfoById

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

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 GetUserInfoByUserId

func GetUserInfoByUserId(userId int64) (*po.PpmOrgUser, errs.SystemErrorInfo)

func GetUserInfoListByOrg

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

func GetUserInviteCodeInfo

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

func GetUserOrgInfos

func GetUserOrgInfos(orgId int64) ([]*po.PpmOrgUserOrganization, errs.SystemErrorInfo)

func GetUserOrganizationIdList

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

用来返回用户组织列表

func GetUserOrganizationNewestRelation

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

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

func GetUserOutInfoByUserIdAndOrgId

func GetUserOutInfoByUserIdAndOrgId(userId int64, orgId int64, sourceChannel string) (*bo.UserOutInfoBo, errs.SystemErrorInfo)

func GetUserOutInfoByUserIdByOrgIds

func GetUserOutInfoByUserIdByOrgIds(userId int64, orgIds []int64, sourceChannel string) (*bo.UserOutInfoBo, errs.SystemErrorInfo)

func GetUserOutInfosByUserIds

func GetUserOutInfosByUserIds(userIds []int64, sourceChannel string) (*bo.UserOutInfoBo, error)

func GetUserViewLocation

func GetUserViewLocation(orgId int64, userId int64) ([]*bo.UserViewLocation, errs.SystemErrorInfo)

func GetViewLocationList

func GetViewLocationList(orgId, userId int64) ([]*orgvo.UserLastViewLocationData, errs.SystemErrorInfo)

func GetWhiteListVipOrg

func GetWhiteListVipOrg(orgId int64) bool

func InitOrg

留着做对比方便的注释

func InsertUserConfig

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

func JudgeDepartmentIsExist

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

func JudgeGrayLevelOrg

func JudgeGrayLevelOrg(orgId int64) bool

func JudgeUserIsAdmin

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

func ModifyOrgMemberCheckStatus

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

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

func ModifyOrgMemberStatus

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

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

func NeedRemindPayExpire

func NeedRemindPayExpire(orgId, userId int64, payEndTime time.Time) (bool, errs.SystemErrorInfo)

func NeedRemindPayOverdue

func NeedRemindPayOverdue(orgId, userId int64, payEndTime time.Time) (bool, errs.SystemErrorInfo)

func OrgInit

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

func OrgOwnerInit

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

func PayLevelIsExist

func PayLevelIsExist(level int64) (bool, errs.SystemErrorInfo)

func PushAddOrgMemberNotice

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

func PushOrgTrends

func PushOrgTrends(orgTrendsBo bo.OrgTrendsBo)

func PushRemoveOrgMemberNotice

func PushRemoveOrgMemberNotice(orgId int64, memberIds []int64, operatorId int64)

func PushSyncMemberDept

func PushSyncMemberDept(paramReqVo orgvo.SyncUserInfoFromFeiShuReqVo) errs.SystemErrorInfo

"同步成员、部门信息"任务推送到消息队列

func PushUpdateOrgMemberNotice

func PushUpdateOrgMemberNotice(orgId, depId int64, memberIds []int64, operatorId int64)

推送更新用户信息事件

func RedirectPayLevelInfoForPrivate

func RedirectPayLevelInfoForPrivate(orgConfig *bo.OrgConfigBo)

RedirectPayLevelInfoForPrivate 私有化部署时,将 payLevel 等信息进行重置

func RemoveOrgMember

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

修改组织成员

func RemoveUserFromAdminGroup

func RemoveUserFromAdminGroup(id int64, operateUid int64, index int, tx sqlbuilder.Tx) (int64, error)

RemoveUserFromAdminGroup 删除管理组中的某个人

func ResetOrgPayNum

func ResetOrgPayNum(orgId int64) error

func ResetUserCheckStatusWait

func ResetUserCheckStatusWait(orgId, userId int64) errs.SystemErrorInfo

func RetrievePasswordByAccountName

func RetrievePasswordByAccountName(orgId int64, loginName, password string) errs.SystemErrorInfo

func SaveOrgSomeTableAppId

func SaveOrgSomeTableAppId(orgId, userId int64, input orgvo.SaveOrgSummaryTableAppIdReqVoData, tx ...sqlbuilder.Tx) (bool, errs.SystemErrorInfo)

func SaveOrgSummaryTableAppId

func SaveOrgSummaryTableAppId(orgId, userId int64, summaryAppId int64) (bool, errs.SystemErrorInfo)

将汇总表id 存入组织表的字段中 将数据以 json 配置的方式存储在 remark 中。

func ScheduleOrganizationPageList

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

func SetActivity11Info

func SetActivity11Info(orgId, userId int64, flag int) errs.SystemErrorInfo

func SetChangeLoginNameSign

func SetChangeLoginNameSign(orgId, userId int64, addressType int) errs.SystemErrorInfo

func SetLabConfig

func SetLabConfig(orgId, userId int64, input orgvo.SetLabReq) errs.SystemErrorInfo

func SetPhoneNumberWhiteList

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

func SetPwdLoginCode

func SetPwdLoginCode(loginName, code string) errs.SystemErrorInfo

func SetPwdLoginCodeVerifyFailTimesIncrement

func SetPwdLoginCodeVerifyFailTimesIncrement(authType, addressType int, loginName string) (int64, errs.SystemErrorInfo)

func SetPwdLoginCodeVerifyFreeze

func SetPwdLoginCodeVerifyFreeze(authType, addressType int, loginName string) errs.SystemErrorInfo

func SetRemindPopUp

func SetRemindPopUp(orgId, userId int64, updateFields []string) (*vo.Void, 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 SetShareUrl

func SetShareUrl(key, url string) errs.SystemErrorInfo

func SetUserInviteCodeInfo

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

func SetUserInviteInfoForPhones

func SetUserInviteInfoForPhones(inviteCode string, inviteInfo interface{}, expiredDuration int64) errs.SystemErrorInfo

多个手机号邀请时的邀请信息缓存

func SetUserPassword

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

func SetVersionConfig

func SetVersionConfig(orgId, userId int64, versionInfoVisible bool) 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 TransferOrgToOtherPlatform

func TransferOrgToOtherPlatform(originOrgId, newOrgId int64) errs.SystemErrorInfo

TransferOrgToOtherPlatform 需要将originOrgId相关的第三方信息都替换成newOrgId下的 比如钉钉的信息替换飞书的信息,这个时候其实是客户从飞书转到了钉钉,替换完后,飞书再次同步就会变成一个新组织

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 UpdateGlobalUserLastLoginInfo

func UpdateGlobalUserLastLoginInfo(userId, orgId int64) errs.SystemErrorInfo

UpdateGlobalUserLastLoginInfo 创建组织的时候确定这个orgId就是这个用户

func UpdateGlobalUserLastLoginInfoWithCheckGlobal

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

UpdateGlobalUserLastLoginInfoWithCheckGlobal 不确定这个组织是否是这个uid的,所以需要用globalUserId所绑定的所有userId去查询,看看这个orgId属于哪个userId,再更新

func UpdateLocalOrgUserNames

func UpdateLocalOrgUserNames(orgIds []int64, userId int64, name string) errs.SystemErrorInfo

func UpdateOrg

func UpdateOrg(updateBo bo.UpdateOrganizationBo) errs.SystemErrorInfo

func UpdateOrgMemberInfo

func UpdateOrgMemberInfo(orgId, userId int64, userUpd, orgUserUpd mysql.Upd) errs.SystemErrorInfo

func UpdateOrgOutInfoPermanentCode

func UpdateOrgOutInfoPermanentCode(orgId int64, tenantCode string) errs.SystemErrorInfo

UpdateOrgOutInfoPermanentCode 企微重新安装后需要更新code

func UpdateOrgOutInfoTenantCode

func UpdateOrgOutInfoTenantCode(orgId int64, sourceChannel, tenantCode string) errs.SystemErrorInfo

func UpdateOrgWithTx

func UpdateOrgWithTx(updateBo bo.UpdateOrganizationBo, tx sqlbuilder.Tx) errs.SystemErrorInfo

UpdateOrgWithTx 在事务内更新组织

func UpdateUserConfig

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

func UpdateUserDefaultOrg

func UpdateUserDefaultOrg(userId, orgId int64) (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 UpdateUserOutInfo

func UpdateUserOutInfo(orgId int64, outUserId string, upd mysql.Upd) errs.SystemErrorInfo

根据 outUserId 更新一个用户的 out 信息

func UpdateUserPcConfig

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

func UpdateUserToSysManageGroup

func UpdateUserToSysManageGroup(orgId int64, updateUserIds []int64, updateType int) errs.SystemErrorInfo

func UserInit

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

func UserLoginHook

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

用户登录时回调

func UserRegister

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

func VerifyOrg

func VerifyOrg(orgId int64, userId int64) bool

校验当前用户是否有效

func VerifyOrgUsers

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

func VerifyOrgUsersReturnValid

func VerifyOrgUsersReturnValid(orgId int64, userIds []int64) []int64

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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