service

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: 72 Imported by: 0

Documentation

Overview

* 2 * @Author: Nico 3 * @Date: 2020/1/31 11:20 4

Index

Constants

View Source
const LuckyTagFinishTime = "2021-01-31 23:59:59"

Variables

This section is empty.

Functions

func AddUser

func AddUser(req *orgvo.AddUserReqVo) errs.SystemErrorInfo

func AllocateDepartment

func AllocateDepartment(params orgvo.AllocateDepartmentReq, orgId, userId int64) errs.SystemErrorInfo

已废弃,使用usercenter

func AssemblyFeiShuUserDepRelationInfo

func AssemblyFeiShuUserDepRelationInfo(orgId int64, userId int64, depId int64) po.PpmOrgUserDepartment

func AssemblyFeiShuUserOrgRelationInfo

func AssemblyFeiShuUserOrgRelationInfo(orgId int64, userId int64) po.PpmOrgUserOrganization

func AuthOrgRole

func AuthOrgRole(orgId, userId int64, path string, operation string) errs.SystemErrorInfo

func BatchGetUserDetailInfo

func BatchGetUserDetailInfo(userIds []int64) ([]vo.PersonalInfo, errs.SystemErrorInfo)

func CheckAndSetSuperAdmin

func CheckAndSetSuperAdmin(orgId int64) (bool, errs.SystemErrorInfo)

CheckAndSetSuperAdmin 检查组织拥有者是否是超管,如果不是,则设置为超管。

func ClearOrgUsersPayCache

func ClearOrgUsersPayCache(orgId int64) errs.SystemErrorInfo

func CreateDepartment

func CreateDepartment(params orgvo.CreateDepartmentReq, orgId int64, userId int64) (*vo.Void, errs.SystemErrorInfo)

func CreateOrg

func CreateOrg(req orgvo.CreateOrgReqVo, sourceChannel, sourcePlatform string) (int64, errs.SystemErrorInfo)

func CreateOrgBase

func CreateOrgBase(req orgvo.CreateOrgReqVo, sourceChannel, sourcePlatform string) (int64, errs.SystemErrorInfo)

func CreateOrgProjectForm

func CreateOrgProjectForm(orgBo bo.OrganizationBo, oldOrgRemarkObj *orgvo.OrgRemarkConfigType) (int64, errs.SystemErrorInfo)

CreateOrgProjectForm 给组织创建**项目表单**

func CreateOrgRelationResource

func CreateOrgRelationResource(orgId int64, creatorId int64, sourceChannel, sourcePlatform string, orgName string) errs.SystemErrorInfo

func CreateOrgUser

func CreateOrgUser(orgId, operator int64, req orgvo.CreateOrgMemberReq) errs.SystemErrorInfo

添加组织成员

func DeleteAppUserLocation

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

删除应用的时候,把用户浏览应用的位置信息去除 DeleteAppUserLocation

func DeleteDepartment

func DeleteDepartment(params orgvo.DeleteDepartmentReq, orgId, userId int64) (*vo.Void, errs.SystemErrorInfo)

func DepartmentMembersList

func DepartmentMembersList(orgId int64, sourceChannel string, name *string, page, size int, userIds []int64, ignoreDelete bool, projectId, relationType int64) (*vo.DepartmentMembersListResp, errs.SystemErrorInfo)

func Departments

func Departments(page uint, size uint, params *vo.DepartmentListReq, orgId int64) (*vo.DepartmentList, errs.SystemErrorInfo)

func DisbandThirdAccount

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

func EmptyUser

func EmptyUser(orgId, userId int64, input orgvo.EmptyUserReq) (*vo.Void, errs.SystemErrorInfo)

func ExportAddressList

func ExportAddressList(orgId, userId int64, input orgvo.ExportAddressListReq) (string, errs.SystemErrorInfo)

func ExportInviteTemplate

func ExportInviteTemplate(orgId, userId int64) (*orgvo.ExportInviteTemplateRespVoData, errs.SystemErrorInfo)

