├── .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