export.go 2.0 KB
package service

// ExportCompanyUser 导出公司用户信息列表
//func (srv ExcelDataService) ExportCompanyUser(companyUserListQuery *query.CompanyUserListQuery) (ExportCompanyUserData, error) {
//	creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(companyUserListQuery.Operator)
//	result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{
//		Limit:          10000,
//		CompanyId:      companyUserListQuery.Operator.CompanyId,
//		OrganizationId: 0,
//		DepartmentId:   0,
//		UserName:       companyUserListQuery.UserName,
//		DepName:        companyUserListQuery.DepartmentName,
//		Phone:          "",
//		UserType:       domain.UserTypeEmployee,
//		InOrgIds:       companyUserListQuery.Operator.OrgIds,
//		PullRealTime:   true,
//	})
//	if err != nil {
//		return ExportCompanyUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err)
//	}
//	return ExportCompanyUserData{
//		SourceData:    result.Users,
//		SelectedField: companyUserListQuery.SelectedField,
//	}, nil
//}

// ExportCooperationUser 导出共创用户信息列表
//func (srv ExcelDataService) ExportCooperationUser(companyUserListQuery *query.CooperationUserListQuery) (ExportCooperationUserData, error) {
//	creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(companyUserListQuery.Operator)
//	result, err := creationUserGateway.UserSearch(allied_creation_user.ReqUserSearch{
//		Limit:              10000,
//		CompanyId:          companyUserListQuery.Operator.CompanyId,
//		OrganizationId:     0,
//		DepartmentId:       0,
//		UserName:           companyUserListQuery.UserName,
//		CooperationCompany: companyUserListQuery.CooperationCompany,
//		Phone:              "",
//		UserType:           domain.UserTypeCooperation,
//		InOrgIds:           companyUserListQuery.Operator.OrgIds,
//	})
//	if err != nil {
//		return ExportCooperationUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err)
//	}
//	return ExportCooperationUserData{SourceData: result.Users, SelectedField: companyUserListQuery.SelectedField}, nil
//}