ExportInviteTemplate 邀请-下载导入成员模板

func FilterResignedUserIds

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

通过一批用户id,返回这批id中离职的用户id。fs应用下的离职的用户,由 ppm_org_user_organization 表中的 is_delete 标识。

func FsValidateMobileForLogin

func FsValidateMobileForLogin(mobile string, codeToken *string) errs.SystemErrorInfo

func GenExcelFileForImportMemberErr

func GenExcelFileForImportMemberErr(fullFileName string, errList []orgvo.ImportMembersResultErrItem) errs.SystemErrorInfo

GenExcelFileForImportMemberErr 邀请-导入成员时,失败数据的生成和导出

func GetBaseOrgInfo

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

func GetBaseOrgInfoByOutOrgId

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

func GetBaseUserInfo

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

func GetBaseUserInfoBatch

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

func GetBaseUserInfoByEmpId

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

func GetCtxParameters

func GetCtxParameters(ctx context.Context, key string) (string, error)

func GetCurrentUserWithCond

func GetCurrentUserWithCond(ctx context.Context, orgVerify bool, payVerify bool) (*bo.CacheUserInfoBo, errs.SystemErrorInfo)

payVerify 兼容部分接口不需要验证用户可用性

func GetCurrentUserWithoutOrgVerify

func GetCurrentUserWithoutOrgVerify(ctx context.Context) (*bo.CacheUserInfoBo, errs.SystemErrorInfo)

func GetDeptByIds

func GetDeptByIds(orgId int64, deptIds []int64) ([]*vo.Department, errs.SystemErrorInfo)

func GetDingTalkBaseUserInfo

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

func GetExportFileInfo

func GetExportFileInfo(orgId int64, fileName string) (relatePath, fileDir, outFileName string, err errs.SystemErrorInfo)

GetExportFileInfo 获取导出的文件相关信息 fileName string 导出的文件名,如:“成员导入模板.xlsx”

func GetFunctionKeysByOrg

func GetFunctionKeysByOrg(orgId int64) (*vo.FunctionConfigResp, errs.SystemErrorInfo)

func GetFunctionsByOrg

func GetFunctionsByOrg(orgId int64) ([]orgvo.FunctionLimitObj, errs.SystemErrorInfo)

func GetInviteCode

func GetInviteCode(currentUserId int64, orgId int64, sourcePlatform string) (*orgvo.GetInviteCodeRespVoData, errs.SystemErrorInfo)

func GetInviteInfo

func GetInviteInfo(inviteCode string) (*vo.GetInviteInfoResp, errs.SystemErrorInfo)

func GetLabConfig

func GetLabConfig(input orgvo.GetLabReqVo) (*orgvo.GetLabResp, errs.SystemErrorInfo)

func GetOrgBoList

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

func GetOrgBoListByPage

GetOrgBoListByPage 分页获取组织列表

func GetOrgConfig

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

GetOrgConfig 获取组织配置

func GetOrgIdListByPage

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

GetOrgIdListByPage 分页获取组织 id 列表

func GetOrgIdListBySourceChannel

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

通过来源获取组织id列表

func GetOrgInfoBo

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

func GetOrgOutInfoByOutOrgId

func GetOrgOutInfoByOutOrgId(orgId int64, outOrgId string) (*orgvo.OutOrgInfo, errs.SystemErrorInfo)

func GetOrgOutInfoByOutOrgIdBatch

func GetOrgOutInfoByOutOrgIdBatch(input orgvo.GetOrgOutInfoByOutOrgIdBatchReqInput) ([]bo.BaseOrgOutInfoBo, errs.SystemErrorInfo)

GetOrgOutInfoByOutOrgIdBatch 批量获取外部组织信息

func GetOrgSuperAdminInfo

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

func GetOrgUserIds

func GetOrgUserIds(orgId int64) ([]int64, errs.SystemErrorInfo)

