├── .dockerignore ├── .env.templete ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── NuGet.config ├── README.md ├── cli-linux └── .keep ├── cli-windows ├── ServiceComponents └── pack-images.ps1 ├── db ├── CHANGELOG.md ├── README.md ├── pdm │ ├── auth.pdm │ ├── basicdata.pdm │ ├── organization.pdm │ └── surging.hero.prj ├── sql.bak │ ├── auth.sql │ ├── basicdata.sql │ └── organization.sql └── sql │ ├── auth.sql │ ├── basicdata.sql │ └── organization.sql ├── docker-compose ├── infrastr │ ├── docker-compose.consul.yml │ ├── docker-compose.mysql.yml │ ├── docker-compose.rabbitmq.yml │ ├── docker-compose.redis.yml │ └── docker-compose.zookeeper.yml ├── nginx │ ├── consul.conf │ ├── docker-compose.yml │ ├── hero-dev.conf │ ├── hero-fileservice.conf │ ├── hero-web.conf │ ├── hero.conf │ └── zookeeper.conf ├── surging.auth │ ├── .env │ ├── docker-compose.dcproj │ ├── docker-compose.override.yml │ ├── docker-compose.vs.debug.yml │ └── docker-compose.yml ├── surging.hero.rider │ ├── .env │ ├── docker-compose.override.yml │ ├── docker-compose.vs.debug.yml │ └── docker-compose.yml ├── surging.hero │ ├── .env │ ├── docker-compose.dcproj │ ├── docker-compose.mac.dcproj │ ├── docker-compose.override.yml │ ├── docker-compose.vs.debug.yml │ └── docker-compose.yml └── surging.noauth │ ├── .env │ ├── docker-compose.dcproj │ ├── docker-compose.override.yml │ ├── docker-compose.vs.debug.yml │ └── docker-compose.yml ├── docs ├── .vuepress │ └── config.js ├── README.md └── hero │ ├── dev-docs │ ├── appserver.md │ └── structure.md │ ├── development-env.md │ └── index.md ├── global.json ├── k8s ├── .setting ├── README.md ├── ServiceComponents ├── auth │ ├── auth-deployments.yml │ ├── auth-ingress.yml │ └── auth-services.yml ├── basicdata │ ├── basicdata-deployments.yml │ ├── basicdata-ingress.yml │ └── basicdata-services.yml ├── consul.yml ├── deploy-ingress.ps1 ├── deploy.ps1 ├── gateway │ ├── gateway-deployments.yml │ ├── gateway-ingress-dev.yml │ ├── gateway-ingress-test.yml │ ├── gateway-ingress.yml │ └── gateway-services.yml ├── hero-conf-dev.yml ├── hero-conf-test.yml ├── hero-conf.yml ├── hosts ├── metallb │ ├── metallb-config.yml │ └── metallb.yml ├── mysql.yml ├── nginx-ingress │ ├── cloud-generic.yml │ ├── cm.yml │ └── mandatory.yml ├── organization │ ├── organization-deployments.yml │ ├── organization-ingress.yml │ └── organization-services.yml ├── rabbitmq.yml ├── redis.yml └── utilities.ps1 ├── package-lock.json ├── package.json ├── res └── assets │ └── img │ └── surging-logo.jpg ├── sln ├── .run │ ├── Surging.Hero.AuthHost.run.xml │ ├── Surging.Hero.BasicDataHost.run.xml │ ├── Surging.Hero.FileServiceHost.run.xml │ ├── Surging.Hero.Gateway.run.xml │ ├── Surging.Hero.OrganizationHost.run.xml │ └── docker-compose.run.xml ├── Surging.Hero Mac.sln ├── Surging.Hero.Rider.sln ├── Surging.Hero.sln ├── Surging.HeroWithAuth.sln └── Surging.HeroWithNoAuth.sln ├── src ├── CommonComponents │ └── Surging.Hero.Common │ │ ├── CheckStatus.cs │ │ ├── ClassMapper │ │ └── HeroClassMapper.cs │ │ ├── Developers.cs │ │ ├── Expression │ │ └── PredicateBuilder.cs │ │ ├── Extensions │ │ ├── EnumDto.cs │ │ └── EnumExtensions.cs │ │ ├── FullAuditDtos │ │ ├── AuditDto.cs │ │ └── IAuditedDto.cs │ │ ├── HeroConstants.cs │ │ ├── RegExpConstants.cs │ │ ├── Runtime │ │ └── Session │ │ │ ├── ISurgingSessionExtension.cs │ │ │ └── LoginUserInfo.cs │ │ ├── Status.cs │ │ ├── Surging.Hero.Common.csproj │ │ └── Utils │ │ ├── EncryptHelper.cs │ │ ├── IdentifyCodeGenerator.cs │ │ └── IdentifyCodeType.cs ├── Directory.Build.props ├── Services │ ├── Auth │ │ ├── Surging.Hero.Auth.Application │ │ │ ├── Action │ │ │ │ ├── ActionAppService.cs │ │ │ │ └── ActionProfile.cs │ │ │ ├── AuthConstant.cs │ │ │ ├── Authorization │ │ │ │ ├── AccountAppService.cs │ │ │ │ └── AccountProfile.cs │ │ │ ├── Permission │ │ │ │ ├── PermissionAppService.cs │ │ │ │ └── PermissionProfile.cs │ │ │ ├── Role │ │ │ │ ├── RoleAppService.cs │ │ │ │ └── RoleProfile.cs │ │ │ ├── Surging.Hero.Auth.Application.csproj │ │ │ ├── Tenant │ │ │ │ ├── TenantAppService.cs │ │ │ │ └── TenantProfile.cs │ │ │ ├── User │ │ │ │ ├── UserAppService.cs │ │ │ │ └── UserProfile.cs │ │ │ └── UserGroup │ │ │ │ ├── UserGroupAppService.cs │ │ │ │ └── UserGroupProfile.cs │ │ ├── Surging.Hero.Auth.Domain.Shared │ │ │ ├── DataPermissionType.cs │ │ │ ├── Menus │ │ │ │ └── MenuMold.cs │ │ │ ├── Operations │ │ │ │ └── OperationMold.cs │ │ │ ├── Permissions │ │ │ │ └── PermissionMold.cs │ │ │ ├── Roles │ │ │ │ └── RoleType.cs │ │ │ ├── Surging.Hero.Auth.Domain.Shared.csproj │ │ │ └── Users │ │ │ │ ├── Gender.cs │ │ │ │ └── PoliticalStatus.cs │ │ ├── Surging.Hero.Auth.Domain │ │ │ ├── AuthDomainConstants.cs │ │ │ ├── Permissions │ │ │ │ ├── Actions │ │ │ │ │ ├── Action.cs │ │ │ │ │ ├── ActionDomainService.cs │ │ │ │ │ └── IActionDomainService.cs │ │ │ │ ├── CheckPermissionResult.cs │ │ │ │ ├── ClassMapper │ │ │ │ │ ├── ActionClassMapper.cs │ │ │ │ │ ├── MenuClassMapper.cs │ │ │ │ │ ├── OperationActionRelationClassMapper.cs │ │ │ │ │ ├── OperationClassMapper.cs │ │ │ │ │ └── PermissionClassMapper.cs │ │ │ │ ├── IPermissionDomainService.cs │ │ │ │ ├── Menus │ │ │ │ │ ├── IMenuDomainService.cs │ │ │ │ │ ├── Menu.cs │ │ │ │ │ └── MenuDomainService.cs │ │ │ │ ├── Operations │ │ │ │ │ ├── IOperationDomainService.cs │ │ │ │ │ ├── Operation.cs │ │ │ │ │ ├── OperationActionRelation.cs │ │ │ │ │ └── OperationDomainService.cs │ │ │ │ ├── Permission.cs │ │ │ │ └── PermissionDomainService.cs │ │ │ ├── Roles │ │ │ │ ├── ClassMapper │ │ │ │ │ ├── RoleClassMapper.cs │ │ │ │ │ ├── RoleDataPermissionOrgRelationClassMapper.cs │ │ │ │ │ ├── RoleOrganizationClassMapper.cs │ │ │ │ │ └── RolePermissionClassMapper.cs │ │ │ │ ├── IRoleDomainService.cs │ │ │ │ ├── Role.cs │ │ │ │ ├── RoleDataPermissionOrgRelation.cs │ │ │ │ ├── RoleDomainService.cs │ │ │ │ ├── RoleOrganization.cs │ │ │ │ └── RolePermission.cs │ │ │ ├── Surging.Hero.Auth.Domain.csproj │ │ │ ├── Tenants │ │ │ │ ├── ClassMapper │ │ │ │ │ └── TenantClassMapper.cs │ │ │ │ ├── ITenantConfigProvider.cs │ │ │ │ ├── ITenantDomainService.cs │ │ │ │ ├── Tenant.cs │ │ │ │ ├── TenantConfig.cs │ │ │ │ ├── TenantConfigProvider.cs │ │ │ │ └── TenantDomainService.cs │ │ │ ├── UserGroups │ │ │ │ ├── ClassMapper │ │ │ │ │ ├── UserGroupClassMapper.cs │ │ │ │ │ ├── UserGroupDataPermissionOrgRelationClassMapper.cs │ │ │ │ │ ├── UserGroupOrganizationClassMapper.cs │ │ │ │ │ ├── UserGroupPermissionClassMapper.cs │ │ │ │ │ ├── UserGroupRoleClassMapper.cs │ │ │ │ │ └── UserUserGroupRelationClassMapper.cs │ │ │ │ ├── IUserGroupDomainService.cs │ │ │ │ ├── UserGroup.cs │ │ │ │ ├── UserGroupDataPermissionOrgRelation.cs │ │ │ │ ├── UserGroupDomainService.cs │ │ │ │ ├── UserGroupOrganization.cs │ │ │ │ ├── UserGroupPermission.cs │ │ │ │ ├── UserGroupPermissionModel.cs │ │ │ │ ├── UserGroupRole.cs │ │ │ │ └── UserUserGroupRelation.cs │ │ │ └── Users │ │ │ │ ├── ClassMapper │ │ │ │ ├── UserInfoClassMapper.cs │ │ │ │ └── UserRoleClassMapper.cs │ │ │ │ ├── ILoginManager.cs │ │ │ │ ├── IPasswordHelper.cs │ │ │ │ ├── IUserDomainService.cs │ │ │ │ ├── LoginManager.cs │ │ │ │ ├── PasswordHelper.cs │ │ │ │ ├── UserDomainService.cs │ │ │ │ ├── UserInfo.cs │ │ │ │ └── UserRole.cs │ │ ├── Surging.Hero.Auth.IApplication │ │ │ ├── Action │ │ │ │ ├── Dtos │ │ │ │ │ ├── ActionDtoBase.cs │ │ │ │ │ ├── GetActionOutput.cs │ │ │ │ │ ├── GetAppServiceOutput.cs │ │ │ │ │ ├── GetServiceHostOutput.cs │ │ │ │ │ ├── GetTreeActionOutput.cs │ │ │ │ │ ├── InitActionActionInput.cs │ │ │ │ │ ├── QueryActionInput.cs │ │ │ │ │ ├── QueryAppServiceInput.cs │ │ │ │ │ └── QueryServiceHostInput.cs │ │ │ │ └── IActionAppService.cs │ │ │ ├── Authorization │ │ │ │ ├── Dtos │ │ │ │ │ ├── GetUserMenuOutput.cs │ │ │ │ │ ├── GetUserMenuTreeOutput.cs │ │ │ │ │ ├── GetUserOperationOutput.cs │ │ │ │ │ ├── LoginInput.cs │ │ │ │ │ ├── LoginResult.cs │ │ │ │ │ └── LoginResultType.cs │ │ │ │ └── IAccountAppService.cs │ │ │ ├── CacheKeyConstant.cs │ │ │ ├── FullAuditDtos │ │ │ │ └── AuditDtoExtensions.cs │ │ │ ├── Permission │ │ │ │ ├── Dtos │ │ │ │ │ ├── CreateMenuInput.cs │ │ │ │ │ ├── CreateMenuOutput.cs │ │ │ │ │ ├── CreateOperationInput.cs │ │ │ │ │ ├── CreateOperationOutput.cs │ │ │ │ │ ├── DeletePermissionInput.cs │ │ │ │ │ ├── GetMenuOutput.cs │ │ │ │ │ ├── GetOperationOutput.cs │ │ │ │ │ ├── GetPermissionTreeOutput.cs │ │ │ │ │ ├── MenuDtoBase.cs │ │ │ │ │ ├── OperationDtoBase.cs │ │ │ │ │ ├── UpdateMenuInput.cs │ │ │ │ │ ├── UpdateMenuOutput.cs │ │ │ │ │ ├── UpdateOperationInput.cs │ │ │ │ │ └── UpdateOperationOutput.cs │ │ │ │ └── IPermissionAppService.cs │ │ │ ├── Role │ │ │ │ ├── Dtos │ │ │ │ │ ├── CreateRoleInput.cs │ │ │ │ │ ├── GetDisplayOrganizationOutput.cs │ │ │ │ │ ├── GetDisplayRoleOutput.cs │ │ │ │ │ ├── GetRoleOutput.cs │ │ │ │ │ ├── GetRolePermissionTreeOutput.cs │ │ │ │ │ ├── QueryRoleInput.cs │ │ │ │ │ ├── RoleDtoBase.cs │ │ │ │ │ ├── SetRolePermissionInput.cs │ │ │ │ │ ├── UpdateRoleInput.cs │ │ │ │ │ └── UpdateRoleStatusInput.cs │ │ │ │ └── IRoleAppService.cs │ │ │ ├── Surging.Hero.Auth.IApplication.csproj │ │ │ ├── Tenant │ │ │ │ ├── Dtos │ │ │ │ │ ├── CreateTenantInput.cs │ │ │ │ │ ├── GetTenantOutput.cs │ │ │ │ │ ├── GetTenantPageOutput.cs │ │ │ │ │ ├── QueryTenantInput.cs │ │ │ │ │ ├── TenantDtoBase.cs │ │ │ │ │ ├── UpdateTenantInput.cs │ │ │ │ │ └── UpdateTenantStatusInput.cs │ │ │ │ └── ITenantAppService.cs │ │ │ ├── User │ │ │ │ ├── Dtos │ │ │ │ │ ├── CreateUserInput.cs │ │ │ │ │ ├── GetUserBasicOutput.cs │ │ │ │ │ ├── GetUserNormOutput.cs │ │ │ │ │ ├── GetUserRoleOutput.cs │ │ │ │ │ ├── QueryUserInput.cs │ │ │ │ │ ├── QueryUserRoleInput.cs │ │ │ │ │ ├── ResetPasswordInput.cs │ │ │ │ │ ├── UpdateUserInput.cs │ │ │ │ │ ├── UpdateUserStatusInput.cs │ │ │ │ │ └── UserDtoBase.cs │ │ │ │ └── IUserAppService.cs │ │ │ └── UserGroup │ │ │ │ ├── Dtos │ │ │ │ ├── AllocationUserIdsInput.cs │ │ │ │ ├── CreateUserGroupInput.cs │ │ │ │ ├── DeleteUserGroupUserInput.cs │ │ │ │ ├── GetDisplayDataPermissionOrgOutput.cs │ │ │ │ ├── GetDisplayPermissionOutput.cs │ │ │ │ ├── GetDisplayUserGroupOutput.cs │ │ │ │ ├── GetGroupUserOutput.cs │ │ │ │ ├── GetUserEditGroupOutput.cs │ │ │ │ ├── GetUserGroupOutput.cs │ │ │ │ ├── GetUserGroupTreeOutput.cs │ │ │ │ ├── QueryUserGroupInput.cs │ │ │ │ ├── QueryUserGroupUserInput.cs │ │ │ │ ├── UpdateUserGroupInput.cs │ │ │ │ ├── UpdateUserGroupStatusInput.cs │ │ │ │ └── UserGroupDtoBase.cs │ │ │ │ └── IUserGroupAppService.cs │ │ └── Surging.Hero.AuthHost │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.Rider.v1.Debug │ │ │ ├── Dockerfile.Rider.v2.Debug │ │ │ └── Surging.Hero.AuthHost.csproj │ ├── BasicData │ │ ├── Surging.Hero.BasicData.Application │ │ │ ├── Captcha │ │ │ │ └── CaptchaAppService.cs │ │ │ ├── Surging.Hero.BasicData.Application.csproj │ │ │ ├── SystemConfig │ │ │ │ ├── SystemConfigAppService.cs │ │ │ │ └── SystemConfigProfile.cs │ │ │ └── Wordbook │ │ │ │ ├── WordbookAppService.cs │ │ │ │ └── WordbookProfile.cs │ │ ├── Surging.Hero.BasicData.Domain.Shared │ │ │ ├── Surging.Hero.BasicData.Domain.Shared.csproj │ │ │ ├── SystemConfigs │ │ │ │ └── NonPermissionOperationStyle.cs │ │ │ └── Wordbooks │ │ │ │ ├── SystemPresetWordbookCode.cs │ │ │ │ └── WordbookType.cs │ │ ├── Surging.Hero.BasicData.Domain │ │ │ ├── Surging.Hero.BasicData.Domain.csproj │ │ │ ├── SystemConfigs │ │ │ │ ├── ClassMapper │ │ │ │ │ └── SystemConfigClassMapper.cs │ │ │ │ ├── ISystemConfigDomainService.cs │ │ │ │ ├── SystemConfig.cs │ │ │ │ └── SystemConfigDomainService.cs │ │ │ └── Wordbooks │ │ │ │ ├── ClassMapper │ │ │ │ ├── WordbookClassMapper.cs │ │ │ │ └── WordbookItemClassMapper.cs │ │ │ │ ├── IWordbookDomainService.cs │ │ │ │ ├── Wordbook.cs │ │ │ │ ├── WordbookDomainService.cs │ │ │ │ └── WordbookItem.cs │ │ ├── Surging.Hero.BasicData.IApplication │ │ │ ├── CacheKeyConstant.cs │ │ │ ├── Captcha │ │ │ │ └── ICaptchaAppService.cs │ │ │ ├── Surging.Hero.BasicData.IApplication.csproj │ │ │ ├── SystemConfig │ │ │ │ ├── Dtos │ │ │ │ │ ├── GetSystemConfigOutput.cs │ │ │ │ │ ├── SetSystemConfigInput.cs │ │ │ │ │ └── SystemConfigDtoBase.cs │ │ │ │ └── ISystemConfigAppService.cs │ │ │ └── Wordbook │ │ │ │ ├── Dtos │ │ │ │ ├── CheckWordbookInput.cs │ │ │ │ ├── CreateWordbookInput.cs │ │ │ │ ├── CreateWordbookItemInput.cs │ │ │ │ ├── GetWordbookItemOutput.cs │ │ │ │ ├── GetWordbookItemsInput.cs │ │ │ │ ├── GetWordbookOutput.cs │ │ │ │ ├── QueryWordbookInput.cs │ │ │ │ ├── UpdateWordbookInput.cs │ │ │ │ ├── UpdateWordbookItemInput.cs │ │ │ │ ├── WordbookDtoBase.cs │ │ │ │ └── WordbookItemDtoBase.cs │ │ │ │ └── IWordbookAppService.cs │ │ └── Surging.Hero.BasicDataHost │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.Rider.v1.Debug │ │ │ ├── Dockerfile.Rider.v2.Debug │ │ │ └── Surging.Hero.BasicDataHost.csproj │ ├── FileService │ │ ├── Surging.Hero.FileService.Application │ │ │ ├── Captcha │ │ │ │ └── CaptchaImageAppService.cs │ │ │ └── Surging.Hero.FileService.Application.csproj │ │ ├── Surging.Hero.FileService.Domain │ │ │ ├── Captchas │ │ │ │ ├── CaptchaDomainService.cs │ │ │ │ ├── ICaptchaDomainService.cs │ │ │ │ └── Utils.cs │ │ │ └── Surging.Hero.FileService.Domain.csproj │ │ ├── Surging.Hero.FileService.IApplication │ │ │ ├── Captcha │ │ │ │ └── ICaptchaImageAppService.cs │ │ │ └── Surging.Hero.FileService.IApplication.csproj │ │ └── Surging.Hero.FileServiceHost │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.Rider.v1.Debug │ │ │ ├── Dockerfile.Rider.v2.Debug │ │ │ └── Surging.Hero.FileServiceHost.csproj │ ├── Gateway │ │ └── Surging.Hero.Gateway │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile.Rider.v1.Debug │ │ │ ├── Dockerfile.Rider.v2.Debug │ │ │ └── Surging.Hero.Gateway.csproj │ └── Organization │ │ ├── Surging.Hero.Organization.Application │ │ ├── Corporation │ │ │ ├── CorporationAppService.cs │ │ │ └── CorporationProfile.cs │ │ ├── Department │ │ │ ├── DepartmentAppService.cs │ │ │ └── DepartmentProfile.cs │ │ ├── Organization │ │ │ ├── OrganizationAppService.cs │ │ │ └── OrganizationProfile.cs │ │ ├── Position │ │ │ ├── PositionAppService.cs │ │ │ └── PositionProfile.cs │ │ └── Surging.Hero.Organization.Application.csproj │ │ ├── Surging.Hero.Organization.Domain.Shared │ │ ├── Organizations │ │ │ ├── CorporationMold.cs │ │ │ └── OrganizationType.cs │ │ └── Surging.Hero.Organization.Domain.Shared.csproj │ │ ├── Surging.Hero.Organization.Domain │ │ ├── OrganizationConstant.cs │ │ ├── Organizations │ │ │ ├── ClassMapper │ │ │ │ ├── CorporationClassMapper.cs │ │ │ │ ├── DepartmentClassMapper.cs │ │ │ │ └── OrganizationClassMapper.cs │ │ │ ├── Corporations │ │ │ │ ├── Corporation.cs │ │ │ │ ├── CorporationDomainService.cs │ │ │ │ └── ICorporationDomainService.cs │ │ │ ├── Departments │ │ │ │ ├── Department.cs │ │ │ │ ├── DepartmentDomainService.cs │ │ │ │ └── IDepartmentDomainService.cs │ │ │ ├── IOrganizationDomainService.cs │ │ │ ├── Organization.cs │ │ │ └── OrganizationDomainService.cs │ │ ├── Positions │ │ │ ├── ClassMapper │ │ │ │ └── PositionClassMapper.cs │ │ │ ├── IPositionDomainService.cs │ │ │ ├── Position.cs │ │ │ └── PositionDomainService.cs │ │ └── Surging.Hero.Organization.Domain.csproj │ │ ├── Surging.Hero.Organization.IApplication │ │ ├── CacheKeyConstant.cs │ │ ├── Corporation │ │ │ ├── Dtos │ │ │ │ ├── CorporationDtoBase.cs │ │ │ │ ├── CreateCorporationByTenantInput.cs │ │ │ │ ├── CreateCorporationInput.cs │ │ │ │ ├── CreateCorporationOutput.cs │ │ │ │ ├── GetCorporationOutput.cs │ │ │ │ ├── UpdateCorporationInput.cs │ │ │ │ └── UpdateCorporationOutput.cs │ │ │ └── ICorporationAppService.cs │ │ ├── Department │ │ │ ├── Dtos │ │ │ │ ├── CreateDepartmentInput.cs │ │ │ │ ├── CreateDepartmentOutput.cs │ │ │ │ ├── DepartmentDtoBase.cs │ │ │ │ ├── GetDepartmentOutput.cs │ │ │ │ ├── UpdateDepartmentInput.cs │ │ │ │ └── UpdateDepartmentOutput.cs │ │ │ └── IDepartmentAppService.cs │ │ ├── Organization │ │ │ ├── Dtos │ │ │ │ ├── GetOrganizationOutput.cs │ │ │ │ ├── GetOrganizationTreeOutput.cs │ │ │ │ └── QueryOrganizationInput.cs │ │ │ └── IOrganizationAppService.cs │ │ ├── Position │ │ │ ├── Dtos │ │ │ │ ├── CheckCanDeletePositionInput.cs │ │ │ │ ├── CreateOrUpdatePositionInput.cs │ │ │ │ ├── GetPositionOutput.cs │ │ │ │ ├── PositionDtoBase.cs │ │ │ │ └── UpdatePositionInput.cs │ │ │ └── IPositionAppService.cs │ │ └── Surging.Hero.Organization.IApplication.csproj │ │ └── Surging.Hero.OrganizationHost │ │ ├── Dockerfile │ │ ├── Dockerfile.Rider.v1.Debug │ │ ├── Dockerfile.Rider.v2.Debug │ │ └── Surging.Hero.OrganizationHost.csproj └── Shared │ ├── CSharpScripts │ ├── Program.cs │ └── SurgingServiceEngine.cs │ ├── Configs │ ├── NLog.config │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── cacheSettings.json │ ├── cacheSettings.local.json │ ├── consul.json │ ├── eventBusSettings.json │ ├── gatewaySettings.json │ ├── log4net.config │ ├── surgingSettings.json │ └── zookeeper.json │ └── Props │ ├── applicationpackage.props │ ├── commonpackage.props │ ├── domainpackage.props │ ├── hostpackage.props │ └── surgingversion.props └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | **/.vs/ 6 | .vscode 7 | docker-compose*.yml 8 | #docker-compose.dcproj 9 | #*.sln 10 | #!SunWin.Ifoc.Service.sln 11 | *.md 12 | hosts 13 | LICENSE 14 | *.testsettings 15 | vsts-docs 16 | test 17 | ServiceFabric 18 | readme 19 | k8s 20 | img 21 | docs 22 | deploy 23 | Components 24 | cli-windows 25 | cli-mac 26 | cli-linux 27 | #**/bin/ 28 | **/obj/ 29 | #**/node_modules/ 30 | **/bower_components/ 31 | **/wwwroot/lib/* 32 | **/global.json 33 | **/.mysql/ 34 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 项目的所有变更日志均需要记录到该日志中 3 | 4 | ## [Unreleased] 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 开发指南 2 | 3 | ## 开发流程 4 | 项目使用git工作流开发和管理项目。 5 | 6 | 如下所述,简要的描述了git工作流: 7 | 8 | 1. 使用git clone项目源代码; 9 | 10 | 2. 新建本地分支,开发新特性或修复bug; 11 | 12 | 3. 提交代码到本地仓库; 13 | 14 | 4. 通过`git fetch` 拉取最新代码,并使用`git rebase`命令与远程仓库的 develop 分支进行合并(变基),如果存在冲突,请解决冲突。 15 | 16 | 5. push代码到远程仓库,如果是新功能开发,远程分支请以`feature-m -function`命名,如果是修复bug请以`bug-issueid`命名; 17 | 18 | 6. 在gitlab上发起pull request,并指派给项目责任人。 19 | 20 | 更多关于git工作流知识,请参考: 21 | - [阮一峰:Git 工作流程](http://www.ruanyifeng.com/blog/2015/12/git-workflow.html) 22 | - [博客园:Git工作流指南:Gitflow工作流](https://www.cnblogs.com/jiuyi/p/7690615.html) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 surging-engine 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /cli-linux/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuhll/hero/ad508cfb490007ed685d4308cc08e5d6930d8983/cli-linux/.keep -------------------------------------------------------------------------------- /cli-windows/ServiceComponents: -------------------------------------------------------------------------------- 1 | surging.hero.auth 2 | surging.hero.basicdata 3 | surging.hero.organization 4 | surging.hero.gateway -------------------------------------------------------------------------------- /db/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 项目的所有针对数据库的变更日志均需要记录到该日志中 3 | 4 | ## [Unreleased] 5 | ### Added 6 | - 新增Auth服务组件数据库设计 7 | - 新增BasicData服务组件数据库设计 8 | - 新增组织结构服务组件数据库设计 9 | 10 | ### Changed 11 | - 更新字典表结构设计 12 | - 角色表新增部门Id -------------------------------------------------------------------------------- /db/README.md: -------------------------------------------------------------------------------- 1 | # 数据库设计规范 2 | 1. 所有数据库均需要先修改pdm再修改数据库脚本 3 | 2. 数据库表名称、字段名称均采用Pascal命名规范,字段均需要进行备注 4 | 3. 所有表名称、字段均采用英文或通用英文单词缩写进行命名,禁止采用汉语拼音或是不通用的大写字母缩写等不规范的名称进行命名 5 | 4. 所有表均必须要有逻辑主键`Id`,且不带任何前缀 6 | 5. 所有表均需要包含CreateBy、CreateTime、UpdateBy、UpdateTime等审计字段。实体表还需要包含软删除相关字段(IsDeleted、DeleteBy、DeleteTime),关系表不包含软删除相关字段 7 | 6. 所有表均不设置物理外键,通过逻辑外键进行关联 8 | 7. 不允许写存储过程和触发器 9 | -------------------------------------------------------------------------------- /docker-compose/infrastr/docker-compose.consul.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | consul-agent-1: &consul-agent 5 | image: consul:latest 6 | restart: always 7 | networks: 8 | - surging_hero_service_net 9 | command: "agent -retry-join hero.consul -client 0.0.0.0" 10 | 11 | consul-agent-2: 12 | <<: *consul-agent 13 | 14 | consul-agent-3: 15 | <<: *consul-agent 16 | 17 | consul-server-1: &consul-server 18 | <<: *consul-agent 19 | command: "agent -server -retry-join hero.consul -client 0.0.0.0" 20 | 21 | consul-server-2: 22 | <<: *consul-server 23 | 24 | hero.consul: 25 | <<: *consul-agent 26 | ports: 27 | - "8400:8400" 28 | - "8500:8500" 29 | - "8600:8600" 30 | - "8600:8600/udp" 31 | command: "agent -server -bootstrap-expect 3 -ui -client 0.0.0.0" 32 | 33 | networks: 34 | surging_hero_service_net: 35 | external: 36 | name: surging_hero_service_net -------------------------------------------------------------------------------- /docker-compose/infrastr/docker-compose.mysql.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | hero.mysql: 5 | image: mysql:8.0.15 6 | command: --default-authentication-plugin=mysql_native_password 7 | restart: always 8 | environment: 9 | MYSQL_ROOT_PASSWORD: "qwe!P4ss" 10 | MYSQL_PASSWORD: "qwe!P4ss" 11 | volumes: 12 | - ./.mysql/data:/var/lib/mysql 13 | - ../../db/sql:/docker-entrypoint-initdb.d 14 | 15 | ports: 16 | - "3306:3306" 17 | networks: 18 | - surging_hero_service_net 19 | networks: 20 | surging_hero_service_net: 21 | driver: bridge 22 | name: surging_hero_service_net 23 | ipam: 24 | driver: default 25 | config: 26 | - subnet: 172.23.0.1/16 27 | -------------------------------------------------------------------------------- /docker-compose/infrastr/docker-compose.rabbitmq.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | hero.rabbitmq: 5 | image: rabbitmq:management 6 | restart: always 7 | environment: 8 | RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG" 9 | RABBITMQ_DEFAULT_USER: "rabbitmq" 10 | RABBITMQ_DEFAULT_PASS: "rabbitmq" 11 | RABBITMQ_DEFAULT_VHOST: "/" 12 | ports: 13 | - "15672:15672" 14 | - "5672:5672" 15 | networks: 16 | - surging_hero_service_net 17 | 18 | networks: 19 | surging_hero_service_net: 20 | external: 21 | name: surging_hero_service_net -------------------------------------------------------------------------------- /docker-compose/infrastr/docker-compose.redis.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | hero.redis1: 5 | image: redis:latest 6 | restart: always 7 | ports: 8 | - "16379:6379" 9 | networks: 10 | - surging_hero_service_net 11 | hero.redis2: 12 | image: redis:latest 13 | restart: always 14 | ports: 15 | - "16380:6379" 16 | networks: 17 | - surging_hero_service_net 18 | hero.redis3: 19 | image: redis:latest 20 | restart: always 21 | ports: 22 | - "16381:6379" 23 | networks: 24 | - surging_hero_service_net 25 | hero.redis4: 26 | image: redis:latest 27 | restart: always 28 | ports: 29 | - "16382:6379" 30 | networks: 31 | - surging_hero_service_net 32 | networks: 33 | surging_hero_service_net: 34 | external: 35 | name: surging_hero_service_net 36 | -------------------------------------------------------------------------------- /docker-compose/nginx/consul.conf: -------------------------------------------------------------------------------- 1 | # default.conf 2 | server { 3 | listen 80; 4 | #listen 443 ssl; #这个是https访问的端口 5 | server_name consul.liuhl-hero.top; #域名地址 6 | 7 | #增加ssl 8 | #ssl on; #如果强制HTTPs访问,这行要打开 9 | #ssl_certificate cert/***.pem;#你的xxxx.pem文件名称 10 | #ssl_certificate_key cert/***.key;#你的xxxx.key文件名称 11 | 12 | #ssl_session_cache shared:SSL:1m; 13 | #ssl_session_timeout 5m; 14 | 15 | #ssl_protocols SSLv2 SSLv3 TLSv1.2;# 指定密码为openssl支持的格式 16 | 17 | #ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式 18 | #ssl_prefer_server_ciphers on; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 19 | 20 | #跨域Content Security Policy配置解决https中混杂http请求的问题 21 | 22 | location / { 23 | proxy_pass http://172.26.192.25:8500; 24 | } 25 | 26 | location ~ .* { 27 | proxy_pass http://172.26.192.25:8500; 28 | proxy_set_header Host $http_host; 29 | proxy_set_header X-Real-IP $remote_addr; 30 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 31 | } 32 | error_page 404 /404.html; 33 | } 34 | -------------------------------------------------------------------------------- /docker-compose/nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | nginx: 4 | restart: always 5 | container_name: nginx 6 | image: nginx:latest 7 | ports: 8 | - 80:80 9 | - 443:443 10 | volumes: 11 | - .:/etc/nginx/conf.d 12 | -------------------------------------------------------------------------------- /docker-compose/nginx/hero-dev.conf: -------------------------------------------------------------------------------- 1 | # default.conf 2 | server { 3 | listen 80; 4 | #listen 443 ssl; #这个是https访问的端口 5 | server_name gateway.liuhl-hero.top; #域名地址 6 | 7 | #增加ssl 8 | #ssl on; #如果强制HTTPs访问,这行要打开 9 | #ssl_certificate cert/***.pem;#你的xxxx.pem文件名称 10 | #ssl_certificate_key cert/***.key;#你的xxxx.key文件名称 11 | 12 | #ssl_session_cache shared:SSL:1m; 13 | #ssl_session_timeout 5m; 14 | 15 | #ssl_protocols SSLv2 SSLv3 TLSv1.2;# 指定密码为openssl支持的格式 16 | 17 | #ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式 18 | #ssl_prefer_server_ciphers on; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 19 | 20 | #跨域Content Security Policy配置解决https中混杂http请求的问题 21 | 22 | location / { 23 | proxy_pass http://hero-server; 24 | proxy_redirect default; 25 | } 26 | 27 | location ~ .* { 28 | proxy_pass http://hero-server; 29 | proxy_set_header Host $http_host; 30 | proxy_set_header X-Real-IP $remote_addr; 31 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 32 | } 33 | error_page 404 /404.html; 34 | } 35 | 36 | upstream hero-server { 37 | server 127.0.0.1:18081 weight=1; 38 | # server 127.0.0.1:18082 weight=1; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /docker-compose/nginx/hero-web.conf: -------------------------------------------------------------------------------- 1 | # default.conf 2 | server { 3 | listen 80; 4 | #listen 443 ssl; #这个是https访问的端口 5 | server_name www.liuhl-hero.top; #域名地址 6 | 7 | #增加ssl 8 | #ssl on; #如果强制HTTPs访问,这行要打开 9 | #ssl_certificate cert/***.pem;#你的xxxx.pem文件名称 10 | #ssl_certificate_key cert/***.key;#你的xxxx.key文件名称 11 | 12 | #ssl_session_cache shared:SSL:1m; 13 | #ssl_session_timeout 5m; 14 | 15 | #ssl_protocols SSLv2 SSLv3 TLSv1.2;# 指定密码为openssl支持的格式 16 | 17 | #ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式 18 | #ssl_prefer_server_ciphers on; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 19 | 20 | #跨域Content Security Policy配置解决https中混杂http请求的问题 21 | 22 | location / { 23 | proxy_pass http://172.26.192.25:8080; 24 | } 25 | 26 | location ~ .* { 27 | proxy_pass http://172.26.192.25:8080; 28 | proxy_set_header Host $http_host; 29 | proxy_set_header X-Real-IP $remote_addr; 30 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 31 | } 32 | error_page 404 /404.html; 33 | } 34 | -------------------------------------------------------------------------------- /docker-compose/nginx/hero.conf: -------------------------------------------------------------------------------- 1 | # default.conf 2 | server { 3 | listen 80; 4 | #listen 443 ssl; #这个是https访问的端口 5 | server_name gateway.liuhl-hero.top; #域名地址 6 | 7 | #增加ssl 8 | #ssl on; #如果强制HTTPs访问,这行要打开 9 | #ssl_certificate cert/***.pem;#你的xxxx.pem文件名称 10 | #ssl_certificate_key cert/***.key;#你的xxxx.key文件名称 11 | 12 | #ssl_session_cache shared:SSL:1m; 13 | #ssl_session_timeout 5m; 14 | 15 | #ssl_protocols SSLv2 SSLv3 TLSv1.2;# 指定密码为openssl支持的格式 16 | 17 | #ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式 18 | #ssl_prefer_server_ciphers on; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 19 | 20 | #跨域Content Security Policy配置解决https中混杂http请求的问题 21 | 22 | location / { 23 | proxy_pass http://172.26.192.25:18081; 24 | rewrite ^/(.*) http://172.26.192.25:18081/swagger/index.html permanent; 25 | } 26 | 27 | location ~ .* { 28 | proxy_pass http://172.26.192.25:18081; 29 | proxy_set_header Host $http_host; 30 | proxy_set_header X-Real-IP $remote_addr; 31 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 32 | } 33 | error_page 404 /404.html; 34 | } 35 | -------------------------------------------------------------------------------- /docker-compose/nginx/zookeeper.conf: -------------------------------------------------------------------------------- 1 | # default.conf 2 | server { 3 | listen 80; 4 | #listen 443 ssl; #这个是https访问的端口 5 | server_name zookeeper.liuhl-hero.top; #域名地址 6 | 7 | #增加ssl 8 | #ssl on; #如果强制HTTPs访问,这行要打开 9 | #ssl_certificate cert/***.pem;#你的xxxx.pem文件名称 10 | #ssl_certificate_key cert/***.key;#你的xxxx.key文件名称 11 | 12 | #ssl_session_cache shared:SSL:1m; 13 | #ssl_session_timeout 5m; 14 | 15 | #ssl_protocols SSLv2 SSLv3 TLSv1.2;# 指定密码为openssl支持的格式 16 | 17 | #ssl_ciphers HIGH:!aNULL:!MD5; # 密码加密方式 18 | #ssl_prefer_server_ciphers on; #依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 19 | 20 | #跨域Content Security Policy配置解决https中混杂http请求的问题 21 | 22 | location / { 23 | proxy_pass http://172.26.192.25:2181; 24 | } 25 | 26 | location ~ .* { 27 | proxy_pass http://172.26.192.25:2181; 28 | proxy_set_header Host $http_host; 29 | proxy_set_header X-Real-IP $remote_addr; 30 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 31 | } 32 | error_page 404 /404.html; 33 | } 34 | -------------------------------------------------------------------------------- /docker-compose/surging.auth/docker-compose.dcproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | fea0c318-ffed-4d39-8781-265718ca43dd 5 | Linux 6 | 2.2 7 | LaunchBrowser 8 | 9 | 10 | 11 | 12 | docker-compose.yml 13 | 14 | 15 | docker-compose.yml 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docker-compose/surging.auth/docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | surging.hero.auth: 5 | environment: 6 | Register_Conn: ${REGISTER_CONN:-hero.consul:8500} 7 | Register_SessionTimeout: ${REGISTER_SESSION_TIMEOUT:-50} 8 | UseEngineParts: ${NORMAL_SERVER_ENGINE} 9 | EventBusConnection: ${RABBITMQ_CONNECTION:-hero.rabbitmq} 10 | EventBusUserName: ${RABBITMQ_USERNAME:-rabbitmq} 11 | EventBusPassword: ${RABBITMQ_PASSWORD:-rabbitmq} 12 | EventBusPort: ${RABBITMQ_PORT:-5672} 13 | Environment: ${ENVIRONMENT:-Development} 14 | ForceDisplayStackTrace: ${FORCED_DISPLAY_STACKTRACE:-false} 15 | DbType: ${AUTH_DB_TYPE:-Mysql} 16 | ConnectionString: ${AUTH_DB_CONN} 17 | InitAction: "${INIT_ACTION:-false}" 18 | ExecutionTimeoutInMilliseconds: ${EXECUTION_TIMEOUT:-4000} -------------------------------------------------------------------------------- /docker-compose/surging.auth/docker-compose.vs.debug.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | surging.hero.auth: 5 | environment: 6 | LogPath: /app/configs/log4net.config 7 | volumes: 8 | - ../../src/Shared/Configs:/app/configs 9 | - ../annotationxmldir:/app/annotationxmldir 10 | 11 | -------------------------------------------------------------------------------- /docker-compose/surging.auth/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | surging.hero.auth: 5 | image: surgingcloud/surging.hero.auth:${TAG:-latest} 6 | build: 7 | context: ../.. 8 | dockerfile: src/Services/Auth/Surging.Hero.AuthHost/Dockerfile 9 | args: 10 | host_workdir: src/Services/Auth/Surging.Hero.AuthHost 11 | host_name: Surging.Hero.AuthHost.dll 12 | sln_name: sln/Surging.Hero.sln 13 | volumes: 14 | - ${LOG_DIR:-/var/logs}/auth:/app/logs 15 | networks: 16 | - surging_hero_service_net 17 | networks: 18 | surging_hero_service_net: 19 | external: 20 | name: surging_hero_service_net -------------------------------------------------------------------------------- /docker-compose/surging.hero.rider/docker-compose.vs.debug.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | surging.hero.auth: 5 | environment: 6 | LogPath: /app/configs/log4net.config 7 | volumes: 8 | - ../../src/Shared/Configs:/app/configs 9 | - ../annotationxmldir:/app/annotationxmldir 10 | 11 | surging.hero.basicdata: 12 | environment: 13 | LogPath: /app/configs/log4net.config 14 | volumes: 15 | - ../../src/Shared/Configs:/app/configs 16 | - ../annotationxmldir:/app/annotationxmldir 17 | 18 | surging.hero.organization: 19 | environment: 20 | LogPath: /app/configs/log4net.config 21 | volumes: 22 | - ../../src/Shared/Configs:/app/configs 23 | - ../annotationxmldir:/app/annotationxmldir 24 | 25 | surging.hero.gateway: 26 | environment: 27 | LogPath: /app/configs/log4net.config 28 | volumes: 29 | - ../../src/Shared/Configs:/app/configs 30 | - ../annotationxmldir:/app/annotationxmldir 31 | 32 | surging.hero.fileservice: 33 | environment: 34 | LogPath: /app/configs/log4net.config 35 | volumes: 36 | - ../../src/Shared/Configs:/app/configs 37 | - ../annotationxmldir:/app/annotationxmldir -------------------------------------------------------------------------------- /docker-compose/surging.hero/docker-compose.dcproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.2 5 | Linux 6 | {55E7E735-803F-47F6-9770-55CCA30ECB38} 7 | Debug;Release 8 | AnyCPU 9 | 10 | 11 | 12 | docker-compose.yml 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docker-compose/surging.hero/docker-compose.mac.dcproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.1 5 | Linux 6 | {55E7E735-803F-47F6-9770-55CCA30ECB38} 7 | 8 | 9 | 10 | docker-compose.yml 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docker-compose/surging.hero/docker-compose.vs.debug.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | surging.hero.auth: 5 | environment: 6 | LogPath: /app/configs/log4net.config 7 | volumes: 8 | - ../../src/Shared/Configs:/app/configs 9 | - ../annotationxmldir:/app/annotationxmldir 10 | 11 | surging.hero.basicdata: 12 | environment: 13 | LogPath: /app/configs/log4net.config 14 | volumes: 15 | - ../../src/Shared/Configs:/app/configs 16 | - ../annotationxmldir:/app/annotationxmldir 17 | 18 | surging.hero.organization: 19 | environment: 20 | LogPath: /app/configs/log4net.config 21 | volumes: 22 | - ../../src/Shared/Configs:/app/configs 23 | - ../annotationxmldir:/app/annotationxmldir 24 | 25 | surging.hero.gateway: 26 | environment: 27 | LogPath: /app/configs/log4net.config 28 | volumes: 29 | - ../../src/Shared/Configs:/app/configs 30 | - ../annotationxmldir:/app/annotationxmldir 31 | 32 | surging.hero.fileservice: 33 | environment: 34 | LogPath: /app/configs/log4net.config 35 | volumes: 36 | - ../../src/Shared/Configs:/app/configs 37 | - ../annotationxmldir:/app/annotationxmldir -------------------------------------------------------------------------------- /docker-compose/surging.noauth/docker-compose.dcproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | fea0c318-ffed-4d39-8781-265718ca43dd 5 | Linux 6 | 2.2 7 | LaunchBrowser 8 | 9 | 10 | 11 | 12 | docker-compose.yml 13 | 14 | 15 | docker-compose.yml 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docker-compose/surging.noauth/docker-compose.vs.debug.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | surging.hero.basicdata: 5 | environment: 6 | LogPath: /app/configs/log4net.config 7 | volumes: 8 | - ../../src/Shared/Configs:/app/configs 9 | - ../annotationxmldir:/app/annotationxmldir 10 | 11 | surging.hero.organization: 12 | environment: 13 | LogPath: /app/configs/log4net.config 14 | volumes: 15 | - ../../src/Shared/Configs:/app/configs 16 | - ../annotationxmldir:/app/annotationxmldir 17 | 18 | surging.hero.gateway: 19 | environment: 20 | LogPath: /app/configs/log4net.config 21 | volumes: 22 | - ../../src/Shared/Configs:/app/configs 23 | - ../annotationxmldir:/app/annotationxmldir 24 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroText: Hero 4 | tagline: Hero权限管理系统在线文档 5 | actionText: 快速上手 → 6 | features: 7 | - title: 开发平台/架构 8 | details: 服务端基于.net5平台,开发框架是基于surging.cloud(surging.cloud是在surging基础上进行二次开发的微服务框架) 9 | footer: MIT Licensed | Copyright © 2021-present Liuhll 10 | --- -------------------------------------------------------------------------------- /docs/hero/dev-docs/appserver.md: -------------------------------------------------------------------------------- 1 | # 应用接口 -------------------------------------------------------------------------------- /docs/hero/dev-docs/structure.md: -------------------------------------------------------------------------------- 1 | # 项目结构 -------------------------------------------------------------------------------- /docs/hero/development-env.md: -------------------------------------------------------------------------------- 1 | # 开发环境 -------------------------------------------------------------------------------- /docs/hero/index.md: -------------------------------------------------------------------------------- 1 | # 简介 2 | 3 | ## 开发平台 4 | 5 | ## 开发框架 6 | 7 | ## 项目特性 8 | 9 | ## 项目目录 10 | 11 | ## 服务划分 -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "5.0.101" 4 | } 5 | } -------------------------------------------------------------------------------- /k8s/.setting: -------------------------------------------------------------------------------- 1 | node1=192.168.31.115 2 | node2=192.168.31.115 3 | 4 | -------------------------------------------------------------------------------- /k8s/README.md: -------------------------------------------------------------------------------- 1 | # 将服务部署到k8s集群 2 | 3 | ## Windows环境 4 | 1. 修改`.setting`文件的配置属性为当前主机的ip地址 5 | 6 | 2. 通过`deploy-ingress.ps1`脚本安装metallb插件和nginx-ingress插件 7 | ```powershell 8 | ./deploy-ingress.ps1 9 | ``` 10 | 11 | 3. 通过`deploy.ps1`脚本部署surging.hero相关服务组件 12 | ```powershell 13 | ./deploy.ps1 -imageTag v0.0.1 -deployEnv dev -replicasNum 2 14 | ``` 15 | 16 | 4. 将`C:\Windows\System32\drivers\etc\hosts`替换为`./hosts` 17 | 18 | > notes 19 | > :todo 待完善 20 | 21 | ## Linux环境 -------------------------------------------------------------------------------- /k8s/ServiceComponents: -------------------------------------------------------------------------------- 1 | auth 2 | basicdata 3 | organization 4 | gateway -------------------------------------------------------------------------------- /k8s/auth/auth-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: auth-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: auth.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: auth 20 | servicePort: 8080 -------------------------------------------------------------------------------- /k8s/auth/auth-services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: auth 7 | name: auth 8 | spec: 9 | ports: 10 | - name: "http-port" 11 | port: 8080 12 | targetPort: 8080 13 | protocol: TCP 14 | - name: "rpc-port" 15 | port: 100 16 | targetPort: 100 17 | protocol: TCP 18 | selector: 19 | app: surging-hero 20 | component: auth -------------------------------------------------------------------------------- /k8s/basicdata/basicdata-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: basicdata-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: basicdata.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: basicdata 20 | servicePort: 8080 -------------------------------------------------------------------------------- /k8s/basicdata/basicdata-services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: basicdata 7 | name: basicdata 8 | spec: 9 | ports: 10 | - name: "http-port" 11 | port: 8080 12 | targetPort: 8080 13 | protocol: TCP 14 | - name: "rpc-port" 15 | port: 100 16 | targetPort: 100 17 | protocol: TCP 18 | selector: 19 | app: surging-hero 20 | component: basicdata -------------------------------------------------------------------------------- /k8s/deploy-ingress.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [parameter(Mandatory=$false)][string]$settingFile="./.setting" 3 | ) 4 | 5 | . "./utilities.ps1" 6 | 7 | 8 | $configSetting = LoadConfig -settingFile $settingFile 9 | 10 | (Get-Content .\metallb\metallb-config.yml) -replace "{node1}",$configSetting.node1 -replace "{node2}",$configSetting.node2 | 11 | Set-Content .\metallb\metallb-config.yml 12 | 13 | ExecKube -cmd "apply -f metallb/metallb-config.yml -f metallb/metallb.yml -f nginx-ingress/cloud-generic.yml -f nginx-ingress/cm.yml -f nginx-ingress/mandatory.yml" -------------------------------------------------------------------------------- /k8s/gateway/gateway-deployments.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: gateway 5 | spec: 6 | paused: true 7 | template: 8 | metadata: 9 | labels: 10 | app: surging-hero 11 | component: gateway 12 | spec: 13 | imagePullSecrets: 14 | - name: registry-key 15 | containers: 16 | - name: gateway 17 | image: surgingcloud/surging.hero.gateway 18 | imagePullPolicy: Always 19 | env: 20 | - name: Register_Conn 21 | valueFrom: 22 | configMapKeyRef: 23 | name: herocfg 24 | key: all__Consul_Register_Conn 25 | ports: 26 | - containerPort: 80 27 | name: http-port -------------------------------------------------------------------------------- /k8s/gateway/gateway-ingress-dev.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: gateway-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: gateway.dev.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: gateway 20 | servicePort: 80 -------------------------------------------------------------------------------- /k8s/gateway/gateway-ingress-test.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: gateway-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: gateway.test.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: gateway 20 | servicePort: 80 -------------------------------------------------------------------------------- /k8s/gateway/gateway-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: gateway-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: gateway.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: gateway 20 | servicePort: 80 -------------------------------------------------------------------------------- /k8s/gateway/gateway-services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: gateway 7 | name: gateway 8 | spec: 9 | ports: 10 | - name: "http-port" 11 | port: 80 12 | targetPort: 80 13 | protocol: TCP 14 | selector: 15 | app: surging-hero 16 | component: gateway -------------------------------------------------------------------------------- /k8s/hero-conf-dev.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: herocfg 5 | labels: 6 | app: surging-hero 7 | data: 8 | all__mysql_rootpwd: qwe!P4ss 9 | all__mysql_pwd: qwe!P4ss 10 | all__Consul_Register_Conn: "consul:8500" 11 | all__Register_SessionTimeout: "50" 12 | all__Normal_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;" 13 | all__Ws_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;WSProtocolModule;" 14 | all__EventBusConnection: "rabbitmq" 15 | all__EventBusUserName: "rabbitmq" 16 | all__EventBusPassword: "rabbitmq" 17 | all__EventBusPort: "5672" 18 | all__Environment: "Development" 19 | all__ForceDisplayStackTrace: "True" 20 | 21 | all__DbType: "MySql" 22 | auth__DbConnection: "Server=mysql;Database=hero_auth;Uid=root;Port=3306;Pwd=qwe!P4ss" 23 | basicdata__DbConnection: "Server=mysql;Database=hero_basicdata;Uid=root;Port=3306;Pwd=qwe!P4ss" 24 | organization__DbConnection: "Server=mysql;Database=hero_organization;Uid=root;Port=3306;Pwd=qwe!P4ss" 25 | -------------------------------------------------------------------------------- /k8s/hero-conf-test.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: herocfg 5 | labels: 6 | app: surging-hero 7 | data: 8 | all__mysql_rootpwd: qwe!P4ss 9 | all__mysql_pwd: qwe!P4ss 10 | all__Consul_Register_Conn: "consul:8500" 11 | all__Register_SessionTimeout: "50" 12 | all__Normal_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;" 13 | all__Ws_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;WSProtocolModule;" 14 | all__EventBusConnection: "rabbitmq" 15 | all__EventBusUserName: "rabbitmq" 16 | all__EventBusPassword: "rabbitmq" 17 | all__EventBusPort: "5672" 18 | all__Environment: "Test" 19 | all__ForceDisplayStackTrace: "True" 20 | 21 | all__DbType: "MySql" 22 | auth__DbConnection: "Server=mysql;Database=hero_auth;Uid=root;Port=3306;Pwd=qwe!P4ss" 23 | basicdata__DbConnection: "Server=mysql;Database=hero_basicdata;Uid=root;Port=3306;Pwd=qwe!P4ss" 24 | organization__DbConnection: "Server=mysql;Database=hero_organization;Uid=root;Port=3306;Pwd=qwe!P4ss" 25 | -------------------------------------------------------------------------------- /k8s/hero-conf.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: herocfg 5 | labels: 6 | app: surging-hero 7 | data: 8 | all__mysql_rootpwd: qwe!P4ss 9 | all__mysql_pwd: qwe!P4ss 10 | all__Consul_Register_Conn: "consul:8500" 11 | all__Register_SessionTimeout: "50" 12 | all__Normal_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;" 13 | all__Ws_Service_Engine: "DotNettyModule;Log4netModule;ConsulModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;DapperModule;AutoMapperModule;ServiceProxyModule;WSProtocolModule;" 14 | all__EventBusConnection: "rabbitmq" 15 | all__EventBusUserName: "rabbitmq" 16 | all__EventBusPassword: "rabbitmq" 17 | all__EventBusPort: "5672" 18 | all__Environment: "Production" 19 | all__ForceDisplayStackTrace: "True" 20 | 21 | all__DbType: "MySql" 22 | auth__DbConnection: "Server=mysql;Database=hero_auth;Uid=root;Port=3306;Pwd=qwe!P4ss" 23 | basicdata__DbConnection: "Server=mysql;Database=hero_basicdata;Uid=root;Port=3306;Pwd=qwe!P4ss" 24 | organization__DbConnection: "Server=mysql;Database=hero_organization;Uid=root;Port=3306;Pwd=qwe!P4ss" 25 | -------------------------------------------------------------------------------- /k8s/hosts: -------------------------------------------------------------------------------- 1 | # Copyright (c) 1993-2009 Microsoft Corp. 2 | # 3 | # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. 4 | # 5 | # This file contains the mappings of IP addresses to host names. Each 6 | # entry should be kept on an individual line. The IP address should 7 | # be placed in the first column followed by the corresponding host name. 8 | # The IP address and the host name should be separated by at least one 9 | # space. 10 | # 11 | # Additionally, comments (such as these) may be inserted on individual 12 | # lines or following the machine name denoted by a '#' symbol. 13 | # 14 | # For example: 15 | # 16 | # 102.54.94.97 rhino.acme.com # source server 17 | # 38.25.63.10 x.acme.com # x client host 18 | 19 | # localhost name resolution is handled within DNS itself. 20 | # 127.0.0.1 localhost 21 | # ::1 localhost 22 | # To allow the same kube context to work on the host and the container: 23 | 127.0.0.1 kubernetes.docker.internal 24 | # End of section 25 | 26 | {ingress.ip} mysql.surginghero.com 27 | {ingress.ip} auth.surginghero.com 28 | {ingress.ip} basicdata.surginghero.com 29 | {ingress.ip} organization.surginghero.com 30 | {ingress.ip} consul.surginghero.com 31 | -------------------------------------------------------------------------------- /k8s/metallb/metallb-config.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | namespace: metallb-system 5 | name: config 6 | data: 7 | config: | 8 | address-pools: 9 | - name: my-ip-space 10 | protocol: layer2 11 | addresses: 12 | - {node1}-{node2} 13 | -------------------------------------------------------------------------------- /k8s/nginx-ingress/cloud-generic.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: ingress-nginx 5 | namespace: ingress-nginx 6 | labels: 7 | app.kubernetes.io/name: ingress-nginx 8 | app.kubernetes.io/part-of: ingress-nginx 9 | spec: 10 | externalTrafficPolicy: Local 11 | type: LoadBalancer 12 | selector: 13 | app.kubernetes.io/name: ingress-nginx 14 | app.kubernetes.io/part-of: ingress-nginx 15 | ports: 16 | - name: http 17 | port: 80 18 | targetPort: http 19 | - name: https 20 | port: 443 21 | targetPort: https 22 | 23 | --- -------------------------------------------------------------------------------- /k8s/nginx-ingress/cm.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: ingress-nginx 6 | app.kubernetes.io/part-of: ingress-nginx 7 | name: nginx-configuration 8 | namespace: ingress-nginx 9 | data: 10 | proxy-buffer-size: "128k" 11 | proxy-buffers: "4 256k" -------------------------------------------------------------------------------- /k8s/organization/organization-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: frontend 7 | name: organization-ingress 8 | annotations: 9 | ingress.kubernetes.io/ssl-redirect: "false" 10 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 11 | kubernetes.io/ingress.class: "nginx" 12 | spec: 13 | rules: 14 | - host: organization.surginghero.com 15 | http: 16 | paths: 17 | - path: / 18 | backend: 19 | serviceName: organization 20 | servicePort: 8080 -------------------------------------------------------------------------------- /k8s/organization/organization-services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: surging-hero 6 | component: organization 7 | name: organization 8 | spec: 9 | ports: 10 | - name: "http-port" 11 | port: 8080 12 | targetPort: 8080 13 | protocol: TCP 14 | - name: "rpc-port" 15 | port: 100 16 | targetPort: 100 17 | protocol: TCP 18 | selector: 19 | app: surging-hero 20 | component: organization -------------------------------------------------------------------------------- /k8s/rabbitmq.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: surging-hero-middle 6 | component: rabbitmq 7 | name: rabbitmq 8 | spec: 9 | ports: 10 | - port: 5672 11 | targetPort: 5672 12 | selector: 13 | app: surging-hero-middle 14 | component: rabbitmq 15 | --- 16 | apiVersion: extensions/v1beta1 17 | kind: Deployment 18 | metadata: 19 | name: rabbitmq 20 | spec: 21 | template: 22 | metadata: 23 | labels: 24 | app: surging-hero-middle 25 | component: rabbitmq 26 | spec: 27 | containers: 28 | - name: rabbitmq 29 | image: rabbitmq:management 30 | env: 31 | - name: RABBITMQ_DEFAULT_USER 32 | valueFrom: 33 | configMapKeyRef: 34 | name: herocfg 35 | key: all__EventBusUserName 36 | - name: RABBITMQ_DEFAULT_PASS 37 | valueFrom: 38 | configMapKeyRef: 39 | name: herocfg 40 | key: all__EventBusPassword 41 | - name: RABBITMQ_ERLANG_COOKIE 42 | value: SWQOKODSQALRPCLNMEQG 43 | - name: RABBITMQ_DEFAULT_VHOST 44 | value: "/" 45 | ports: 46 | - containerPort: 5672 47 | -------------------------------------------------------------------------------- /k8s/redis.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: redis 5 | labels: 6 | app: surging-hero-middle 7 | component: redis 8 | name: redis 9 | spec: 10 | ports: 11 | - port: 6379 12 | targetPort: 6379 13 | selector: 14 | app: surging-hero-middle 15 | component: redis 16 | --- 17 | apiVersion: extensions/v1beta1 18 | kind: Deployment 19 | metadata: 20 | name: redis 21 | spec: 22 | template: 23 | metadata: 24 | labels: 25 | app: surging-hero-middle 26 | component: redis 27 | spec: 28 | containers: 29 | - name: redis 30 | image: redis:latest 31 | ports: 32 | - containerPort: 6379 33 | -------------------------------------------------------------------------------- /k8s/utilities.ps1: -------------------------------------------------------------------------------- 1 | function ExecKube($cmd) { 2 | $exp = $execPath + 'kubectl ' + $cmd 3 | Invoke-Expression $exp 4 | } 5 | 6 | function LoadConfig($settingFile) { 7 | $hashtable = @{} 8 | $payload = Get-Content -Path $settingFile | 9 | Where-Object { $_ -like '*=*' } | 10 | ForEach-Object { 11 | $infos = $_ -split '=' 12 | $key = $infos[0].Trim() 13 | $value = $infos[1].Trim() 14 | $hashtable.$key = $value 15 | } 16 | return $hashtable 17 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hero-docs", 3 | "version": "1.0.0", 4 | "description": "hero 在线文档", 5 | "main": "index.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "docs:dev": "vuepress dev docs", 11 | "docs:build": "vuepress build docs" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/liuhll/hero.git" 16 | }, 17 | "keywords": [ 18 | "hero", 19 | "surging-cloud", 20 | "rbac" 21 | ], 22 | "author": "liuhll", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/liuhll/hero/issues" 26 | }, 27 | "homepage": "https://github.com/liuhll/hero#readme", 28 | "devDependencies": { 29 | "vuepress": "^1.8.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /res/assets/img/surging-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liuhll/hero/ad508cfb490007ed685d4308cc08e5d6930d8983/res/assets/img/surging-logo.jpg -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/CheckStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Common 2 | { 3 | public enum CheckStatus 4 | { 5 | UnChecked, 6 | 7 | Checked, 8 | 9 | Indeterminate 10 | } 11 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Developers.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Common 2 | { 3 | public static class Developers 4 | { 5 | public const string Liuhll = "刘洪亮"; 6 | } 7 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Expression/PredicateBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | 4 | namespace Surging.Hero.Common 5 | { 6 | public static class PredicateBuilder 7 | { 8 | public static Expression> True() 9 | { 10 | return f => true; 11 | } 12 | 13 | public static Expression> False() 14 | { 15 | return f => false; 16 | } 17 | 18 | public static Expression> Or(this Expression> expr1, 19 | Expression> expr2) 20 | { 21 | var invokedExpr = Expression.Invoke(expr2, expr1.Parameters); 22 | return Expression.Lambda> 23 | (Expression.OrElse(expr1.Body, invokedExpr), expr1.Parameters); 24 | } 25 | 26 | public static Expression> And(this Expression> expr1, 27 | Expression> expr2) 28 | { 29 | var invokedExpr = Expression.Invoke(expr2, expr1.Parameters); 30 | return Expression.Lambda> 31 | (Expression.AndAlso(expr1.Body, invokedExpr), expr1.Parameters); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Extensions/EnumDto.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Common.Extensions 2 | { 3 | public class EnumDto 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Key { get; set; } 8 | 9 | public string Description { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/FullAuditDtos/AuditDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Surging.Cloud.Domain.Entities.Auditing; 3 | 4 | namespace Surging.Hero.Common.FullAuditDtos 5 | { 6 | public class AuditDto : IAuditedDto 7 | { 8 | public virtual DateTime CreationTime { get; set; } 9 | public virtual long? CreatorUserId { get; set; } 10 | 11 | public virtual string CreatorUserName { get; set; } 12 | 13 | public DateTime? LastModificationTime { get; set; } 14 | 15 | public string LastModificationUserName { get; set; } 16 | 17 | public long? LastModifierUserId { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/FullAuditDtos/IAuditedDto.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Common.FullAuditDtos 4 | { 5 | public interface IAuditedDto : IAudited 6 | { 7 | string CreatorUserName { get; set; } 8 | 9 | string LastModificationUserName { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/HeroConstants.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.ProxyGenerator.Interceptors.Implementation.Metadatas; 2 | 3 | namespace Surging.Hero.Common 4 | { 5 | public static class HeroConstants 6 | { 7 | public const string RouteTemplet = "api/{appService}"; 8 | 9 | public const string CaptachaRouteTemplet = "api/{ImageAppService}"; 10 | 11 | public const int UnDeletedFlag = 0; 12 | 13 | public const int DeletedFlag = 1; 14 | 15 | public const string CacheProviderKey = "ddlCache.Redis"; 16 | 17 | public const string DefaultSysName = "Hero权限管理系统"; 18 | 19 | public static class CodeRuleRestrain 20 | { 21 | public const string CodeSeparator = "."; 22 | 23 | public const char CodeCoverSymbol = '0'; 24 | 25 | public const int CodeCoverBit = 4; 26 | 27 | public const string FullNameSeparator = "-"; 28 | } 29 | 30 | public static class CacheKey 31 | { 32 | public const string PermissionCheck = "PermissionCheck:{0}:{1}"; 33 | 34 | public const string RemoveUserPermissionCheck = "PermissionCheck:*:{0}"; 35 | 36 | public const string Captcha = "Captcha:{0}"; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/RegExpConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Common 2 | { 3 | public static class RegExpConstants 4 | { 5 | public const string UserName = "^[a-zA-Z0-9_-]{4,16}$"; 6 | 7 | public const string Phone = 8 | "^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$"; 9 | 10 | public const string Password = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$"; 11 | 12 | public const string WordbookCode = "^[a-zA-Z0-9_-]{4,50}$"; 13 | 14 | public const string CorporatioCode = "^[a-zA-Z0-9_-]{4,50}$"; 15 | 16 | public const string DepartmentCode = "^[a-zA-Z0-9_-]{4,50}$"; 17 | 18 | public const string PositionCode = "^[a-zA-Z0-9_-]{4,50}$"; 19 | 20 | public const string NormalIdentificationCode = "^[a-zA-Z][a-zA-Z0-9_-]{4,50}$"; 21 | 22 | //public const string OrgIdentificationRegex = "^[a-zA-Z][a-zA-Z0-9_-]{4,50}$"; //^[a-zA-Z][a-zA-Z0-9_-]{4,50}$ 23 | } 24 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Status.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.Common 4 | { 5 | public enum Status 6 | { 7 | [Description("无效")] Invalid = 0, 8 | 9 | [Description("有效")] Valid = 1 10 | } 11 | } -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Surging.Hero.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/CommonComponents/Surging.Hero.Common/Utils/IdentifyCodeType.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Common.Utils 2 | { 3 | public enum IdentifyCodeType 4 | { 5 | Number, 6 | 7 | Letter, 8 | 9 | MixNumberLetter, 10 | } 11 | } -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0.0.1-bate.1 4 | $(NoWarn);CS1591 5 | https://raw.githubusercontent.com/surging-cloud/Surging.Hero/develop/res/assets/img/surging-logo.jpg 6 | https://github.com/surging-cloud/Surging.Hero 7 | https://raw.githubusercontent.com/surging-cloud/Surging.Hero/develop/LICENSE 8 | git 9 | https://github.com/surging-cloud/Surging.Hero.git 10 | surging-cloud 11 | surging-cloud tearm 12 | Surging Hero 13 | Copyright © Surging Cloud All Rights Reserved. 14 | surging;surging-cloud;surging-hero 15 | 16 | 17 | 18 | True 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/Action/ActionProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Auth.IApplication.Action.Dtos; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Application.Action 6 | { 7 | public class ActionProfile : Profile 8 | { 9 | public ActionProfile() 10 | { 11 | CreateMap() 12 | .AfterMap((src, dest) => { dest.Status = Status.Valid; }); 13 | 14 | CreateMap(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/AuthConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Application 2 | { 3 | public static class AuthConstant 4 | { 5 | public static string[] UserGroupSortingFileds = {"Id", "UserName", "ChineseName", "UpdateTime", "CreateTime"}; 6 | 7 | public static string[] UserSortingFileds = {"Id", "UserName", "ChineseName", "UpdateTime", "CreateTime"}; 8 | 9 | public static class V1 10 | { 11 | public const string Version = "v1"; 12 | 13 | public const string PermissionMoudleName = "permission.v1"; 14 | 15 | public const string AccountMoudleName = "account.v1"; 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/Authorization/AccountProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Auth.Domain.Permissions.Menus; 3 | using Surging.Hero.Auth.Domain.Permissions.Operations; 4 | using Surging.Hero.Auth.IApplication.Authorization.Dtos; 5 | using Surging.Hero.Auth.IApplication.User.Dtos; 6 | using Surging.Hero.Common.Runtime.Session; 7 | using GetDisplayRoleOutput = Surging.Hero.Auth.IApplication.Role.Dtos.GetDisplayRoleOutput; 8 | 9 | namespace Surging.Hero.Auth.Application.Authorization 10 | { 11 | public class AccountProfile : Profile 12 | { 13 | public AccountProfile() 14 | { 15 | CreateMap(); 16 | CreateMap(); 17 | CreateMap().ForMember(p => p.Children, opt => opt.Ignore()) 18 | .ForMember(p => p.FullName, opt => opt.Ignore()); 19 | CreateMap().ForMember(p => p.FullName, opt => opt.Ignore()); 20 | CreateMap(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/Surging.Hero.Auth.Application.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/Tenant/TenantProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Auth.IApplication.Tenant.Dtos; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Application.Tenant 6 | { 7 | public class TenantProfile: Profile 8 | { 9 | public TenantProfile() 10 | { 11 | CreateMap().AfterMap((src, dest) => 12 | { 13 | dest.Status = Status.Valid; 14 | }); 15 | CreateMap(); 16 | CreateMap(); 17 | CreateMap(); 18 | 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/User/UserProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Auth.Domain.Users; 3 | using Surging.Hero.Auth.IApplication.User.Dtos; 4 | 5 | namespace Surging.Hero.Auth.Application.User 6 | { 7 | public class UserProfile : Profile 8 | { 9 | public UserProfile() 10 | { 11 | CreateMap(); 12 | CreateMap(); 13 | CreateMap(); 14 | CreateMap().ForMember(p => p.Roles, opt => opt.Ignore()); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Application/UserGroup/UserGroupProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Auth.Domain.UserGroups; 3 | using Surging.Hero.Auth.IApplication.Role.Dtos; 4 | using Surging.Hero.Auth.IApplication.UserGroup.Dtos; 5 | using Surging.Hero.Common; 6 | 7 | namespace Surging.Hero.Auth.Application.UserGroup 8 | { 9 | public class UserGroupProfile : Profile 10 | { 11 | public UserGroupProfile() 12 | { 13 | CreateMap().AfterMap((src, dest) => 14 | { 15 | dest.Status = Status.Valid; 16 | }); 17 | CreateMap(); 18 | CreateMap(); 19 | CreateMap(); 20 | CreateMap(); 21 | CreateMap(); 22 | CreateMap(); 23 | CreateMap(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/DataPermissionType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.Auth.Domain.Shared 4 | { 5 | public enum DataPermissionType 6 | { 7 | /// 8 | /// 拥有所有组织机构的权限 9 | /// 10 | [Description("所有部门权限")] 11 | AllOrg = 9999, 12 | 13 | /// 14 | /// 只拥有本部门的权限 15 | /// 16 | [Description("本部门权限")] 17 | OnlySelfOrg = 1, 18 | 19 | /// 20 | /// 拥有本级部门和下级部门的权限 21 | /// 22 | [Description("本部门和下级部门权限")] 23 | SelfAndLowerOrg = 2, 24 | 25 | /// 26 | /// 用户自定义部门的权限 27 | /// 28 | [Description("用户自定义部门权限")] 29 | UserDefined = 3 30 | } 31 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Menus/MenuMold.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.Shared.Menus 2 | { 3 | public enum MenuMold 4 | { 5 | Top, 6 | 7 | SubMenu 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Operations/OperationMold.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.Shared.Operations 2 | { 3 | public enum OperationMold 4 | { 5 | Create = 0, 6 | 7 | Update, 8 | 9 | Query, 10 | 11 | Look, 12 | 13 | Delete, 14 | 15 | Other 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Permissions/PermissionMold.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.Auth.Domain.Shared.Permissions 4 | { 5 | public enum PermissionMold 6 | { 7 | [Description("菜单")] Menu, 8 | 9 | [Description("操作")] Operation 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Roles/RoleType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.Auth.Domain.Shared.Roles 4 | { 5 | public enum RoleType 6 | { 7 | [Description("通用")] Universal = 0, 8 | 9 | [Description("部门")] Department 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Surging.Hero.Auth.Domain.Shared.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Users/Gender.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.Shared.Users 2 | { 3 | public enum Gender 4 | { 5 | FeMale = 0, 6 | Male = 1 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain.Shared/Users/PoliticalStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.Shared.Users 2 | { 3 | public enum PoliticalStatus 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/AuthDomainConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain 2 | { 3 | public static class AuthDomainConstants 4 | { 5 | public static class ClaimTypes 6 | { 7 | public const string OrgId = "http://www.liuhl-hero.top/claimtypes/orgid"; 8 | } 9 | 10 | public static string[] PermissionServiceIdWhiteList = new[] { "Surging.Hero.Organization.IApplication.Organization.IOrganizationAppService.GetOwnTree" }; 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Actions/Action.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Surging.Cloud.Domain.Entities.Auditing; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Domain.Permissions.Actions 6 | { 7 | public class Action : AuditedEntity 8 | { 9 | public string ServiceId { get; set; } 10 | public string ServiceHost { get; set; } 11 | public string Application { get; set; } 12 | public string Name { get; set; } 13 | 14 | public string WebApi { get; set; } 15 | 16 | public string Method { get; set; } 17 | 18 | public bool DisableNetwork { get; set; } 19 | 20 | public bool EnableAuthorization { get; set; } 21 | 22 | public bool AllowPermission { get; set; } 23 | 24 | public string Developer { get; set; } 25 | 26 | public DateTime? Date { get; set; } 27 | 28 | public Status Status { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Actions/IActionDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | using Surging.Hero.Auth.IApplication.Action.Dtos; 5 | 6 | namespace Surging.Hero.Auth.Domain.Permissions.Actions 7 | { 8 | public interface IActionDomainService : ITransientDependency 9 | { 10 | Task InitActions(ICollection actions); 11 | Task> GetOperationOutputActions(long id); 12 | Task> GetServiceHosts(QueryServiceHostInput query); 13 | Task> GetAppServices(QueryAppServiceInput query); 14 | Task> GetActionServices(QueryActionInput query); 15 | Task> GetServicesTree(); 16 | 17 | Task> GetActionsByServiceId(string serviceId); 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/CheckPermissionResult.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Shared; 2 | 3 | namespace Surging.Hero.Auth.Domain.Permissions 4 | { 5 | public class CheckPermissionResult 6 | { 7 | 8 | public CheckPermissionResult(DataPermissionType dataPermissionType) 9 | { 10 | DataPermissionType = dataPermissionType; 11 | } 12 | 13 | 14 | public DataPermissionType DataPermissionType { get; } 15 | 16 | private long[] _dataPermissionOrgIds; 17 | public long[] DataPermissionOrgIds 18 | { 19 | get 20 | { 21 | if (DataPermissionType == DataPermissionType.AllOrg) 22 | { 23 | return null; 24 | } 25 | 26 | return _dataPermissionOrgIds; 27 | } 28 | set 29 | { 30 | _dataPermissionOrgIds = value; 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/ClassMapper/ActionClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Permissions.Actions; 2 | using Surging.Hero.Common.ClassMapper; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.ClassMapper 5 | { 6 | public class ActionClassMapper : HeroClassMapper 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/ClassMapper/MenuClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Permissions.Menus; 2 | using Surging.Hero.Common.ClassMapper; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.ClassMapper 5 | { 6 | public class MenuClassMapper : HeroClassMapper 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/ClassMapper/OperationActionRelationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Permissions.Operations; 2 | using Surging.Hero.Common.ClassMapper; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.ClassMapper 5 | { 6 | public class OperationActionRelationClassMapper : HeroClassMapper 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/ClassMapper/OperationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Permissions.Operations; 2 | using Surging.Hero.Common.ClassMapper; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.ClassMapper 5 | { 6 | public class OperationClassMapper : HeroClassMapper 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/ClassMapper/PermissionClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Permissions.ClassMapper 4 | { 5 | internal class PermissionClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/IPermissionDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | 5 | namespace Surging.Hero.Auth.Domain.Permissions 6 | { 7 | public interface IPermissionDomainService : ITransientDependency 8 | { 9 | Task> Check(long userId, string serviceId); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Menus/IMenuDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | using Surging.Hero.Auth.Domain.Shared.Permissions; 5 | using Surging.Hero.Auth.IApplication.Permission.Dtos; 6 | 7 | namespace Surging.Hero.Auth.Domain.Permissions.Menus 8 | { 9 | public interface IMenuDomainService : ITransientDependency 10 | { 11 | Task Create(CreateMenuInput input); 12 | Task Update(UpdateMenuInput input); 13 | Task Delete(long permissionId); 14 | 15 | Task> GetAll(); 16 | Task> GetTree(); 17 | 18 | Task> GetParents(long menuId, bool isIncludeSelf = true); 19 | 20 | Task> GetParentsByPermissionId(long permissionId, PermissionMold mold, 21 | bool isIncludeSelf = true); 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Menus/Menu.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Auth.Domain.Shared.Menus; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.Menus 5 | { 6 | public class Menu : FullAuditedEntity 7 | { 8 | public long PermissionId { get; set; } 9 | 10 | public long ParentId { get; set; } 11 | 12 | public string Code { get; set; } 13 | 14 | public int Level { get; set; } 15 | 16 | public string Name { get; set; } 17 | 18 | public string Title { get; set; } 19 | 20 | public string Path { get; set; } 21 | 22 | public MenuMold Mold { get; set; } 23 | 24 | public string Icon { get; set; } 25 | 26 | public bool AlwaysShow { get; set; } = true; 27 | 28 | public string Component { get; set; } 29 | 30 | public int Sort { get; set; } 31 | 32 | public string Memo { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Operations/IOperationDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | using Surging.Hero.Auth.IApplication.Permission.Dtos; 5 | 6 | namespace Surging.Hero.Auth.Domain.Permissions.Operations 7 | { 8 | public interface IOperationDomainService : ITransientDependency 9 | { 10 | Task Create(CreateOperationInput input); 11 | Task Update(UpdateOperationInput input); 12 | Task Delete(long permissionId); 13 | Task> GetAll(); 14 | Task CheckPermission(long operationId, string serviceId); 15 | Task> GetOperationsByServiceId(string serviceId); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Operations/Operation.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Auth.Domain.Shared.Operations; 3 | 4 | namespace Surging.Hero.Auth.Domain.Permissions.Operations 5 | { 6 | public class Operation : FullAuditedEntity 7 | { 8 | public long PermissionId { get; set; } 9 | 10 | public long MenuId { get; set; } 11 | 12 | public string Code { get; set; } 13 | 14 | public int Level { get; set; } 15 | 16 | public string Name { get; set; } 17 | 18 | public string Title { get; set; } 19 | 20 | public OperationMold Mold { get; set; } 21 | 22 | public string Memo { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Operations/OperationActionRelation.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.Permissions.Operations 4 | { 5 | public class OperationActionRelation : AuditedEntity 6 | { 7 | public long OperationId { get; set; } 8 | 9 | public long ActionId { get; set; } 10 | 11 | public string ServiceId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Permissions/Permission.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Auth.Domain.Shared.Permissions; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Domain.Permissions 6 | { 7 | public class Permission : FullAuditedEntity 8 | { 9 | public string Name { get; set; } 10 | 11 | public PermissionMold Mold { get; set; } 12 | 13 | public string Memo { get; set; } 14 | 15 | public Status Status { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/ClassMapper/RoleClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles.ClassMapper 4 | { 5 | public class RoleClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/ClassMapper/RoleDataPermissionOrgRelationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles.ClassMapper 4 | { 5 | public class RoleDataPermissionOrgRelationClassMapper : HeroClassMapper 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/ClassMapper/RoleOrganizationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles.ClassMapper 4 | { 5 | public class RoleOrganizationClassMapper: HeroClassMapper 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/ClassMapper/RolePermissionClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles.ClassMapper 4 | { 5 | public class RolePermissionClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/IRoleDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data; 3 | using System.Data.Common; 4 | using System.Threading.Tasks; 5 | using Surging.Cloud.CPlatform.Ioc; 6 | using Surging.Cloud.Domain.PagedAndSorted; 7 | using Surging.Hero.Auth.IApplication.Role.Dtos; 8 | 9 | namespace Surging.Hero.Auth.Domain.Roles 10 | { 11 | public interface IRoleDomainService : ITransientDependency 12 | { 13 | Task Create(CreateRoleInput input, long? tenantId = null); 14 | Task Create(CreateRoleInput input, DbConnection conn, DbTransaction trans, long? tenantId = null); 15 | Task Update(UpdateRoleInput input); 16 | Task UpdateStatus(UpdateRoleStatusInput input); 17 | Task RemoveRoleCheckPemissionCache(long roleId); 18 | Task> GetRolePermissions(long roleId); 19 | Task Delete(long roleid); 20 | Task CheckPermission(long roleId, string serviceId); 21 | Task Get(long id); 22 | Task> Search(QueryRoleInput query); 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/Role.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Auth.Domain.Shared; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Domain.Roles 6 | { 7 | public class Role : FullAuditedEntity, IMultiTenant 8 | { 9 | public string Name { get; set; } 10 | 11 | public string Identification { get; set; } 12 | 13 | public string Memo { get; set; } 14 | 15 | public bool IsAllOrg { get; set; } 16 | 17 | public Status Status { get; set; } 18 | 19 | public DataPermissionType DataPermissionType { get; set; } 20 | 21 | public long? TenantId { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/RoleDataPermissionOrgRelation.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles 4 | { 5 | public class RoleDataPermissionOrgRelation : AuditedEntity, IMultiTenant 6 | { 7 | public long RoleId { get; set; } 8 | 9 | public long OrgId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/RoleOrganization.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles 4 | { 5 | public class RoleOrganization : AuditedEntity, IMultiTenant 6 | { 7 | public long RoleId { get; set; } 8 | 9 | public long OrgId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Roles/RolePermission.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.Roles 4 | { 5 | public class RolePermission : AuditedEntity, IMultiTenant 6 | { 7 | public long RoleId { get; set; } 8 | public long PermissionId { get; set; } 9 | 10 | public long? TenantId { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Surging.Hero.Auth.Domain.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/ClassMapper/TenantClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Tenants.ClassMapper 4 | { 5 | public class TenantClassMapper : HeroClassMapper 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/ITenantConfigProvider.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.CPlatform.Ioc; 2 | 3 | namespace Surging.Hero.Auth.Domain.Tenants 4 | { 5 | public interface ITenantConfigProvider: ITransientDependency 6 | { 7 | TenantConfig Get(); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/ITenantDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | using Surging.Cloud.Domain.PagedAndSorted; 5 | using Surging.Hero.Auth.IApplication.Tenant.Dtos; 6 | 7 | namespace Surging.Hero.Auth.Domain.Tenants 8 | { 9 | public interface ITenantDomainService : ITransientDependency 10 | { 11 | Task Create(CreateTenantInput input); 12 | 13 | Task Update(UpdateTenantInput input); 14 | 15 | Task Delete(long id); 16 | Task> Search(QueryTenantInput query); 17 | Task Status(UpdateTenantStatusInput input); 18 | Task> List(); 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/Tenant.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.Domain.Tenants 5 | { 6 | public class Tenant : FullAuditedEntity 7 | { 8 | public string Name { get; set; } 9 | 10 | public string Memo { get; set; } 11 | 12 | public Status Status { get; set; } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/TenantConfig.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.Tenants 2 | { 3 | public class TenantConfig 4 | { 5 | public string SuperUserAccount { get; set; } 6 | 7 | public string SuperUserPassword { get; set; } 8 | 9 | public string ChineseName { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Tenants/TenantConfigProvider.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | using Surging.Cloud.CPlatform; 3 | using Surging.Cloud.CPlatform.Exceptions; 4 | 5 | namespace Surging.Hero.Auth.Domain.Tenants 6 | { 7 | public class TenantConfigProvider : ITenantConfigProvider 8 | { 9 | public TenantConfig Get() 10 | { 11 | if (AppConfig.Configuration == null) 12 | { 13 | throw new BusinessException("获取配置文件失败"); 14 | } 15 | 16 | var tenantConfigSection = AppConfig.GetSection("Tenant"); 17 | if (tenantConfigSection == null) 18 | { 19 | throw new BusinessException("不存在默认租户账号配置项节点"); 20 | } 21 | return tenantConfigSection.Get(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserGroupClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 4 | { 5 | public class UserGroupClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserGroupDataPermissionOrgRelationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 4 | { 5 | public class UserGroupDataPermissionOrgRelationClassMapper : HeroClassMapper 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserGroupOrganizationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using DapperExtensions.Mapper; 2 | using Surging.Hero.Common.ClassMapper; 3 | 4 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 5 | { 6 | public class UserGroupOrganizationClassMapper : HeroClassMapper 7 | { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserGroupPermissionClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 4 | { 5 | public class UserGroupPermissionClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserGroupRoleClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 4 | { 5 | public class UserGroupRoleClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/ClassMapper/UserUserGroupRelationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups.ClassMapper 4 | { 5 | public class UserUserGroupRelationClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroup.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Auth.Domain.Shared; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.Domain.UserGroups 6 | { 7 | public class UserGroup : FullAuditedEntity, IMultiTenant 8 | { 9 | public string Name { get; set; } 10 | 11 | public string Identification { get; set; } 12 | 13 | public string Memo { get; set; } 14 | 15 | public bool IsAllOrg { get; set; } 16 | 17 | public Status Status { get; set; } 18 | 19 | public DataPermissionType? DataPermissionType { get; set; } 20 | 21 | public long? TenantId { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroupDataPermissionOrgRelation.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups 4 | { 5 | public class UserGroupDataPermissionOrgRelation : AuditedEntity, IMultiTenant 6 | { 7 | public long UserGroupId { get; set; } 8 | 9 | public long OrgId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroupOrganization.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups 4 | { 5 | public class UserGroupOrganization : AuditedEntity, IMultiTenant 6 | { 7 | public long UserGroupId { get; set; } 8 | 9 | public long OrgId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroupPermission.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups 4 | { 5 | public class UserGroupPermission : AuditedEntity, IMultiTenant 6 | { 7 | public long UserGroupId { get; set; } 8 | 9 | public long PermissionId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroupPermissionModel.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.Domain.UserGroups 2 | { 3 | public class UserGroupPermissionModel 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Title { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public long OperationId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserGroupRole.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups 4 | { 5 | public class UserGroupRole : AuditedEntity, IMultiTenant 6 | { 7 | public long RoleId { get; set; } 8 | 9 | public long UserGroupId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/UserGroups/UserUserGroupRelation.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.UserGroups 4 | { 5 | public class UserUserGroupRelation : AuditedEntity, IMultiTenant 6 | { 7 | public long UserId { get; set; } 8 | 9 | public long UserGroupId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/ClassMapper/UserInfoClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Users.ClassMapper 4 | { 5 | public class UserInfoClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/ClassMapper/UserRoleClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Auth.Domain.Users.ClassMapper 4 | { 5 | internal class UserRoleClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/ILoginManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | using Surging.Hero.Auth.IApplication.Authorization.Dtos; 5 | 6 | namespace Surging.Hero.Auth.Domain.Users 7 | { 8 | public interface ILoginManager : ITransientDependency 9 | { 10 | Task> Login(LoginInput input); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/IPasswordHelper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.CPlatform.Ioc; 2 | 3 | namespace Surging.Hero.Auth.Domain.Users 4 | { 5 | public interface IPasswordHelper : ITransientDependency 6 | { 7 | string EncryptPassword(string userName, string plainPassword); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/PasswordHelper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.Utils; 2 | 3 | namespace Surging.Hero.Auth.Domain.Users 4 | { 5 | public class PasswordHelper : IPasswordHelper 6 | { 7 | public string EncryptPassword(string userName, string plainPassword) 8 | { 9 | return EncryptHelper.Md5(EncryptHelper.Md5(userName + plainPassword)); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.Domain/Users/UserRole.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Auth.Domain.Users 4 | { 5 | public class UserRole : AuditedEntity, IMultiTenant 6 | { 7 | public long UserId { get; set; } 8 | 9 | public long RoleId { get; set; } 10 | 11 | public long? TenantId { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/ActionDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 4 | { 5 | public abstract class ActionDtoBase 6 | { 7 | public string ServiceId { get; set; } 8 | public string ServiceHost { get; set; } 9 | public string Application { get; set; } 10 | public string Name { get; set; } 11 | 12 | public string WebApi { get; set; } 13 | 14 | public string Method { get; set; } 15 | 16 | public bool DisableNetwork { get; set; } 17 | 18 | public bool EnableAuthorization { get; set; } 19 | 20 | public bool AllowPermission { get; set; } 21 | public string Developer { get; set; } 22 | 23 | public DateTime? Date { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/GetActionOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class GetActionOutput : ActionDtoBase 4 | { 5 | public long Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/GetAppServiceOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class GetAppServiceOutput 4 | { 5 | /// 6 | /// 主机名称 7 | /// 8 | public string ServiceHost { get; set; } 9 | 10 | /// 11 | /// 应用服务名称 12 | /// 13 | public string AppService { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/GetServiceHostOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class GetServiceHostOutput 4 | { 5 | public string ServiceHost { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/GetTreeActionOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 4 | { 5 | public class GetTreeActionOutput 6 | { 7 | public long Value { get; set; } 8 | 9 | public string Label { get; set; } 10 | 11 | public IEnumerable Children { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/InitActionActionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class InitActionActionInput : ActionDtoBase 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/QueryActionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class QueryActionInput 4 | { 5 | /// 6 | /// 主机名称 7 | /// 8 | public string ServiceHost { get; set; } 9 | 10 | /// 11 | /// 应用服务名称 12 | /// 13 | public string AppService { get; set; } 14 | 15 | /// 16 | /// 应用服务名称 17 | /// 18 | public string Service { get; set; } 19 | 20 | /// 21 | /// 服务条目Ids 22 | /// 23 | public long[] Ids { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/QueryAppServiceInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 4 | { 5 | public class QueryAppServiceInput 6 | { 7 | /// 8 | /// 主机名称 9 | /// 10 | [Required(ErrorMessage = "主机名称不允许为空")] 11 | public string ServiceHost { get; set; } 12 | 13 | /// 14 | /// 应用服务名称 15 | /// 16 | public string AppService { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Action/Dtos/QueryServiceHostInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Action.Dtos 2 | { 3 | public class QueryServiceHostInput 4 | { 5 | /// 6 | /// 主机名称 7 | /// 8 | public string ServiceHost { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/GetUserMenuOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 2 | { 3 | public class GetUserMenuOutput 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Path { get; set; } 10 | 11 | public bool AlwaysShow { get; set; } 12 | 13 | public string Title { get; set; } 14 | 15 | public string Code { get; set; } 16 | 17 | public string Icon { get; set; } 18 | 19 | public int Level { get; set; } 20 | 21 | public string FullName { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/GetUserMenuTreeOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Cloud.Domain.Trees; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 5 | { 6 | public class GetUserMenuTreeOutput : ITree 7 | { 8 | public string Path { get; set; } 9 | 10 | public bool AlwaysShow { get; set; } 11 | 12 | public string Title { get; set; } 13 | 14 | public string Icon { get; set; } 15 | 16 | public int Level { get; set; } 17 | public long Id { get; set; } 18 | 19 | public string Name { get; set; } 20 | 21 | public string Code { get; set; } 22 | 23 | public long ParentId { get; set; } 24 | public string FullName { get; set; } 25 | public IEnumerable> Children { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/GetUserOperationOutput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Shared.Operations; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 4 | { 5 | public class GetUserOperationOutput 6 | { 7 | public long PermissionId { get; set; } 8 | 9 | public long MenuId { get; set; } 10 | 11 | public string Icon { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public string Title { get; set; } 16 | 17 | public OperationMold Mold { get; set; } 18 | 19 | public string Memo { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/LoginInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 5 | { 6 | public class LoginInput 7 | { 8 | [Required(ErrorMessage = "用户名不允许为空")] 9 | [RegularExpression(RegExpConstants.UserName, ErrorMessage = "用户名格式不正确")] 10 | public string UserName { get; set; } 11 | 12 | [RegularExpression(RegExpConstants.Password, ErrorMessage = "密码格式不正确")] 13 | public string Password { get; set; } 14 | 15 | [Required(ErrorMessage = "验证码不允许为空")] 16 | public string Captcha { get; set; } 17 | 18 | [Required(ErrorMessage = "表单标识不允许为空")] 19 | public string Uuid { get; set; } 20 | 21 | public long TenantId { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/LoginResult.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 4 | { 5 | public class LoginResult 6 | { 7 | public LoginResultType ResultType { get; set; } 8 | 9 | public string ErrorMessage { get; set; } 10 | 11 | public IDictionary PayLoad { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Authorization/Dtos/LoginResultType.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Authorization.Dtos 2 | { 3 | public enum LoginResultType 4 | { 5 | Success = 0, 6 | 7 | Fail = 1, 8 | 9 | Error = 2 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/CacheKeyConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication 2 | { 3 | public static class CacheKeyConstant 4 | { 5 | public const string GetUserNormInfoById = "GetUserNormInfo:{0}"; 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/CreateMenuInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class CreateMenuInput : MenuDtoBase 4 | { 5 | public long ParentPermissionId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/CreateMenuOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class CreateMenuOutput 4 | { 5 | /// 6 | /// 菜单Id 7 | /// 8 | public long Id { get; set; } 9 | 10 | /// 11 | /// 权限Id 12 | /// 13 | public long PermissionId { get; set; } 14 | 15 | /// 16 | /// 提示信息 17 | /// 18 | public string Tips { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/CreateOperationInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class CreateOperationInput : OperationDtoBase 4 | { 5 | public long PermissionId { get; set; } 6 | public long[] ActionIds { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/CreateOperationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class CreateOperationOutput 4 | { 5 | /// 6 | /// 操作Id 7 | /// 8 | public long Id { get; set; } 9 | 10 | /// 11 | /// 权限Id 12 | /// 13 | public long PermissionId { get; set; } 14 | 15 | /// 16 | /// 提示信息 17 | /// 18 | public string Tips { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/DeletePermissionInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Auth.Domain.Shared.Permissions; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 4 | { 5 | public class DeletePermissionInput 6 | { 7 | public long PermissionId { get; set; } 8 | 9 | public PermissionMold Mold { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/GetMenuOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class GetMenuOutput : MenuDtoBase 4 | { 5 | public long Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/GetOperationOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 4 | { 5 | public class GetOperationOutput : OperationDtoBase 6 | { 7 | public long Id { get; set; } 8 | 9 | public IEnumerable ActionIds { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/GetPermissionTreeOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Hero.Auth.Domain.Shared.Permissions; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 5 | { 6 | public class GetPermissionTreeOutput 7 | { 8 | public GetPermissionTreeOutput() 9 | { 10 | Children = new List(); 11 | } 12 | 13 | public long Id { get; set; } 14 | 15 | public long PermissionId { get; set; } 16 | 17 | public string Code { get; set; } 18 | public string Name { get; set; } 19 | public string Title { get; set; } 20 | 21 | public long ParentPermissionId { get; set; } 22 | public string FullName { get; set; } 23 | public IEnumerable Children { get; set; } 24 | 25 | public PermissionMold Mold { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/MenuDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 4 | { 5 | public abstract class MenuDtoBase 6 | { 7 | [Required(ErrorMessage = "菜单标识不允许为空")] 8 | [MaxLength(50, ErrorMessage = "菜单标识长度不允许超过50")] 9 | public string Name { get; set; } 10 | 11 | [Required(ErrorMessage = "操作名称不允许为空")] 12 | [MaxLength(50, ErrorMessage = "操作名称长度不允许超过50")] 13 | public string Title { get; set; } 14 | 15 | public string Path { get; set; } 16 | 17 | public string Icon { get; set; } 18 | 19 | //[Required(ErrorMessage = "菜单组件名称不允许空")] 20 | //[MaxLength(50, ErrorMessage = "菜单组件名称不允许超过50")] 21 | public string Component { get; set; } 22 | 23 | public int Sort { get; set; } 24 | 25 | public string Memo { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/OperationDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Auth.Domain.Shared.Operations; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 5 | { 6 | public abstract class OperationDtoBase 7 | { 8 | //public string Icon { get; set; } 9 | 10 | [Required(ErrorMessage = "操作标识不允许为空")] 11 | [MaxLength(50, ErrorMessage = "操作标识长度不允许超过50")] 12 | public string Name { get; set; } 13 | 14 | [Required(ErrorMessage = "操作名称不允许为空")] 15 | [MaxLength(50, ErrorMessage = "操作名称长度不允许超过50")] 16 | public string Title { get; set; } 17 | 18 | public OperationMold Mold { get; set; } 19 | 20 | public string Memo { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/UpdateMenuInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class UpdateMenuInput : MenuDtoBase 4 | { 5 | public long Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/UpdateMenuOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class UpdateMenuOutput 4 | { 5 | /// 6 | /// 菜单Id 7 | /// 8 | public long Id { get; set; } 9 | 10 | /// 11 | /// 权限Id 12 | /// 13 | public long PermissionId { get; set; } 14 | 15 | /// 16 | /// 提示信息 17 | /// 18 | public string Tips { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/UpdateOperationInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class UpdateOperationInput : OperationDtoBase 4 | { 5 | public long Id { get; set; } 6 | public long[] ActionIds { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Permission/Dtos/UpdateOperationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Permission.Dtos 2 | { 3 | public class UpdateOperationOutput 4 | { 5 | /// 6 | /// 操作Id 7 | /// 8 | public long Id { get; set; } 9 | 10 | /// 11 | /// 权限Id 12 | /// 13 | public long PermissionId { get; set; } 14 | 15 | /// 16 | /// 提示信息 17 | /// 18 | public string Tips { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/CreateRoleInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 4 | { 5 | public class CreateRoleInput : RoleDtoBase 6 | { 7 | /// 8 | /// 选定的权限Ids 9 | /// 10 | public long[] PermissionIds { get; set; } 11 | 12 | /// 13 | /// 用户自定义数据权限指定的部门 14 | /// 15 | public long[] DataPermissionOrgIds { get; set; } 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/GetDisplayOrganizationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 2 | { 3 | public class GetDisplayOrganizationOutput 4 | { 5 | public long OrgId { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/GetDisplayRoleOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 2 | { 3 | public class GetDisplayRoleOutput 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/QueryRoleInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.CPlatform.Utilities; 2 | using Surging.Cloud.Domain.PagedAndSorted; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 6 | { 7 | public class QueryRoleInput : PagedAndSingleSortedResultRequest 8 | { 9 | 10 | public string SearchKey { get; set; } 11 | 12 | public long[] OrgIds { get; set; } 13 | 14 | public Status? Status { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/SetRolePermissionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 2 | { 3 | public class SetRolePermissionInput 4 | { 5 | public long RoleId { get; set; } 6 | 7 | public long[] PermissionIds { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/UpdateRoleInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 5 | { 6 | public class UpdateRoleInput : RoleDtoBase 7 | { 8 | /// 9 | /// 选定的角色Id 10 | /// 11 | public long Id { get; set; } 12 | 13 | /// 14 | /// 选定的权限Ids 15 | /// 16 | public long[] PermissionIds { get; set; } 17 | 18 | public long[] DataPermissionOrgIds { get; set; } 19 | 20 | 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Role/Dtos/UpdateRoleStatusInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Role.Dtos 4 | { 5 | public class UpdateRoleStatusInput 6 | { 7 | public long Id { get; set; } 8 | 9 | public Status Status { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Surging.Hero.Auth.IApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/CreateTenantInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 5 | { 6 | public class CreateTenantInput : TenantDtoBase 7 | { 8 | /// 9 | /// 租户对应的组织机构标识 10 | /// 11 | [Required(ErrorMessage = "组织机构标识不允许为空")] 12 | [MaxLength(50, ErrorMessage = "组织机构唯一标识长度不允许超过50")] 13 | [RegularExpression(RegExpConstants.NormalIdentificationCode, ErrorMessage = "组织机构标识不正确,只能是字母和数字组合")] 14 | public string Identification { get; set; } 15 | 16 | /// 17 | /// 是否生成管理员账号和角色 18 | /// 19 | public bool CreateSuper { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/GetTenantOutput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 4 | { 5 | public class GetTenantOutput : TenantDtoBase 6 | { 7 | /// 8 | /// 租户Id 9 | /// 10 | public long Id { get; set; } 11 | 12 | /// 13 | /// 租户状态 14 | /// 15 | public Status Status { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/GetTenantPageOutput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Surging.Hero.Common.FullAuditDtos; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 5 | { 6 | public class GetTenantPageOutput : GetTenantOutput, IAuditedDto 7 | { 8 | public DateTime CreationTime { get; set; } 9 | 10 | public long? CreatorUserId { get; set; } 11 | 12 | public DateTime? LastModificationTime { get; set; } 13 | 14 | public long? LastModifierUserId { get; set; } 15 | public string CreatorUserName { get; set; } 16 | public string LastModificationUserName { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/QueryTenantInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.PagedAndSorted; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 4 | { 5 | public class QueryTenantInput : PagedAndSingleSortedResultRequest 6 | { 7 | /// 8 | /// 租户名称 9 | /// 10 | public string Name { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/TenantDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 5 | { 6 | public abstract class TenantDtoBase 7 | { 8 | /// 9 | /// 租户名称 10 | /// 11 | [Required(ErrorMessage = "租户名称不允许为空")] 12 | [MaxLength(50,ErrorMessage = "租户名称不允许超过50个字")] 13 | public string Name { get; set; } 14 | 15 | /// 16 | /// 租户备注 17 | /// 18 | public string Memo { get; set; } 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/UpdateTenantInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 2 | { 3 | public class UpdateTenantInput : TenantDtoBase 4 | { 5 | /// 6 | /// 租户Id 7 | /// 8 | public long Id { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/Tenant/Dtos/UpdateTenantStatusInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common; 2 | 3 | namespace Surging.Hero.Auth.IApplication.Tenant.Dtos 4 | { 5 | public class UpdateTenantStatusInput 6 | { 7 | /// 8 | /// 租户Id 9 | /// 10 | public long Id { get; set; } 11 | 12 | /// 13 | /// 租户状态 14 | /// 15 | public Status Status { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/CreateUserInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.User.Dtos 5 | { 6 | public class CreateUserInput : UserDtoBase 7 | { 8 | public CreateUserInput() 9 | { 10 | RoleIds = new long[0]; 11 | UserGroupIds = new long[0]; 12 | } 13 | 14 | [Required(ErrorMessage = "部门信息不允许为空")] 15 | public long? OrgId { get; set; } 16 | 17 | public long? PositionId { get; set; } 18 | 19 | [Required(ErrorMessage = "用户名不允许为空")] 20 | [RegularExpression(RegExpConstants.UserName, ErrorMessage = "用户名格式不正确")] 21 | public string UserName { get; set; } 22 | 23 | [Required(ErrorMessage = "密码不允许为空")] 24 | [RegularExpression(RegExpConstants.Password, ErrorMessage = "密码格式不正确")] 25 | public string Password { get; set; } 26 | 27 | /// 28 | /// 分配的角色 29 | /// 30 | public long[] RoleIds { get; set; } 31 | 32 | /// 33 | /// 分配的用户组 34 | /// 35 | public long[] UserGroupIds { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/GetUserBasicOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.User.Dtos 2 | { 3 | public class GetUserBasicOutput : UserDtoBase 4 | { 5 | public long Id { get; set; } 6 | 7 | public long? OrgId { get; set; } 8 | 9 | public string DeptName { get; set; } 10 | 11 | public long? PositionId { get; set; } 12 | 13 | public string PositionName { get; set; } 14 | 15 | public string UserName { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/GetUserRoleOutput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common; 2 | 3 | namespace Surging.Hero.Auth.IApplication.User.Dtos 4 | { 5 | public class GetUserRoleOutput 6 | { 7 | public long RoleId { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public CheckStatus Checked { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/QueryUserInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Cloud.Domain.PagedAndSorted; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.IApplication.User.Dtos 6 | { 7 | public class QueryUserInput : PagedAndSingleSortedResultRequest 8 | { 9 | public long? OrgId { get; set; } 10 | 11 | public long? UserGroupId { get; set; } 12 | 13 | public long? PositionId { get; set; } 14 | 15 | public Status? Status { get; set; } 16 | 17 | public string SearchKey { get; set; } 18 | 19 | public UserIdDto UserIds { get; set; } 20 | } 21 | 22 | 23 | public class UserIdDto 24 | { 25 | public UserIdDto() 26 | { 27 | Ids = new List(); 28 | } 29 | 30 | public bool Include { get; set; } 31 | public IEnumerable Ids { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/QueryUserRoleInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.User.Dtos 2 | { 3 | public class QueryUserRoleInput 4 | { 5 | public long? UserId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/ResetPasswordInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.User.Dtos 5 | { 6 | public class ResetPasswordInput 7 | { 8 | public long Id { get; set; } 9 | 10 | [RegularExpression(RegExpConstants.Password, ErrorMessage = "密码格式不正确")] 11 | public string NewPassword { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/UpdateUserInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.System.Intercept; 2 | 3 | namespace Surging.Hero.Auth.IApplication.User.Dtos 4 | { 5 | public class UpdateUserInput : UserDtoBase 6 | { 7 | [CacheKey(1)] public long Id { get; set; } 8 | 9 | public long? OrgId { get; set; } 10 | 11 | public long? PositionId { get; set; } 12 | 13 | /// 14 | /// 分配的角色 15 | /// 16 | public long[] RoleIds { get; set; } 17 | 18 | /// 19 | /// 分配的用户组 20 | /// 21 | public long[] UserGroupIds { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/UpdateUserStatusInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.System.Intercept; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Auth.IApplication.User.Dtos 5 | { 6 | public class UpdateUserStatusInput 7 | { 8 | [CacheKey(1)] public long Id { get; set; } 9 | 10 | public Status Status { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/User/Dtos/UserDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using Surging.Hero.Auth.Domain.Shared.Users; 4 | using Surging.Hero.Common; 5 | 6 | namespace Surging.Hero.Auth.IApplication.User.Dtos 7 | { 8 | public abstract class UserDtoBase 9 | { 10 | [Required(ErrorMessage = "员工名称不允许为空")] public string ChineseName { get; set; } 11 | 12 | [EmailAddress(ErrorMessage = "电子邮箱格式不正确")] 13 | public string Email { get; set; } 14 | 15 | [RegularExpression(RegExpConstants.Phone, ErrorMessage = "手机号码格式不正确")] 16 | public string Phone { get; set; } 17 | 18 | [Required(ErrorMessage = "性别不允许为空")] public Gender? Gender { get; set; } 19 | 20 | public DateTime? Birth { get; set; } 21 | 22 | public string NativePlace { get; set; } 23 | 24 | public string Address { get; set; } 25 | 26 | public string Folk { get; set; } 27 | 28 | public PoliticalStatus? PoliticalStatus { get; set; } 29 | 30 | public string GraduateInstitutions { get; set; } 31 | 32 | public string Education { get; set; } 33 | 34 | public string Major { get; set; } 35 | 36 | public string Resume { get; set; } 37 | 38 | public string Memo { get; set; } 39 | 40 | public Status Status { get; set; } 41 | } 42 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/AllocationUserIdsInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class AllocationUserIdsInput 4 | { 5 | public long UserGroupId { get; set; } 6 | public long[] UserIds { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/CreateUserGroupInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 4 | { 5 | public class CreateUserGroupInput : UserGroupDtoBase 6 | { 7 | public long[] RoleIds { get; set; } 8 | 9 | public long[] PermissionIds { get; set; } 10 | 11 | public long[] DataPermissionOrgIds { get; set; } 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/DeleteUserGroupUserInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class DeleteUserGroupUserInput 4 | { 5 | public long UserGroupId { get; set; } 6 | 7 | public long UserId { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetDisplayDataPermissionOrgOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class GetDisplayDataPermissionOrgOutput 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetDisplayPermissionOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class GetDisplayPermissionOutput 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Title { get; set; } 8 | 9 | public string Name { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetDisplayUserGroupOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class GetDisplayUserGroupOutput 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetGroupUserOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 2 | { 3 | public class GetGroupUserOutput 4 | { 5 | public string Id { get; set; } 6 | 7 | public string UserName { get; set; } 8 | 9 | public string ChineseName { get; set; } 10 | 11 | public string DeptName { get; set; } 12 | 13 | public string PositionName { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetUserEditGroupOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 4 | { 5 | public class GetUserEditGroupOutput : UserGroupDtoBase 6 | { 7 | public long Id { get; set; } 8 | 9 | public long[] RoleIds { get; set; } 10 | 11 | public long[] PermissionIds { get; set; } 12 | 13 | public long[] DataPermissionOrgIds { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/GetUserGroupTreeOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Cloud.Domain.Trees; 3 | 4 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 5 | { 6 | public class GetUserGroupTreeOutput : ITree 7 | { 8 | public long Id { get; set; } 9 | public string Code { get; set; } 10 | public string Name { get; set; } 11 | public long ParentId { get; set; } 12 | public string FullName { get; set; } 13 | public IEnumerable> Children { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/QueryUserGroupInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.CPlatform.Utilities; 2 | using Surging.Cloud.Domain.PagedAndSorted; 3 | using Surging.Hero.Common; 4 | 5 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 6 | { 7 | public class QueryUserGroupInput : PagedAndSingleSortedResultRequest 8 | { 9 | 10 | public string SearchKey { get; set; } 11 | 12 | public long? OrgId { get; set; } 13 | 14 | public Status? Status { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/QueryUserGroupUserInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.PagedAndSorted; 2 | 3 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 4 | { 5 | public class QueryUserGroupUserInput : PagedAndSingleSortedResultRequest 6 | { 7 | public long UserGroupId { get; set; } 8 | 9 | public long? OrgId { get; set; } 10 | 11 | public long? PositionId { get; set; } 12 | 13 | public string SearchKey { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/UpdateUserGroupInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 4 | { 5 | public class UpdateUserGroupInput : UserGroupDtoBase 6 | { 7 | public long Id { get; set; } 8 | 9 | public long[] RoleIds { get; set; } 10 | 11 | public long[] PermissionIds { get; set; } 12 | 13 | public long[] DataPermissionOrgIds { get; set; } 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.Auth.IApplication/UserGroup/Dtos/UpdateUserGroupStatusInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common; 2 | 3 | namespace Surging.Hero.Auth.IApplication.UserGroup.Dtos 4 | { 5 | public class UpdateUserGroupStatusInput 6 | { 7 | public long Id { get; set; } 8 | 9 | public Status Status { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.AuthHost/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 2 | WORKDIR /app 3 | ARG rpc_port=100 4 | ARG http_port=8080 5 | ARG ws_port=96 6 | ENV TZ=Asia/Shanghai 7 | ENV LANG C.UTF-8 8 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 9 | EXPOSE ${rpc_port} ${http_port} ${ws_port} 10 | 11 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 12 | WORKDIR /src 13 | ARG sln_name 14 | COPY . . 15 | RUN dotnet restore ${sln_name} && \ 16 | dotnet build --no-restore -c Release ${sln_name} 17 | 18 | FROM build AS publish 19 | ARG host_workdir 20 | WORKDIR ${host_workdir} 21 | RUN dotnet publish --no-restore -c Release -o /app 22 | 23 | FROM base AS final 24 | ARG host_name 25 | ENV host_name=${host_name} 26 | COPY --from=publish /app . 27 | ENTRYPOINT dotnet ${host_name} -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.AuthHost/Dockerfile.Rider.v1.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /src 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | COPY . . 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN dotnet restore ${sln_name} && \ 11 | dotnet build --no-restore ${sln_name} 12 | WORKDIR ${host_workdir} 13 | RUN dotnet publish --no-restore -o /app 14 | WORKDIR /app 15 | ENTRYPOINT ["dotnet", "Surging.Hero.AuthHost.dll"] -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.AuthHost/Dockerfile.Rider.v2.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /app 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | ARG publish_app_dir=${host_workdir}/bin/Debug/net5.0 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | COPY ${publish_app_dir} . 11 | ENTRYPOINT ["dotnet", "Surging.Hero.AuthHost.dll"] -------------------------------------------------------------------------------- /src/Services/Auth/Surging.Hero.AuthHost/Surging.Hero.AuthHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Application/Captcha/CaptchaAppService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.Caching; 3 | using Surging.Cloud.CPlatform.Cache; 4 | using Surging.Cloud.ProxyGenerator; 5 | using Surging.Hero.BasicData.IApplication.Captcha; 6 | using Surging.Hero.Common; 7 | using Surging.Hero.Common.Utils; 8 | 9 | namespace Surging.Hero.BasicData.Application.Captcha 10 | { 11 | public class CaptchaAppService : ProxyServiceBase, ICaptchaAppService 12 | { 13 | private readonly ICacheProvider _cacheProvider; 14 | private const int CaptchaLength = 5; 15 | 16 | public CaptchaAppService() 17 | { 18 | _cacheProvider = CacheContainer.GetService(HeroConstants.CacheProviderKey);; 19 | } 20 | 21 | public async Task GetCaptcha(string uuid) 22 | { 23 | var captchaCode = IdentifyCodeGenerator.Create(CaptchaLength, IdentifyCodeType.MixNumberLetter); 24 | await _cacheProvider.AddAsync(string.Format(HeroConstants.CacheKey.Captcha, uuid), captchaCode); 25 | return captchaCode; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Application/Surging.Hero.BasicData.Application.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Application/SystemConfig/SystemConfigProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.BasicData.IApplication.SystemConfig.Dtos; 3 | 4 | namespace Surging.Hero.BasicData.Application.SystemConfig 5 | { 6 | public class SystemConfigProfile : Profile 7 | { 8 | public SystemConfigProfile() 9 | { 10 | CreateMap(); 11 | CreateMap(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Application/Wordbook/WordbookProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.BasicData.Domain.Wordbooks; 3 | using Surging.Hero.BasicData.IApplication.Wordbook.Dtos; 4 | 5 | namespace Surging.Hero.BasicData.Application.Wordbook 6 | { 7 | public class WordbookProfile : Profile 8 | { 9 | public WordbookProfile() 10 | { 11 | CreateMap() 12 | .AfterMap((src, dest) => { dest.IsSysPreset = false; }); 13 | 14 | CreateMap(); 15 | CreateMap(); 16 | CreateMap() 17 | .ForMember(p => p.WordbookCode, opt => opt.Ignore()); 18 | 19 | CreateMap(); 20 | CreateMap(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain.Shared/Surging.Hero.BasicData.Domain.Shared.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain.Shared/SystemConfigs/NonPermissionOperationStyle.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.BasicData.Domain.Shared.SystemConfigs 4 | { 5 | public enum NonPermissionOperationStyle 6 | { 7 | /// 8 | /// 不显示操作按钮 9 | /// 10 | [Description("不显示")] 11 | Displayed, 12 | 13 | /// 14 | /// 操作按钮不可用 15 | /// 16 | [Description("不可用")] 17 | Disabled 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain.Shared/Wordbooks/SystemPresetWordbookCode.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.BasicData.Domain.Shared.Wordbooks 2 | { 3 | public static class SystemPresetWordbookCode 4 | { 5 | public static class Organization 6 | { 7 | public const string DeptType = "DeptType"; 8 | 9 | public const string PositionFunction = "PositionFunction"; 10 | 11 | public const string PositionLevel = "PositionLevel"; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain.Shared/Wordbooks/WordbookType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.BasicData.Domain.Shared.Wordbooks 4 | { 5 | public enum WordbookType 6 | { 7 | [Description("系统类")] System = 1, 8 | 9 | [Description("业务类")] Business 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Surging.Hero.BasicData.Domain.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/SystemConfigs/ClassMapper/SystemConfigClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.BasicData.Domain.SystemConfigs.ClassMapper 4 | { 5 | public class SystemConfigClassMapper : HeroClassMapper 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/SystemConfigs/ISystemConfigDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.CPlatform.Ioc; 3 | using Surging.Hero.BasicData.IApplication.SystemConfig.Dtos; 4 | 5 | namespace Surging.Hero.BasicData.Domain.SystemConfigs 6 | { 7 | public interface ISystemConfigDomainService : ITransientDependency 8 | { 9 | Task GetSystemConfig(); 10 | Task SetSystemConfig(SetSystemConfigInput input); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/SystemConfigs/SystemConfig.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.BasicData.Domain.Shared.SystemConfigs; 3 | 4 | namespace Surging.Hero.BasicData.Domain.SystemConfigs 5 | { 6 | public class SystemConfig : FullAuditedEntity, IMultiTenant 7 | { 8 | public string SysName { get; set; } 9 | 10 | public string DomainName { get; set; } 11 | 12 | public string Administrator { get; set; } 13 | 14 | public string Logo { get; set; } 15 | 16 | public string LogoPosition { get; set; } 17 | 18 | public string LogoSite { get; set; } 19 | 20 | public NonPermissionOperationStyle NonPermissionOperationStyle { get; set; } 21 | 22 | public long? TenantId { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Wordbooks/ClassMapper/WordbookClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.BasicData.Domain.Wordbooks.ClassMapper 4 | { 5 | internal class WordbookClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Wordbooks/ClassMapper/WordbookItemClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.BasicData.Domain.Wordbooks.ClassMapper 4 | { 5 | internal class WordbookItemClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Wordbooks/IWordbookDomainService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using Surging.Cloud.CPlatform.Ioc; 5 | using Surging.Cloud.Domain.PagedAndSorted; 6 | using Surging.Hero.BasicData.IApplication.Wordbook.Dtos; 7 | 8 | namespace Surging.Hero.BasicData.Domain.Wordbooks 9 | { 10 | public interface IWordbookDomainService : ITransientDependency 11 | { 12 | Task CreateWordbook(CreateWordbookInput input); 13 | Task UpdateWordbook(UpdateWordbookInput input); 14 | Task DeleteWordbook(long id); 15 | Task, int>> QueryWordbooks(QueryWordbookInput query); 16 | Task> GetWordbookItems(GetWordbookItemsInput input); 17 | Task GetWordbook(long wordbookId); 18 | Task CreateWordbookItem(CreateWordbookItemInput input); 19 | Task UpdateWordbookItem(UpdateWordbookItemInput input); 20 | Task DeleteWordbookItem(long id); 21 | Task GetWordbookItem(long id); 22 | Task CheckWordbookItem(CheckWordbookInput input); 23 | Task> GetWordbookItemsByCode(string code); 24 | Task GetWordbookItemByKey(string wordbookCode, string key); 25 | } 26 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Wordbooks/Wordbook.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.BasicData.Domain.Shared.Wordbooks; 3 | 4 | namespace Surging.Hero.BasicData.Domain.Wordbooks 5 | { 6 | public class Wordbook : FullAuditedEntity, IMultiTenant 7 | { 8 | public string Code { get; set; } 9 | 10 | public string Name { get; set; } 11 | 12 | public WordbookType Type { get; set; } 13 | 14 | public string Memo { get; set; } 15 | 16 | public bool IsSysPreset { get; set; } = false; 17 | 18 | public long? TenantId { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.Domain/Wordbooks/WordbookItem.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.BasicData.Domain.Wordbooks 4 | { 5 | public class WordbookItem : FullAuditedEntity, IMultiTenant 6 | { 7 | public long WordbookId { get; set; } 8 | 9 | public string Key { get; set; } 10 | 11 | public string Value { get; set; } 12 | 13 | public string Memo { get; set; } 14 | 15 | public int Sort { get; set; } 16 | 17 | public long? TenantId { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/CacheKeyConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.BasicData.IApplication 2 | { 3 | public static class CacheKeyConstant 4 | { 5 | public const string GetWordBookById = "GetWordBookBy_Id_{0}"; 6 | 7 | public const string GetWordBookByCode = "GetWordBookBy_Code_{0}"; 8 | 9 | public const string RemoveGetWordBook = "GetWordBookBy_*"; 10 | 11 | public const string GetWordBookItemsById = "GetWordBookItemsBy_Id_{0}"; 12 | 13 | public const string GetWordBookItemsByCode = "GetWordBookItemsBy_Code_{0}"; 14 | 15 | public const string RemoveGetWordBookItems = "GetWordBookItemBy_*"; 16 | 17 | public const string GetWordBookItemById = "GetWordBookItemBy_Id_{0}"; 18 | 19 | public const string GetWordBookItemByCode = "GetWordBookItemBy_Code_{0}"; 20 | 21 | public const string RemoveGetWordBookItem = "GetWordBookItemBy_*"; 22 | 23 | public const string GetWordBookItemByKey = "GetWordBookItemByKey_{0}_{1}"; 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Captcha/ICaptchaAppService.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using System.Threading.Tasks; 3 | using Nest; 4 | using Surging.Cloud.CPlatform.Ioc; 5 | using Surging.Cloud.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes; 6 | using Surging.Hero.Common; 7 | 8 | namespace Surging.Hero.BasicData.IApplication.Captcha 9 | { 10 | [ServiceBundle(HeroConstants.RouteTemplet)] 11 | public interface ICaptchaAppService : IServiceKey 12 | { 13 | /// 14 | /// 获取验证码参数 15 | /// 16 | /// 表单唯一id 17 | /// 18 | [Service(EnableAuthorization = false, DisableNetwork = true, Director = Developers.Liuhll,Name = "获取随机验证码", Date = "2020-12-31")] 19 | Task GetCaptcha(string uuid); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Surging.Hero.BasicData.IApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/SystemConfig/Dtos/GetSystemConfigOutput.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Surging.Hero.BasicData.IApplication.SystemConfig.Dtos 3 | { 4 | public class GetSystemConfigOutput : SystemConfigDtoBase 5 | { 6 | public string LogoSite { get; set; } 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/SystemConfig/Dtos/SetSystemConfigInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.BasicData.IApplication.SystemConfig.Dtos 2 | { 3 | public class SetSystemConfigInput : SystemConfigDtoBase 4 | { 5 | public string Logo { get; set; } 6 | 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/SystemConfig/Dtos/SystemConfigDtoBase.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.BasicData.Domain.Shared.SystemConfigs; 2 | 3 | namespace Surging.Hero.BasicData.IApplication.SystemConfig.Dtos 4 | { 5 | public abstract class SystemConfigDtoBase 6 | { 7 | public long Id { get; set; } 8 | 9 | public string SysName { get; set; } 10 | 11 | public string DomainName { get; set; } 12 | 13 | public string Administrator { get; set; } 14 | 15 | public NonPermissionOperationStyle NonPermissionOperationStyle { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/CheckWordbookInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 2 | { 3 | public class CheckWordbookInput 4 | { 5 | public string WordbookCode { get; set; } 6 | 7 | public string WordbookItemKey { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/CreateWordbookInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 5 | { 6 | public class CreateWordbookInput : WordbookDtoBase 7 | { 8 | [Required(ErrorMessage = "字典编码不允许为空")] 9 | [RegularExpression(RegExpConstants.WordbookCode, ErrorMessage = "字典类型编码格式不正确")] 10 | public string Code { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/CreateWordbookItemInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 4 | { 5 | public class CreateWordbookItemInput : WordbookItemDtoBase 6 | { 7 | public long WordbookId { get; set; } 8 | 9 | [Required(ErrorMessage = "字典项编码不允许为空")] 10 | [MaxLength(50, ErrorMessage = "字典项值长度不允许超过50")] 11 | public string Key { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/GetWordbookItemOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 2 | { 3 | public class GetWordbookItemOutput : WordbookItemDtoBase 4 | { 5 | public long Id { get; set; } 6 | 7 | public long WordbookId { get; set; } 8 | 9 | public string Key { get; set; } 10 | 11 | public string WordbookCode { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/GetWordbookItemsInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.PagedAndSorted; 2 | 3 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 4 | { 5 | public class GetWordbookItemsInput : PagedResultRequestDto 6 | { 7 | public long? WordbookId { get; set; } 8 | 9 | public string Code { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/GetWordbookOutput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.Extensions; 2 | 3 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 4 | { 5 | public class GetWordbookOutput : WordbookDtoBase 6 | { 7 | public long Id { get; set; } 8 | 9 | public string Code { get; set; } 10 | 11 | public bool IsSysPreset { get; set; } 12 | 13 | public string TypeDesc => Type.GetDescription(); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/QueryWordbookInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.PagedAndSorted; 2 | 3 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 4 | { 5 | public class QueryWordbookInput : PagedResultRequestDto 6 | { 7 | public string SearchKey { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/UpdateWordbookInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Cloud.System.Intercept; 3 | 4 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 5 | { 6 | public class UpdateWordbookInput : WordbookDtoBase 7 | { 8 | [CacheKey(1)] public long Id { get; set; } 9 | 10 | 11 | [Required(ErrorMessage = "字典类型标识不允许为空")] 12 | [MaxLength(50, ErrorMessage = "字典类型标识长度不允许超过50")] 13 | public string Code { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/UpdateWordbookItemInput.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Cloud.System.Intercept; 3 | 4 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 5 | { 6 | public class UpdateWordbookItemInput : WordbookItemDtoBase 7 | { 8 | [CacheKey(1)] public long Id { get; set; } 9 | 10 | /// 11 | /// 字典的key 12 | /// 13 | [Required(ErrorMessage = "字典项的key不允许为空")] 14 | [MaxLength(50, ErrorMessage = "字典项的值长度不允许超过50")] 15 | public string Key { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/WordbookDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.BasicData.Domain.Shared.Wordbooks; 3 | using Surging.Hero.Common.FullAuditDtos; 4 | 5 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 6 | { 7 | public abstract class WordbookDtoBase : AuditDto 8 | { 9 | [Required(ErrorMessage = "字典类型名称不允许为空")] 10 | [MaxLength(50, ErrorMessage = "字典类型名称长度不允许超过50")] 11 | public string Name { get; set; } 12 | 13 | public WordbookType Type { get; set; } 14 | 15 | [MaxLength(100, ErrorMessage = "字典类型备注长度不允许超过100")] 16 | public string Memo { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicData.IApplication/Wordbook/Dtos/WordbookItemDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common.FullAuditDtos; 3 | 4 | namespace Surging.Hero.BasicData.IApplication.Wordbook.Dtos 5 | { 6 | public abstract class WordbookItemDtoBase : AuditDto 7 | { 8 | [Required(ErrorMessage = "字典项值不允许为空")] 9 | [MaxLength(50, ErrorMessage = "字典项值长度不允许超过50")] 10 | public string Value { get; set; } 11 | 12 | public string Memo { get; set; } 13 | 14 | public int Sort { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicDataHost/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 2 | WORKDIR /app 3 | ARG rpc_port=100 4 | ARG http_port=8080 5 | ARG ws_port=96 6 | ENV TZ=Asia/Shanghai 7 | ENV LANG C.UTF-8 8 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 9 | EXPOSE ${rpc_port} ${http_port} ${ws_port} 10 | 11 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 12 | WORKDIR /src 13 | ARG sln_name 14 | COPY . . 15 | RUN dotnet restore ${sln_name} && \ 16 | dotnet build --no-restore -c Release ${sln_name} 17 | 18 | FROM build AS publish 19 | ARG host_workdir 20 | WORKDIR ${host_workdir} 21 | RUN dotnet publish --no-restore -c Release -o /app 22 | 23 | FROM base AS final 24 | ARG host_name 25 | ENV host_name=${host_name} 26 | COPY --from=publish /app . 27 | ENTRYPOINT dotnet ${host_name} -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicDataHost/Dockerfile.Rider.v1.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /src 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | COPY . . 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN dotnet restore ${sln_name} && \ 11 | dotnet build --no-restore ${sln_name} 12 | WORKDIR ${host_workdir} 13 | RUN dotnet publish --no-restore -o /app 14 | WORKDIR /app 15 | ENTRYPOINT ["dotnet", "Surging.Hero.BasicDataHost.dll"] -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicDataHost/Dockerfile.Rider.v2.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /app 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | ARG publish_app_dir=${host_workdir}/bin/Debug/net5.0 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | COPY ${publish_app_dir} . 11 | ENTRYPOINT ["dotnet", "Surging.Hero.BasicDataHost.dll"] -------------------------------------------------------------------------------- /src/Services/BasicData/Surging.Hero.BasicDataHost/Surging.Hero.BasicDataHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.Application/Captcha/CaptchaImageAppService.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.KestrelHttpServer; 4 | using Surging.Cloud.ProxyGenerator; 5 | using Surging.Hero.FileService.Domain.Captchas; 6 | using Surging.Hero.FileService.IApplication.Captcha; 7 | 8 | namespace Surging.Hero.FileService.Application.Captcha 9 | { 10 | public class CaptchaImageAppService : ProxyServiceBase, ICaptchaImageAppService 11 | { 12 | private readonly ICaptchaDomainService _captchaDomainService; 13 | 14 | public CaptchaImageAppService(ICaptchaDomainService captchaDomainService) 15 | { 16 | _captchaDomainService = captchaDomainService; 17 | } 18 | 19 | public async Task GetCaptcha(string uuid) 20 | { 21 | return await _captchaDomainService.GetCaptcha(uuid); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.Application/Surging.Hero.FileService.Application.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.Domain/Captchas/CaptchaDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.Dapper.Manager; 3 | using Surging.Cloud.KestrelHttpServer; 4 | using Surging.Hero.BasicData.IApplication.Captcha; 5 | 6 | namespace Surging.Hero.FileService.Domain.Captchas 7 | { 8 | public class CaptchaDomainService : ManagerBase, ICaptchaDomainService 9 | { 10 | public async Task GetCaptcha(string uuid) 11 | { 12 | var captchaAppServiceProxy = GetService(); 13 | var captchaCode = await captchaAppServiceProxy.GetCaptcha(uuid); 14 | var captchaBytes = Utils.CreateCaptcha(captchaCode); 15 | return new ImageResult(captchaBytes,"image/png"); 16 | 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.Domain/Captchas/ICaptchaDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.CPlatform.Ioc; 3 | using Surging.Cloud.KestrelHttpServer; 4 | 5 | namespace Surging.Hero.FileService.Domain.Captchas 6 | { 7 | public interface ICaptchaDomainService : ITransientDependency 8 | { 9 | Task GetCaptcha(string uuid); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.Domain/Surging.Hero.FileService.Domain.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.IApplication/Captcha/ICaptchaImageAppService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.CPlatform.Ioc; 3 | using Surging.Cloud.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes; 4 | using Surging.Cloud.KestrelHttpServer; 5 | using Surging.Hero.Common; 6 | 7 | namespace Surging.Hero.FileService.IApplication.Captcha 8 | { 9 | [ServiceBundle(HeroConstants.CaptachaRouteTemplet)] 10 | public interface ICaptchaImageAppService : IServiceKey 11 | { 12 | [HttpGet] 13 | [ServiceRoute("{uuid}")] 14 | [Service(EnableAuthorization = false, Director = Developers.Liuhll,Name = "获取随机验证码", Date = "2021-1-1")] 15 | Task GetCaptcha(string uuid); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileService.IApplication/Surging.Hero.FileService.IApplication.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileServiceHost/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 2 | WORKDIR /app 3 | ARG rpc_port=100 4 | ARG http_port=8080 5 | ARG ws_port=96 6 | ENV TZ=Asia/Shanghai 7 | ENV LANG C.UTF-8 8 | RUN apt-get update && apt-get install -y libfontconfig1 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | EXPOSE ${rpc_port} ${http_port} ${ws_port} 11 | 12 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 13 | WORKDIR /src 14 | ARG sln_name 15 | COPY . . 16 | RUN dotnet restore ${sln_name} && \ 17 | dotnet build --no-restore -c Release ${sln_name} 18 | 19 | FROM build AS publish 20 | ARG host_workdir 21 | WORKDIR ${host_workdir} 22 | RUN dotnet publish --no-restore -c Release -o /app 23 | 24 | FROM base AS final 25 | ARG host_name 26 | ENV host_name=${host_name} 27 | COPY --from=publish /app . 28 | ENTRYPOINT dotnet ${host_name} -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileServiceHost/Dockerfile.Rider.v1.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /src 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | COPY . . 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN apt-get update && apt-get install -y libfontconfig1 11 | RUN dotnet restore ${sln_name} && \ 12 | dotnet build --no-restore ${sln_name} 13 | WORKDIR ${host_workdir} 14 | RUN dotnet publish --no-restore -o /app 15 | WORKDIR /app 16 | ENTRYPOINT ["dotnet", "Surging.Hero.FileServiceHost.dll"] -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileServiceHost/Dockerfile.Rider.v2.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /app 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | ARG publish_app_dir=${host_workdir}/bin/Debug/net5.0 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN apt-get update && apt-get install -y libfontconfig1 11 | COPY ${publish_app_dir} . 12 | ENTRYPOINT ["dotnet", "Surging.Hero.FileServiceHost.dll"] -------------------------------------------------------------------------------- /src/Services/FileService/Surging.Hero.FileServiceHost/Surging.Hero.FileServiceHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | Exe 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Gateway/Surging.Hero.Gateway/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 2 | WORKDIR /app 3 | ARG rpc_port=100 4 | ARG http_port=8080 5 | ARG ws_port=96 6 | ENV TZ=Asia/Shanghai 7 | ENV LANG C.UTF-8 8 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 9 | EXPOSE ${rpc_port} ${http_port} ${ws_port} 10 | 11 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 12 | WORKDIR /src 13 | ARG sln_name 14 | COPY . . 15 | RUN dotnet restore ${sln_name} && \ 16 | dotnet build --no-restore -c Release ${sln_name} 17 | 18 | FROM build AS publish 19 | ARG host_workdir 20 | WORKDIR ${host_workdir} 21 | RUN dotnet publish --no-restore -c Release -o /app 22 | 23 | FROM base AS final 24 | ARG host_name 25 | ENV host_name=${host_name} 26 | COPY --from=publish /app . 27 | ENTRYPOINT dotnet ${host_name} -------------------------------------------------------------------------------- /src/Services/Gateway/Surging.Hero.Gateway/Dockerfile.Rider.v1.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /src 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | COPY . . 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN dotnet restore ${sln_name} && \ 11 | dotnet build --no-restore ${sln_name} 12 | WORKDIR ${host_workdir} 13 | RUN dotnet publish --no-restore -o /app 14 | WORKDIR /app 15 | ENTRYPOINT ["dotnet", "Surging.Hero.Gateway.dll"] -------------------------------------------------------------------------------- /src/Services/Gateway/Surging.Hero.Gateway/Dockerfile.Rider.v2.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /app 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | ARG publish_app_dir=${host_workdir}/bin/Debug/net5.0 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | COPY ${publish_app_dir} . 11 | ENTRYPOINT ["dotnet", "Surging.Hero.Gateway.dll"] -------------------------------------------------------------------------------- /src/Services/Gateway/Surging.Hero.Gateway/Surging.Hero.Gateway.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Application/Corporation/CorporationProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Organization.Domain.Shared.Organizations; 3 | using Surging.Hero.Organization.IApplication.Corporation.Dtos; 4 | 5 | namespace Surging.Hero.Organization.Application.Corporation 6 | { 7 | public class CorporationProfile : Profile 8 | { 9 | public CorporationProfile() 10 | { 11 | CreateMap(); 12 | CreateMap() 13 | .AfterMap((src, dest) => { dest.OrgType = OrganizationType.Corporation; }) 14 | .ForMember(p => p.Id, opt => opt.Ignore()); 15 | CreateMap(); 16 | CreateMap().ForMember(p => p.Id, opt => opt.Ignore()); 17 | 18 | // Todo 19 | CreateMap(); 20 | CreateMap().ForMember(p => p.Id, opt => opt.Ignore()); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Application/Department/DepartmentProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Organization.Domain.Shared.Organizations; 3 | using Surging.Hero.Organization.IApplication.Department.Dtos; 4 | 5 | namespace Surging.Hero.Organization.Application.Department 6 | { 7 | public class DepartmentProfile : Profile 8 | { 9 | public DepartmentProfile() 10 | { 11 | CreateMap(); 12 | 13 | CreateMap().AfterMap((src, dest) => 14 | { 15 | dest.OrgType = OrganizationType.Department; 16 | }).ForMember(p => p.Id, opt => opt.Ignore()); 17 | 18 | CreateMap(); 19 | CreateMap().ForMember(p => p.Id, opt => opt.Ignore()); 20 | 21 | CreateMap(); 22 | CreateMap().ForMember(p => p.Id, opt => opt.Ignore()); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Application/Organization/OrganizationProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Organization.IApplication.Organization.Dtos; 3 | 4 | namespace Surging.Hero.Organization.Application.Organization 5 | { 6 | public class OrganizationProfile : Profile 7 | { 8 | public OrganizationProfile() 9 | { 10 | CreateMap().ForMember(p => p.Children, opt => opt.Ignore()); 11 | //CreateMap().ForMember(p => p.Children, opt => opt.Ignore()); 12 | CreateMap().ForMember(p => p.Id, opt => opt.Ignore()); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Application/Position/PositionProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Surging.Hero.Organization.IApplication.Position.Dtos; 3 | 4 | namespace Surging.Hero.Organization.Application.Position 5 | { 6 | public class PositionProfile : Profile 7 | { 8 | public PositionProfile() 9 | { 10 | CreateMap(); 11 | CreateMap(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Application/Surging.Hero.Organization.Application.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain.Shared/Organizations/CorporationMold.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.Domain.Shared 2 | { 3 | public enum CorporationMold 4 | { 5 | Group = 0, 6 | 7 | Monomer, 8 | 9 | Subsidiary, 10 | 11 | HoldingCompany 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain.Shared/Organizations/OrganizationType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Surging.Hero.Organization.Domain.Shared.Organizations 4 | { 5 | public enum OrganizationType 6 | { 7 | [Description("公司")] Corporation = 0, 8 | 9 | [Description("部门")] Department 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain.Shared/Surging.Hero.Organization.Domain.Shared.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/OrganizationConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.Domain 2 | { 3 | public static class OrganizationConstant 4 | { 5 | public const string PositionFunctionWordbookCode = "PositionFunction"; 6 | 7 | public const string PositionPositionLevelWordbookCode = "PositionLevel"; 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/ClassMapper/CorporationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Organization.Domain.ClassMapper 4 | { 5 | internal class CorporationClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/ClassMapper/DepartmentClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Organization.Domain.ClassMapper 4 | { 5 | internal class DepartmentClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/ClassMapper/OrganizationClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Organization.Domain.Organizations.ClassMapper 4 | { 5 | public class OrganizationClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/Corporations/Corporation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Surging.Cloud.Domain.Entities.Auditing; 3 | using Surging.Hero.Organization.Domain.Shared; 4 | 5 | namespace Surging.Hero.Organization.Domain 6 | { 7 | public class Corporation : FullAuditedEntity, IMultiTenant 8 | { 9 | public CorporationMold Mold { get; set; } 10 | 11 | public string Address { get; set; } 12 | 13 | public string Logo { get; set; } 14 | 15 | public string LogoPosition { get; set; } 16 | 17 | public string CorporateRepresentative { get; set; } 18 | 19 | public DateTime RegisterDate { get; set; } 20 | 21 | public DateTime OpenDate { get; set; } 22 | 23 | public string Trade { get; set; } 24 | 25 | public string Memo { get; set; } 26 | 27 | public long OrgId { get; set; } 28 | 29 | public long? TenantId { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/Corporations/ICorporationDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.CPlatform.Ioc; 3 | using Surging.Hero.Organization.IApplication.Corporation.Dtos; 4 | 5 | namespace Surging.Hero.Organization.Domain.Organizations 6 | { 7 | public interface ICorporationDomainService : ITransientDependency 8 | { 9 | Task CreateCorporation(CreateCorporationInput input); 10 | Task UpdateCorporation(UpdateCorporationInput input); 11 | Task DeleteCorporation(long orgId); 12 | 13 | Task GetCorporation(long orgId); 14 | Task CreateByTenant(CreateCorporationByTenantInput input); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/Departments/Department.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Organization.Domain 4 | { 5 | public class Department : FullAuditedEntity, IMultiTenant 6 | { 7 | public long OrgId { get; set; } 8 | 9 | public string Location { get; set; } 10 | 11 | public string DeptTypeKey { get; set; } 12 | 13 | public string BriefIntro { get; set; } 14 | 15 | public long? TenantId { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/Departments/IDepartmentDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Surging.Cloud.CPlatform.Ioc; 3 | using Surging.Hero.Organization.IApplication.Department.Dtos; 4 | 5 | namespace Surging.Hero.Organization.Domain.Organizations.Departments 6 | { 7 | public interface IDepartmentDomainService : ITransientDependency 8 | { 9 | Task CreateDepartment(CreateDepartmentInput input); 10 | Task UpdateDepartment(UpdateDepartmentInput input); 11 | Task DeleteDepartmentByOrgId(long orgId); 12 | Task GetDepartment(long id); 13 | Task GetDepartmentByOrgId(long orgId); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/IOrganizationDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Surging.Cloud.CPlatform.Ioc; 4 | 5 | namespace Surging.Hero.Organization.Domain 6 | { 7 | public interface IOrganizationDomainService : ITransientDependency 8 | { 9 | Task> GetOrganizations(); 10 | Task> GetSubOrgs(long orgId); 11 | 12 | Task> GetParentsOrganizations(long orgId); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Organizations/Organization.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | using Surging.Hero.Organization.Domain.Shared.Organizations; 3 | 4 | namespace Surging.Hero.Organization.Domain 5 | { 6 | public class Organization : FullAuditedEntity, IMultiTenant 7 | { 8 | public long ParentId { get; set; } 9 | 10 | public string Code { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public string Identification { get; set; } 15 | 16 | public int Level { get; set; } 17 | 18 | public OrganizationType OrgType { get; set; } 19 | 20 | public long? TenantId { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Positions/ClassMapper/PositionClassMapper.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.ClassMapper; 2 | 3 | namespace Surging.Hero.Organization.Domain.Positions.ClassMapper 4 | { 5 | internal class PositionClassMapper : HeroClassMapper 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Positions/IPositionDomainService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data.Common; 3 | using System.Threading.Tasks; 4 | using Surging.Cloud.CPlatform.Ioc; 5 | using Surging.Hero.Organization.IApplication.Position.Dtos; 6 | 7 | namespace Surging.Hero.Organization.Domain.Positions 8 | { 9 | public interface IPositionDomainService : ITransientDependency 10 | { 11 | Task CreatePosition(Position input, string positionCode, DbConnection conn, DbTransaction trans); 12 | 13 | Task> GetPositionsByDeptId(long deptId); 14 | Task UpdatePosition(UpdatePositionInput input); 15 | Task DeletePosition(long id); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Positions/Position.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.Entities.Auditing; 2 | 3 | namespace Surging.Hero.Organization.Domain.Positions 4 | { 5 | public class Position : FullAuditedEntity, IMultiTenant 6 | { 7 | public long DeptId { get; set; } 8 | 9 | public string Code { get; set; } 10 | 11 | public string Name { get; set; } 12 | 13 | public string FunctionKey { get; set; } 14 | 15 | public string PositionLevelKey { get; set; } 16 | 17 | public string PostResponsibility { get; set; } 18 | 19 | public bool IsLeadingOfficial { get; set; } 20 | 21 | public bool IsLeadershipPost { get; set; } 22 | 23 | public long? TenantId { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.Domain/Surging.Hero.Organization.Domain.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/CacheKeyConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication 2 | { 3 | public static class CacheKeyConstant 4 | { 5 | public const string GetDeptPositionByOrgId = "GetDeptPositionBy:OrgId:{0}"; 6 | 7 | public const string GetDeptPositionById = "GetDeptPositionBy:Id:{0}"; 8 | 9 | public const string RemoveGetDeptPositionKey = "GetDeptPositionBy:*"; 10 | 11 | public const string GetPositionById = "GetPositionById:{0}"; 12 | 13 | public const string RemoveGetPositionByIdKey = "GetPositionBy:*"; 14 | 15 | public const string GetDeptByOrgId = "GetDeptBy:OrgId:{0}"; 16 | 17 | public const string GetDeptById = "GetDeptBy:Id:{0}"; 18 | 19 | public const string RemoveGetDeptKey = "GetDeptBy:*"; 20 | 21 | public const string GetSubOrgIds = "GetSubOrgIds:{0}"; 22 | 23 | public const string RemoveGetSubOrgIds = "GetSubOrgIds:*"; 24 | 25 | public const string GetOrgById = "GetOrgById:{0}"; 26 | 27 | public const string GetParentsOrgsById = "GetOrgById:Parents:{0}"; 28 | 29 | public const string RemoveGetOrgId = "GetOrgById:*"; 30 | 31 | public const string RemoveDeptPositionById = "GetDeptPositionBy:*"; 32 | } 33 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/CreateCorporationByTenantInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class CreateCorporationByTenantInput : CreateCorporationInput 4 | { 5 | public long TenantId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/CreateCorporationInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class CreateCorporationInput : CorporationDtoBase 4 | { 5 | public long? ParentId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/CreateCorporationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class CreateCorporationOutput 4 | { 5 | public long OrgId { get; set; } 6 | 7 | public long CorporationId { get; set; } 8 | 9 | public string Tips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/GetCorporationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class GetCorporationOutput : CorporationDtoBase 4 | { 5 | public long Id { get; set; } 6 | 7 | public string Code { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/UpdateCorporationInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class UpdateCorporationInput : CorporationDtoBase 4 | { 5 | public long Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Corporation/Dtos/UpdateCorporationOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Corporation.Dtos 2 | { 3 | public class UpdateCorporationOutput 4 | { 5 | public long OrgId { get; set; } 6 | 7 | public long CorporationId { get; set; } 8 | 9 | public string Tips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/CreateDepartmentInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Hero.Organization.IApplication.Position.Dtos; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 5 | { 6 | public class CreateDepartmentInput : DepartmentDtoBase 7 | { 8 | public long ParentId { get; set; } 9 | 10 | //public long OrgId { get; set; } 11 | 12 | public IEnumerable Positions { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/CreateDepartmentOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 2 | { 3 | public class CreateDepartmentOutput 4 | { 5 | public long OrgId { get; set; } 6 | 7 | public long DeptId { get; set; } 8 | 9 | public string Tips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/DepartmentDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Surging.Hero.Common; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 5 | { 6 | public abstract class DepartmentDtoBase 7 | { 8 | [Required(ErrorMessage = "部门名称不允许为空")] 9 | [MaxLength(50, ErrorMessage = "部门名称长度不允许超过50")] 10 | public string Name { get; set; } 11 | 12 | [Required(ErrorMessage = "组织机构标识不允许为空")] 13 | [MaxLength(50, ErrorMessage = "组织机构唯一标识长度不允许超过50")] 14 | [RegularExpression(RegExpConstants.NormalIdentificationCode, ErrorMessage = "组织机构标识不正确,只能是字母和数字组合")] 15 | public string Identification { get; set; } 16 | 17 | public string Location { get; set; } 18 | 19 | public string DeptTypeKey { get; set; } 20 | 21 | [MaxLength(100, ErrorMessage = "部门简介长度不允许超过100")] 22 | public string BriefIntro { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/GetDepartmentOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Hero.Organization.IApplication.Position.Dtos; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 5 | { 6 | public class GetDepartmentOutput : DepartmentDtoBase 7 | { 8 | public long Id { get; set; } 9 | 10 | public IEnumerable Positions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/UpdateDepartmentInput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Surging.Hero.Organization.IApplication.Position.Dtos; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 5 | { 6 | public class UpdateDepartmentInput : DepartmentDtoBase 7 | { 8 | public long Id { get; set; } 9 | 10 | public IEnumerable Positions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Department/Dtos/UpdateDepartmentOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Department.Dtos 2 | { 3 | public class UpdateDepartmentOutput 4 | { 5 | public long OrgId { get; set; } 6 | 7 | public long DeptId { get; set; } 8 | 9 | public string Tips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Organization/Dtos/GetOrganizationOutput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Hero.Common.Extensions; 2 | using Surging.Hero.Organization.Domain.Shared.Organizations; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Organization.Dtos 5 | { 6 | public class GetOrganizationOutput 7 | { 8 | public long Id { get; set; } 9 | 10 | public OrganizationType OrganizationType { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public string Code { get; set; } 15 | 16 | public string OrganizationTypeDesc => OrganizationType.GetDescription(); 17 | 18 | public string Memo { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Organization/Dtos/GetOrganizationTreeOutput.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Surging.Cloud.Domain.Trees; 4 | using Surging.Hero.Organization.Domain.Shared.Organizations; 5 | 6 | namespace Surging.Hero.Organization.IApplication.Organization.Dtos 7 | { 8 | public class GetOrganizationTreeOutput : ITree 9 | { 10 | private IEnumerable> _children; 11 | 12 | public OrganizationType OrgType { get; set; } 13 | 14 | public string Title => Name; 15 | 16 | public bool Expand => true; 17 | 18 | public long Id { get; set; } 19 | 20 | public string Name { get; set; } 21 | 22 | public string Code { get; set; } 23 | 24 | public long ParentId { get; set; } 25 | public string FullName { get; set; } 26 | 27 | public IEnumerable> Children 28 | { 29 | get 30 | { 31 | if (_children == null || !_children.Any()) return null; 32 | return _children; 33 | } 34 | set => _children = value; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Organization/Dtos/QueryOrganizationInput.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.Domain.PagedAndSorted; 2 | using Surging.Hero.Organization.Domain.Shared.Organizations; 3 | 4 | namespace Surging.Hero.Organization.IApplication.Organization.Dtos 5 | { 6 | public class QueryOrganizationInput : PagedResultRequestDto 7 | { 8 | public string Code { get; set; } 9 | 10 | public OrganizationType? OrganizationType { get; set; } 11 | 12 | public string SearchKey { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Position/Dtos/CheckCanDeletePositionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Position.Dtos 2 | { 3 | public class CheckCanDeletePositionInput 4 | { 5 | /// 6 | /// 职务Id 7 | /// 8 | public long Id { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Position/Dtos/CreateOrUpdatePositionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Position.Dtos 2 | { 3 | public class CreateOrUpdatePositionInput : PositionDtoBase 4 | { 5 | //public long DeptId { get; set; } 6 | /// 7 | /// 职务id 8 | /// 9 | public long? Id { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Position/Dtos/GetPositionOutput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Position.Dtos 2 | { 3 | public class GetPositionOutput : PositionDtoBase 4 | { 5 | public long DeptId { get; set; } 6 | public long Id { get; set; } 7 | 8 | public string FunctionName { get; set; } 9 | 10 | public string PositionLevelName { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Position/Dtos/PositionDtoBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Surging.Hero.Organization.IApplication.Position.Dtos 4 | { 5 | public abstract class PositionDtoBase 6 | { 7 | [Required(ErrorMessage = "职位名称不允许为空")] 8 | [MaxLength(50, ErrorMessage = "职位名称长度不允许超过50")] 9 | public string Name { get; set; } 10 | 11 | public string FunctionKey { get; set; } 12 | 13 | public string PositionLevelKey { get; set; } 14 | 15 | [Required(ErrorMessage = "岗位职责不允许为空")] 16 | [MaxLength(200, ErrorMessage = "岗位职责长度不允许超过200")] 17 | public string PostResponsibility { get; set; } 18 | 19 | public bool IsLeadershipPost { get; set; } 20 | 21 | public bool IsLeadingOfficial { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Position/Dtos/UpdatePositionInput.cs: -------------------------------------------------------------------------------- 1 | namespace Surging.Hero.Organization.IApplication.Position.Dtos 2 | { 3 | public class UpdatePositionInput : PositionDtoBase 4 | { 5 | public long Id { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.Organization.IApplication/Surging.Hero.Organization.IApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.OrganizationHost/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 2 | WORKDIR /app 3 | ARG rpc_port=100 4 | ARG http_port=8080 5 | ARG ws_port=96 6 | ENV TZ=Asia/Shanghai 7 | ENV LANG C.UTF-8 8 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 9 | EXPOSE ${rpc_port} ${http_port} ${ws_port} 10 | 11 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 12 | WORKDIR /src 13 | ARG sln_name 14 | COPY . . 15 | RUN dotnet restore ${sln_name} && \ 16 | dotnet build --no-restore -c Release ${sln_name} 17 | 18 | FROM build AS publish 19 | ARG host_workdir 20 | WORKDIR ${host_workdir} 21 | RUN dotnet publish --no-restore -c Release -o /app 22 | 23 | FROM base AS final 24 | ARG host_name 25 | ENV host_name=${host_name} 26 | COPY --from=publish /app . 27 | ENTRYPOINT dotnet ${host_name} -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.OrganizationHost/Dockerfile.Rider.v1.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /src 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | COPY . . 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | RUN dotnet restore ${sln_name} && \ 11 | dotnet build --no-restore ${sln_name} 12 | WORKDIR ${host_workdir} 13 | RUN dotnet publish --no-restore -o /app 14 | WORKDIR /app 15 | ENTRYPOINT ["dotnet", "Surging.Hero.OrganizationHost.dll"] -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.OrganizationHost/Dockerfile.Rider.v2.Debug: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 2 | WORKDIR /app 3 | ARG sln_name 4 | ARG host_workdir 5 | ARG host_name 6 | ARG publish_app_dir=${host_workdir}/bin/Debug/net5.0 7 | ENV TZ=Asia/Shanghai 8 | ENV LANG C.UTF-8 9 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 10 | COPY ${publish_app_dir} . 11 | ENTRYPOINT ["dotnet", "Surging.Hero.OrganizationHost.dll"] -------------------------------------------------------------------------------- /src/Services/Organization/Surging.Hero.OrganizationHost/Surging.Hero.OrganizationHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Shared/CSharpScripts/SurgingServiceEngine.cs: -------------------------------------------------------------------------------- 1 | using Surging.Cloud.CPlatform.Engines.Implementation; 2 | using Surging.Cloud.CPlatform.Utilities; 3 | 4 | namespace Surging.Hero.ServiceHost 5 | { 6 | public class SurgingServiceEngine : VirtualPathProviderServiceEngine 7 | { 8 | public SurgingServiceEngine() 9 | { 10 | ModuleServiceLocationFormats = new[] 11 | { 12 | EnvironmentHelper.GetEnvironmentVariable("${ModulePath1}|Modules") 13 | }; 14 | ComponentServiceLocationFormats = new[] 15 | { 16 | EnvironmentHelper.GetEnvironmentVariable("${ComponentPath1}|Components") 17 | }; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Shared/Configs/NLog.config: -------------------------------------------------------------------------------- 1 |  2 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Shared/Configs/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Shared/Configs/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Shared/Configs/consul.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "${Register_Conn}|127.0.0.1:8500", // "", 3 | "SessionTimeout": "${Register_SessionTimeout}|50", 4 | "RoutePath": "${Register_RoutePath}", 5 | "ReloadOnChange": true 6 | } -------------------------------------------------------------------------------- /src/Shared/Configs/eventBusSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "EventBusConnection": "${EventBusConnection}|127.0.0.1", 3 | "EventBusUserName": "${EventBusUserName}|guest", 4 | "EventBusPassword": "${EventBusPassword}|guest", 5 | "VirtualHost": "${VirtualHost}|/", 6 | "MessageTTL": "${MessageTTL}|30000", 7 | "RetryCount": "${RetryCount}|1", 8 | "FailCount": "${FailCount}|3", 9 | "PrefetchCount": "${PrefetchCount}|0", 10 | "BrokerName": "srcp_demo", 11 | "Port": "${EventBusPort}|5672" 12 | } -------------------------------------------------------------------------------- /src/Shared/Configs/gatewaySettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AccessTokenExpireTimeSpan": "30", 3 | "AuthenticationRoutePath": "v1/api/account/login", 4 | //"ThirdPartyAuthenticationRoutePath": "api/account/authentication", 5 | "AuthorizationRoutePath": "v1/api/authorize", 6 | "AuthorizationServiceKey": "", 7 | "WhiteList": [ 8 | 9 | ], 10 | "CacheMode": "ddlCache.Redis", 11 | "JwtConfig": { 12 | "Iss": "hl", 13 | "Aud": "hl_aud", 14 | "Period": 100000, 15 | "EncryptionAlgorithm": "HS256", 16 | "SecretKey": "ULJtOaYEr94jRXd8JFJdCFc1eMDTchRSYMQma5RpgSbUtkclXTJlsSVdCCdfySh1bewDvQWU92e1qAnmBgZLGPqhf1Ee1IbuqYQ" // 17 | }, 18 | "AccessPolicy": { 19 | "Origins": [ "*" ], 20 | "AllowAnyHeader": true, 21 | "AllowAnyMethod": true 22 | }, 23 | "Register": { 24 | "Provider": "Consul", 25 | "Address": "${Register_Conn}|consul:8500" 26 | }, 27 | "ServicePart": { 28 | "MainPath": "part/service/aggregation", 29 | "EnableAuthorization": false, 30 | "Services": [ 31 | ] 32 | } 33 | } -------------------------------------------------------------------------------- /src/Shared/Configs/zookeeper.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "${Register_Conn}|127.0.0.1:2181", 3 | "SessionTimeout": "${Register_SessionTimeout}|5000", 4 | "ReloadOnChange": true, 5 | "LockTimeout": 20 6 | } -------------------------------------------------------------------------------- /src/Shared/Props/applicationpackage.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | ..\..\..\annotationxmldir\$(AssemblyName).xml 12 | 13 | 14 | /app/annotationxmldir/$(AssemblyName).xml 15 | 16 | -------------------------------------------------------------------------------- /src/Shared/Props/commonpackage.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ..\..\annotationxmldir\$(AssemblyName).xml 13 | 14 | 15 | /app/annotationxmldir/$(AssemblyName).xml 16 | 17 | -------------------------------------------------------------------------------- /src/Shared/Props/domainpackage.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ..\..\..\annotationxmldir\$(AssemblyName).xml 13 | 14 | 15 | /app/annotationxmldir/$(AssemblyName).xml 16 | 17 | -------------------------------------------------------------------------------- /src/Shared/Props/surgingversion.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2.1.0-bate.8 4 | 5 | 6 | --------------------------------------------------------------------------------