func GetOrgUserIdsByEmIds

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

func GetOrgUsersInfoByEmIds

func GetOrgUsersInfoByEmIds(orgId int64, sourceChannel string, empIds []string) ([]bo.BaseUserInfoBo, errs.SystemErrorInfo)

func GetOutOrgInfoByOrgIdBatch

func GetOutOrgInfoByOrgIdBatch(orgIds []int64) ([]*orgvo.OutOrgInfo, 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 GetPayRemind

func GetPayRemind(orgId, userId int64) (*vo.GetPayRemindResp, errs.SystemErrorInfo)

func GetProjectFormFields

func GetProjectFormFields(orgId int64) ([]interface{}, []string, errs.SystemErrorInfo)

项目数据同步到无码- form 字段组装

func GetShareUrl

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

func GetUserConfigInfo

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

func GetUserId

func GetUserId(orgId int64, corpId, sourceChannel, empId string) (*vo.UserIDInfo, errs.SystemErrorInfo)

func GetUserIds

func GetUserIds(orgId int64, corpId, sourceChannel string, empIds []string) ([]*vo.UserIDInfo, errs.SystemErrorInfo)

func GetUserInfo

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

func GetUserInfoByFeishuTenantKey

func GetUserInfoByFeishuTenantKey(tenantKey string, openId string) (orgvo.GetUserInfoByFeishuTenantKeyData, errs.SystemErrorInfo)

func GetUserInfoListByOrg

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

func GetUserListWithCreateTimeRange

查询在某个时间段内新初始化的用户信息

func GetUserOutInfoByOpenID

func GetUserOutInfoByOpenID(orgId int64, sourceChannel string, openId string) (*po.PpmOrgUserOutInfo, errs.SystemErrorInfo)

func GetUserOutInfoByPlatformAndOrgId

func GetUserOutInfoByPlatformAndOrgId(sourceChannel string, userId, orgId int64) ([]po.PpmOrgUserOutInfo, errs.SystemErrorInfo)

func GetUserPay

func GetUserPay(orgId int64, userId int64, orgOrgId, outUserId, sourceChannel, userName string) errs.SystemErrorInfo

获取用户是否在授权范围

func GinContextFromContext

func GinContextFromContext(ctx context.Context) (*gin.Context, error)

func ImportMemberRegisterHandleHook

func ImportMemberRegisterHandleHook(importInfo orgvo.ImportUserInfo, userBo bo.UserInfoBo) errs.SystemErrorInfo

func ImportMembers

func ImportMembers(orgId, userId int64, input *orgvo.ImportMembersReqVoData) (*orgvo.ImportMembersRespVoData, errs.SystemErrorInfo)

ImportMembers 邀请-excel 导入组织成员

func InitOrg

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

func InnerGetUserInfos

func InnerGetUserInfos(orgId int64, idValues interface{}) ([]*orgvo.InnerUserInfo, errs.SystemErrorInfo)

func InviteUser

func InviteUser(orgId, userId int64, param orgvo.InviteUserReq) (*orgvo.InviteUserResp, errs.SystemErrorInfo)

已废弃

func InviteUserByPhones

InviteUserByPhones 邀请-手机号批量邀请 邀请链接通过前端传入(实际上是后端生成的)

func IsInWhiteList

func IsInWhiteList(phoneNumber string) bool

func JudgeUserIsAdmin

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

func NeedUpdate

func NeedUpdate(updateFields []string, field string) bool

func NewbieGuideInit

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

NewbieGuideInit 初始化lark通用数据

func OrgUserList

func OrgUserList(orgId, userId int64, page, size int, input *vo.OrgUserListReq) (*vo.UserOrganizationList, errs.SystemErrorInfo)

func OrganizationInfo

获取组织信息

func PAReport

func PAReport(reportMsg orgvo.PAReportMsg) errs.SystemErrorInfo

func PersonalInfo

func PersonalInfo(orgId, userId int64, sourceChannel string) (*orgvo.PersonalInfo, errs.SystemErrorInfo)

func PrepareTransferOrg

func PrepareTransferOrg(originOrgId, newOrgId int64) (*orgvo.PrepareTransferOrgData, errs.SystemErrorInfo)

func ProFormFieldOptionsForIsEnableWorkHours

func ProFormFieldOptionsForIsEnableWorkHours() []lc_table.LcOptions

func ProFormFieldOptionsForIsFiling

func ProFormFieldOptionsForIsFiling() []lc_table.LcOptions

func ProFormFieldOptionsForProStatus

func ProFormFieldOptionsForProStatus() []lc_table.LcOptions

func ProFormFieldOptionsForPublicStatus

func ProFormFieldOptionsForPublicStatus() []lc_table.LcOptions

func PushSyncMemberDept

func PushSyncMemberDept(orgId, currentUserId int64, syncUserInfoFromFeiShu vo.SyncUserInfoFromFeiShuReq) errs.SystemErrorInfo

异步的方式,推送任务到mq,进行同步成员、部门信息

func QueryForInitExistOrg

func QueryForInitExistOrg(orgId, userId int64, input *vo.InitExistOrgReq) string

利用初始化接口查询一些信息

func RemoveInviteUser

func RemoveInviteUser(orgId, userId int64, param orgvo.RemoveInviteUserReq) errs.SystemErrorInfo

func SaveOrgRemarkAndOrgFields

func SaveOrgRemarkAndOrgFields(orgId, userId int64, orgRemarkObj *orgvo.OrgRemarkConfigType) (*orgvo.SaveOrgSummaryTableAppIdReqVoData, errs.SystemErrorInfo)

SaveOrgRemarkAndOrgFields 保存组织无码配置和组织字段

func SaveOrgSomeTableAppId

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

SaveOrgSomeTableAppId 保存组织下的一些应用表的 appId。如果这些应用不存在,则创建 如果项目 form 的 appId 为 0,则创建保存项目数据的 project form

func SaveOrgSummaryTableAppId

func SaveOrgSummaryTableAppId(orgId, userId int64, input orgvo.SaveOrgSummaryTableAppIdReqVoData) (bool, errs.SystemErrorInfo)

func SendSMSLoginCode

func SendSMSLoginCode(phoneNumber string) errs.SystemErrorInfo

func SetLabConfig

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

func SetShareUrl

func SetShareUrl(key, url string) errs.SystemErrorInfo

func SetUserActivity

func SetUserActivity(req orgvo.SetUserActivityReq) (bool, errs.SystemErrorInfo)

func SetUserDepartmentLevel

func SetUserDepartmentLevel(orgId, userId int64, params orgvo.SetUserDepartmentLevelReq) errs.SystemErrorInfo

func SetVersionVisible

func SetVersionVisible(req orgvo.SetVersionReq) (bool, errs.SystemErrorInfo)

func SetVisitUserGuideStatus

func SetVisitUserGuideStatus(input orgvo.SetVisitUserGuideStatusReq) (bool, errs.SystemErrorInfo)

设定用户浏览了“新手指引”状态

func StopThirdIntegration

func StopThirdIntegration(orgId int64, currentUserId int64, sourceChannel string) errs.SystemErrorInfo

func SwitchUserOrganization

func SwitchUserOrganization(orgId, userId int64, token string) errs.SystemErrorInfo

func SyncUserInfoFromFeiShu

func SyncUserInfoFromFeiShu(orgId, currentUserId int64, syncUserInfoFromFeiShu vo.SyncUserInfoFromFeiShuReq) errs.SystemErrorInfo

从飞书方更新成员信息 1.获取当前组织下的所有成员 2.通过成员列表的信息请求获取飞书方的成员信息,更新我方成员信息 3.删除旧部门、同步新部门信息

func ThirdAccountBindList

func ThirdAccountBindList(orgId, userId int64) (*orgvo.ThirdAccountListData, errs.SystemErrorInfo)

func TransferOrg

func TransferOrg(originOrgId, newOrgId int64) errs.SystemErrorInfo

func UpdateCacheUserFsInfo

func UpdateCacheUserFsInfo(token string, tenantKey, openId, sourceChannel string) errs.SystemErrorInfo

func UpdateCacheUserInfoOrgId

func UpdateCacheUserInfoOrgId(token string, orgId, userId int64, updOutInfo bool) errs.SystemErrorInfo

func UpdateDepartment

func UpdateDepartment(params orgvo.UpdateDepartmentReq, orgId, userId int64) (*vo.Void, errs.SystemErrorInfo)

func UpdateOrgFunctionConfig

func UpdateOrgFunctionConfig(orgId int64, sourceChannel string, level int64, buyType string, pricePlanType string, payTime time.Time, seats int, expireDays int, endDate time.Time, trailDays int) errs.SystemErrorInfo

func UpdateOrgMemberCheckStatus

func UpdateOrgMemberCheckStatus(reqVo orgvo.UpdateOrgMemberCheckStatusReq) (*vo.Void, errs.SystemErrorInfo)

更新成员检查状态

func UpdateOrgMemberStatus

func UpdateOrgMemberStatus(reqVo orgvo.UpdateOrgMemberStatusReq) (*vo.Void, errs.SystemErrorInfo)

更新成员状态

func UpdateOrgUser

func UpdateOrgUser(orgId, operator int64, req orgvo.UpdateOrgMemberReq) errs.SystemErrorInfo

修改成员信息

func UpdateOrganizationSetting

func UpdateOrganizationSetting(req orgvo.UpdateOrganizationSettingReqVo) (int64, errs.SystemErrorInfo)

对于自己创建的组织,暂时不支持转让

对于加入的企业只有查看全,无操作权

暂时只做基本设置

func UpdateUserConfig

func UpdateUserConfig(orgId, userId int64, input vo.UpdateUserConfigReq) (*vo.UpdateUserConfigResp, errs.SystemErrorInfo)

func UpdateUserDefaultProjectIdConfig

func UpdateUserDefaultProjectIdConfig(orgId, userId int64, input vo.UpdateUserDefaultProjectConfigReq) (*vo.UpdateUserConfigResp, errs.SystemErrorInfo)

func UpdateUserInfo

func UpdateUserInfo(orgId, userId int64, input vo.UpdateUserInfoReq) (*vo.Void, errs.SystemErrorInfo)

func UpdateUserPcConfig

func UpdateUserPcConfig(orgId, userId int64, input vo.UpdateUserPcConfigReq) (*vo.UpdateUserConfigResp, errs.SystemErrorInfo)

func UpdateUserToSysManageGroup

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

func UserAuthCodeLogin

func UserAuthCodeLogin(req vo.UserLoginReq) (*bo.UserInfoBo, errs.SystemErrorInfo)

func UserConfigInfo

func UserConfigInfo(orgId, userId int64) (*vo.UserConfig, errs.SystemErrorInfo)

func UserList

func UserList(orgId int64, req orgvo.UserListReq) (*orgvo.UserListResp, errs.SystemErrorInfo)

func UserOrganizationList

func UserOrganizationList(userId int64) (*vo.UserOrganizationListResp, errs.SystemErrorInfo)

func UserPwdLogin

func UserPwdLogin(req vo.UserLoginReq) (*bo.UserInfoBo, errs.SystemErrorInfo)

用户密码登录

func UserQuit

用户退出

func UserStat

func UserStat(orgId int64) (*orgvo.UserStatResp, errs.SystemErrorInfo)

func VerifyCaptcha

func VerifyCaptcha(captchaID, captchaPassword *string, phoneNumber string, yiDunValidate *string) errs.SystemErrorInfo

func VerifyDepartments

func VerifyDepartments(orgId int64, departmentIds []int64) bool

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