From e5e181488d6c55b9af5456de5d0a60f5a47b8e57 Mon Sep 17 00:00:00 2001
From: faker <1784913417@qq.com>
Date: Mon, 8 May 2023 16:02:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.dockerignore | 25 +
.gitattributes | 63 +
.gitignore | 316 +++
Dockerfile | 30 +
LICENSE | 21 +
Znyc.Cloudcar.Admin.AspNetCore/AspNetCore.xml | 804 ++++++
.../Common/CorsMiddleware.cs | 49 +
.../Common/ErrCode.cs | 115 +
.../Common/Initialization.cs | 25 +
.../Common/MyApiException.cs | 93 +
.../Common/Permission.cs | 64 +
.../Common/SessionObject.cs | 20 +
.../Mvc/ApiController.cs | 253 ++
.../Mvc/AreaApiController.cs | 373 +++
.../Mvc/Filter/ActionFilter.cs | 149 ++
.../Mvc/Filter/ExceptionHandlingAttribute.cs | 102 +
.../Mvc/Filter/FunctionAuthorizationFilter.cs | 74 +
.../Mvc/Filter/FunctionAuthorizeAttribute.cs | 26 +
.../Mvc/Filter/HiddenApiAttribute.cs | 49 +
.../Filter/NoPermissionRequiredAttribute.cs | 18 +
.../Mvc/Filter/SwaggerFileUploadFilter.cs | 55 +
.../Mvc/TokenProvider.cs | 220 ++
.../PublishProfiles/FolderProfile.pubxml | 16 +
.../ViewModel/DBConnResult.cs | 24 +
.../ViewModel/DbConnInfo.cs | 48 +
.../ViewModel/SearchModel.cs | 34 +
.../ViewModel/UpdateEnableViewModel.cs | 22 +
.../ViewModel/VueCascaderModel.cs | 27 +
.../ViewModel/VuexMenusTree.cs | 90 +
.../Znyc.Cloudcar.Admin.AspNetCore.csproj | 73 +
.../AppDbContextFactoryAttribute.cs | 23 +
.../Attributes/ShardingTableAttribute.cs | 39 +
.../Attributes/UnitOfWorkAttribute.cs | 12 +
.../Cache/CacheHelper.cs | 406 +++
.../Cache/CacheProvider.cs | 23 +
.../Cache/ICacheService.cs | 305 +++
.../Cache/MemoryCacheService.cs | 594 +++++
.../Cache/RedisCacheService.cs | 634 +++++
Znyc.Cloudcar.Admin.Commons/Commons.csproj | 235 ++
Znyc.Cloudcar.Admin.Commons/Config/Configs.cs | 49 +
.../Const/CommonConst.cs | 79 +
.../Const/CurrencyConst.cs | 90 +
.../Const/ReturnConst.cs | 115 +
Znyc.Cloudcar.Admin.Commons/Core/App/App.cs | 289 +++
.../Core/App/HostingStartup.cs | 32 +
.../Core/App/HttpContextLocal.cs | 69 +
.../Core/Application/BaseApp.cs | 461 ++++
.../Core/Dapper/DapperDbContext.cs | 128 +
.../Core/DataManager/AppDBContextAttribute.cs | 24 +
.../Core/DataManager/DBServerProvider.cs | 230 ++
.../Core/DataManager/DbConnectionOptions.cs | 42 +
.../Core/DataManager/WriteAndReadEnum.cs | 23 +
.../Core/DataManager/YuebonDbOptions.cs | 18 +
.../Core/DataManager/YuebonDbOptionsSetup.cs | 64 +
.../Core/DbContextCore/BaseDbContext.cs | 796 ++++++
.../Core/DbContextCore/DbContextFactory.cs | 101 +
.../Core/DbContextCore/DefaultModelBuilder.cs | 17 +
.../Core/DbContextCore/MySqlDbContext.cs | 124 +
.../Core/DbContextCore/OracleDbContext.cs | 69 +
.../Core/DbContextCore/PostgreSQLDbContext.cs | 80 +
.../Core/DbContextCore/SQLiteDbContext.cs | 62 +
.../Core/DbContextCore/SqlServerDbContext.cs | 225 ++
.../Core/Dtos/DeletesInputDto.cs | 16 +
.../Core/Dtos/IInputDto.cs | 14 +
.../Core/Dtos/IOutputDto.cs | 9 +
.../Core/Dtos/InputDtoValidateExtensions.cs | 80 +
.../Core/Dtos/SearchInputDto.cs | 39 +
.../Core/IDbContext/IDbContextCore.cs | 491 ++++
.../Core/IDbContext/IDbContextFactory.cs | 24 +
.../Core/IDbContext/IMySqlDbContext.cs | 6 +
.../Core/IDbContext/IOracleDbContext.cs | 6 +
.../Core/IDbContext/IPostgreSQLDbContext.cs | 6 +
.../Core/IDbContext/ISQLiteDbContext.cs | 6 +
.../Core/IDbContext/ISqlServerDbContext.cs | 6 +
.../Core/IRepositories/IReadOnlyRepository.cs | 14 +
.../Core/IRepositories/IRepository.cs | 833 ++++++
.../Core/IServices/IService.cs | 629 +++++
.../Core/Models/BaseEntity.cs | 55 +
.../Core/Models/BaseViewModel.cs | 12 +
.../Core/Models/Entity.cs | 9 +
.../Core/Models/IBaseEntity.cs | 14 +
.../Core/Models/ICreationAudited.cs | 20 +
.../Core/Models/IDataAuthEnabled.cs | 18 +
.../Core/Models/IDeleteAudited.cs | 13 +
.../Core/Models/IEntity.cs | 9 +
.../Core/Models/IEntityHash.cs | 10 +
.../Core/Models/IExpirable.cs | 20 +
.../Core/Models/IModificationAudited.cs | 20 +
.../Core/Models/IMustHaveTenant.cs | 13 +
.../Core/Module/AutoMapperService.cs | 22 +
.../Core/Module/MoudleService.cs | 88 +
.../Core/Repositories/BaseRepository.cs | 2255 +++++++++++++++++
.../Core/Services/BaseService.cs | 1006 ++++++++
Znyc.Cloudcar.Admin.Commons/Cos/CosOptions.cs | 22 +
Znyc.Cloudcar.Admin.Commons/Data/Check.cs | 251 ++
.../Data/MicroDataTable.cs | 95 +
.../Data/MicroDataTableHelper.cs | 52 +
.../DependencyInjection/IPrivateDependency.cs | 9 +
.../DependencyInjection/IScopedDependency.cs | 9 +
.../ISingletonDependency.cs | 9 +
.../ITransientDependency.cs | 9 +
.../Encrypt/Base64Util.cs | 318 +++
.../Encrypt/Cryptography.cs | 59 +
.../Encrypt/DEncrypt.cs | 164 ++
.../Encrypt/EncodeHelper.cs | 650 +++++
.../Encrypt/EncryptHelper.cs | 91 +
.../Encrypt/MD5Util.cs | 184 ++
.../Encrypt/QQEncryptUtil.cs | 51 +
.../Encrypt/RSASecurityHelper.cs | 273 ++
.../Encrypt/RSAUtils.cs | 66 +
.../Enums/ActivityStatusEnum.cs | 26 +
.../Enums/BannerTypeEnum.cs | 25 +
.../Enums/CallFeedbackStatusEnum.cs | 30 +
.../Enums/CommonStatus.cs | 30 +
.../Enums/CurrencyEnum.cs | 168 ++
.../Enums/DatabaseType.cs | 43 +
.../Enums/DictionaryCodeEnum.cs | 17 +
.../Enums/EquipmentState.cs | 47 +
.../Enums/HandleStatusEnum.cs | 24 +
.../Enums/JobAction.cs | 19 +
.../Enums/JobRunResult.cs | 17 +
.../Enums/LinqExpressionType.cs | 15 +
Znyc.Cloudcar.Admin.Commons/Enums/MsgType.cs | 23 +
.../Enums/PlatformTypeEnum.cs | 25 +
.../Enums/ProductStatusEnum.cs | 41 +
.../Enums/ProductTypeEnum.cs | 20 +
.../Enums/QueryOrderBy.cs | 8 +
.../Enums/UserCertificationEnum.cs | 30 +
Znyc.Cloudcar.Admin.Commons/Enums/UserType.cs | 23 +
Znyc.Cloudcar.Admin.Commons/Extend/ExtDate.cs | 281 ++
.../Extend/ExtIEnumerable.cs | 45 +
Znyc.Cloudcar.Admin.Commons/Extend/ExtInt.cs | 33 +
.../Extend/ExtQueryable.cs | 46 +
.../Extend/ExtString.cs | 566 +++++
Znyc.Cloudcar.Admin.Commons/Extend/Extlong.cs | 38 +
Znyc.Cloudcar.Admin.Commons/Extend/Reflect.cs | 76 +
.../Extensions/ApiDescriptionExtension.cs | 32 +
.../AppServiceCollectionExtensions.cs | 605 +++++
.../Extensions/CollectionExtensions.cs | 78 +
.../Extensions/DateTimeExtensions.cs | 308 +++
.../EntityFrameworkCoreExtensions.cs | 246 ++
.../Extensions/EnumExtensions.cs | 120 +
.../Extensions/ExpressionExtensions.cs | 293 +++
.../Extensions/HttpContextExtentions.cs | 20 +
.../Extensions/ObjectExtension.cs | 1508 +++++++++++
.../Extensions/ParameterCheckExtensions.cs | 216 ++
.../Extensions/SessionExtensions.cs | 43 +
.../Extensions/SqlMapperExtensions.Async.cs | 789 ++++++
.../Extensions/SqlMapperExtensions.cs | 1266 +++++++++
.../Extensions/TypeExtensions.cs | 424 ++++
.../Extensions/YuebonClaimTypes.cs | 59 +
.../Helpers/AppVersionHelper.cs | 28 +
.../Helpers/BooleanJsonConverter.cs | 37 +
.../Helpers/ByteConvertHelper.cs | 45 +
.../Helpers/ConvertHelper.cs | 868 +++++++
.../Helpers/CookiesHelper.cs | 129 +
.../Helpers/DatetimeJsonConverter.cs | 74 +
.../Helpers/DecimalJsonConverter.cs | 38 +
.../Helpers/EmojiFilterHelper.cs | 76 +
.../Helpers/EntityMapper.cs | 194 ++
.../Helpers/FileHelper.cs | 250 ++
.../Helpers/FileQuartz.cs | 133 +
.../Helpers/GuidUtils.cs | 99 +
.../Helpers/HttpContextHelper.cs | 27 +
.../Helpers/HttpRequestHelper.cs | 220 ++
.../Helpers/ImgHelper.cs | 158 ++
.../Helpers/IntJsonConverter.cs | 38 +
.../Helpers/NPOIHelper.cs | 628 +++++
.../Helpers/ObjectReplaceHtmlHelper.cs | 61 +
.../Helpers/RuntimeHelper.cs | 137 +
.../Helpers/SessionHelper.cs | 46 +
.../Helpers/SignHelper.cs | 193 ++
.../Helpers/StringHelper.cs | 166 ++
.../Helpers/UpperFirstCaseNamingPolicy.cs | 20 +
.../Helpers/XmlConverter.cs | 59 +
.../IoC/IoCContainer.cs | 23 +
.../Json/JsonHelper.cs | 136 +
.../Linq/EnumerableExtentions.cs | 65 +
Znyc.Cloudcar.Admin.Commons/Log/DbLogType.cs | 65 +
.../Log/Log4netHelper.cs | 209 ++
.../Mapping/MapperExtensions.cs | 93 +
.../Net/IIPAddressParser.cs | 19 +
.../Net/IPAddressRange.cs | 143 ++
.../Net/IpAddressUtil.cs | 164 ++
.../Net/RemoteIpParser.cs | 34 +
.../Net/ReversProxyIpParser.cs | 27 +
Znyc.Cloudcar.Admin.Commons/Net/TencentIp.cs | 97 +
.../Options/AllowCacheApp.cs | 53 +
.../Options/AppSetting.cs | 316 +++
.../Options/AssembleTypeConsts.cs | 23 +
.../Options/CodeGenerateOption.cs | 58 +
.../Options/DbContextOption.cs | 30 +
.../Options/JwtOption.cs | 33 +
.../Options/UIConstants.cs | 74 +
Znyc.Cloudcar.Admin.Commons/Page/PageIfno.cs | 99 +
.../Page/PageResult.cs | 68 +
.../Page/PagerHelper.cs | 390 +++
.../PublishProfiles/FolderProfile.pubxml | 14 +
.../Properties/Resources.Designer.cs | 378 +++
.../Properties/Resources.resx | 226 ++
.../Result/ResultOutPut.cs | 134 +
.../Result/TokenResult.cs | 31 +
Znyc.Cloudcar.Admin.Commons/Tree/JsTree.cs | 39 +
.../Tree/JsTreeModel.cs | 37 +
.../Tree/TreeSelect.cs | 56 +
.../Tree/TreeSelectModel.cs | 27 +
Znyc.Cloudcar.Admin.Commons/Tree/TreeView.cs | 60 +
.../Tree/TreeViewModel.cs | 114 +
.../Tree/VueRouterModel.cs | 95 +
.../Znyc.Cloudcar.Admin.Commons.csproj | 174 ++
.../HangfireDispose.cs | 43 +
.../TaskJobs/AutoActivityJob.cs | 24 +
.../TaskJobs/AutoBannerJob.cs | 24 +
.../TaskJobs/AutoStatisticalJob.cs | 24 +
.../Znyc.Cloudcar.Admin.Hangfire.csproj | 19 +
.../Collection/GpsRealTime.cs | 66 +
.../IRepositorys/IGpsRealTimeRepository.cs | 15 +
Znyc.Cloudcar.Admin.MongoDb/MongoContext.cs | 22 +
.../Repositorys/GpsRealTimeRepository.cs | 35 +
.../Znyc.Cloudcar.Admin.MongoDb.Core.csproj | 10 +
.../Application/AreaApp.cs | 279 ++
.../Application/MenuApp.cs | 441 ++++
.../Application/UploadFileApp.cs | 217 ++
.../Application/UserApp.cs | 127 +
.../Dtos/Activity/ActivityAddInput.cs | 45 +
.../Dtos/Activity/ActivityOutputDto.cs | 57 +
.../Dtos/Activity/ActivityUpdateInput.cs | 15 +
.../Dtos/Activity/SearchActivityModel.cs | 26 +
.../Dtos/AdminCurrentUser.cs | 158 ++
.../Dtos/AdminUser/AdminUserInputDto.cs | 70 +
.../Dtos/AdminUser/AdminUserOutputDto.cs | 83 +
.../Dtos/Api/ApiInputDto.cs | 16 +
.../Dtos/Api/ApiOutputDto.cs | 16 +
.../Dtos/App/AppInputDto.cs | 60 +
.../Dtos/App/AppOutputDto.cs | 120 +
.../Dtos/ApplyJob/ApplyJobInputDto.cs | 136 +
.../Dtos/ApplyJob/ApplyJobOutputDto.cs | 188 ++
.../Dtos/Area/AreaInputDto.cs | 70 +
.../Dtos/Area/AreaOutputDto.cs | 112 +
.../Dtos/Area/AreaPickerOutputDto.cs | 26 +
.../Dtos/Area/AreaSelect2OutDto.cs | 21 +
.../Dtos/Audit/AuditInputDto.cs | 39 +
.../Dtos/Audit/AuditOutputDto.cs | 42 +
.../Dtos/Banner/BannerInput.cs | 75 +
.../Dtos/Banner/BannerOutputDto.cs | 58 +
.../Dtos/Banner/BannerUpdateInput.cs | 13 +
.../Dtos/Banner/SearchBannerModel.cs | 13 +
.../Dtos/CallFeedback/CallFeedbackInput.cs | 23 +
.../CallFeedback/CallFeedbackOutputDto.cs | 49 +
.../CallFeedback/SearchCallFeedbackModel.cs | 18 +
.../Dtos/Certification/CertificationOutput.cs | 41 +
.../Dtos/Currency/CurrencyInput.cs | 22 +
.../Dtos/Currency/CurrencyOutputDto.cs | 22 +
.../CurrencyRecord/CurrencyRecordInput.cs | 22 +
.../CurrencyRecord/CurrencyRecordOutputDto.cs | 73 +
.../SearchCurrencyRecordModel.cs | 34 +
.../Dtos/DashboardOutModel.cs | 146 ++
.../Dtos/Dictionary/DictionaryInputDto.cs | 55 +
.../Dtos/Dictionary/DictionaryListOutput.cs | 29 +
.../Dtos/Dictionary/DictionaryOutputDto.cs | 57 +
.../Dtos/Document/ImageOutput.cs | 24 +
.../Dtos/Equipment/EquipmentAddInput.cs | 120 +
.../Dtos/Equipment/EquipmentOutputDto.cs | 212 ++
.../Dtos/Equipment/EquipmentUpdateInput.cs | 120 +
.../Dtos/Equipment/SearchEquipmentModel.cs | 26 +
.../ExceptionsLogs/ExceptionsLogsInPutDto.cs | 60 +
.../ExceptionsLogs/ExceptionsLogsOutputDto.cs | 56 +
.../Dtos/Feedback/FeedbackInput.cs | 10 +
.../Dtos/Feedback/FeedbackOutputDto.cs | 50 +
.../Dtos/Feedback/FeedbackPicOutput.cs | 23 +
.../Dtos/Feedback/SearchFeedbackModel.cs | 23 +
.../Function/FunctionTreeTableOutputDto.cs | 159 ++
.../Dtos/Function/ModuleFunctionOutputDto.cs | 42 +
.../Dtos/IndustryJobs/IndustryJobsInputDto.cs | 36 +
.../IndustryJobs/IndustryJobsOutputDto.cs | 60 +
.../IndustryJobs/IndustryJobsTreeTableDto.cs | 39 +
.../Dtos/LoginLogs/LoginLogsInPutDto.cs | 114 +
.../Dtos/LoginLogs/LoginLogsOutputDto.cs | 56 +
.../Dtos/LoginLogs/SearchLoginLogsModel.cs | 26 +
.../Dtos/Menu/MenuInputDto.cs | 131 +
.../Dtos/Menu/MenuOutputDto.cs | 176 ++
.../Dtos/Menu/MenuTreeTableOutputDto.cs | 171 ++
.../Dtos/Message/MessageInputDto.cs | 48 +
.../Dtos/Message/MessageLogsInputDto.cs | 32 +
.../Dtos/Message/MessageLogsOutputDto.cs | 26 +
.../Dtos/Message/MessageOutputDto.cs | 46 +
.../OperationLogs/OperationLogsInPutDto.cs | 70 +
.../OperationLogs/OperationLogsOutputDto.cs | 114 +
.../OperationLogs/SearchOperationLogsModel.cs | 21 +
.../Dtos/Order/OrderOutput.cs | 107 +
.../Dtos/OrderDetail/OrderDetailOutput.cs | 35 +
.../Dtos/Organize/OrganizeInputDto.cs | 65 +
.../Dtos/Organize/OrganizeOutputDto.cs | 82 +
.../Dtos/PaymentRecord/PaymentRecordInput.cs | 25 +
.../PaymentRecord/PaymentRecordOutputDto.cs | 57 +
.../PaymentRecord/SearchPaymentRecordModel.cs | 28 +
.../Dtos/Recharge/RechargeAddInput.cs | 17 +
.../Dtos/Recharge/RechargeOutputDto.cs | 32 +
.../Dtos/Recharge/RechargeUpdateInput.cs | 10 +
.../Dtos/Recharge/SearchRechargeModel.cs | 26 +
.../RechargeIntro/RechargeIntroAddInput.cs | 25 +
.../RechargeIntro/RechargeIntroOutputDto.cs | 30 +
.../Dtos/Recruitment/RecruitmentInputDto.cs | 114 +
.../Dtos/Recruitment/RecruitmentOutputDto.cs | 185 ++
.../Recruitment/SearchRecruitmentModel.cs | 41 +
.../Dtos/Region/RegionOutputDto.cs | 29 +
.../Dtos/Role/RoleAuthorizeDataInputDto.cs | 31 +
.../Dtos/Role/RoleAuthorizeInputDto.cs | 45 +
.../Dtos/Role/RoleAuthorizeOutputDto.cs | 59 +
.../Dtos/Role/RoleDataInputDto.cs | 40 +
.../Dtos/Role/RoleDataOutputDto.cs | 40 +
.../Dtos/Role/RoleInputDto.cs | 70 +
.../Dtos/Role/RoleOutputDto.cs | 116 +
.../Dtos/SecurityProfile.cs | 151 ++
.../Dtos/Statistical/StatisticalInputDto.cs | 61 +
.../Statistical/StatisticalListOutputDto.cs | 61 +
.../Dtos/Statistical/StatisticalOutputDto.cs | 88 +
.../Dtos/SysSetting/SysSettingOutputDto.cs | 321 +++
.../Dtos/SystemType/SystemTypeInputDto.cs | 60 +
.../Dtos/SystemType/SystemTypeOutputDto.cs | 100 +
.../Dtos/UploadFile/UploadFileInputDto.cs | 80 +
.../Dtos/UploadFile/UploadFileOutputDto.cs | 91 +
.../UploadFile/UploadFileResultOuputDto.cs | 46 +
.../Dtos/User/SearchUserModel.cs | 36 +
.../Dtos/User/UserAllListFocusOutPutDto.cs | 227 ++
.../Dtos/User/UserExtendInputDto.cs | 104 +
.../Dtos/User/UserExtendOutPutDto.cs | 171 ++
.../Dtos/User/UserFocusExtendOutPutDto.cs | 68 +
.../Dtos/User/UserInPutDto.cs | 41 +
.../Dtos/User/UserLogOnInputDto.cs | 109 +
.../Dtos/User/UserLogOnOutputDto.cs | 120 +
.../Dtos/User/UserOpenIdsInputDto.cs | 24 +
.../Dtos/User/UserOpenIdsOutputDto.cs | 30 +
.../Dtos/User/UserOutputDto.cs | 123 +
.../Dtos/User/UserThemeInputDto.cs | 36 +
.../Dtos/User/UserWithAccessedCtrls.cs | 33 +
.../Dtos/WxUnifyUser/WxUnifyUserAddInput.cs | 53 +
.../Dtos/WxUnifyUser/WxUnifyUserOutputDto.cs | 55 +
.../WxUserRelation/WxUserRelationOutputDto.cs | 12 +
.../Entitys/APPEntity.cs | 45 +
.../Entitys/ActivityEntity.cs | 73 +
.../Entitys/AdminUserEntity.cs | 64 +
.../Entitys/AdminUserLogOnEntity.cs | 59 +
.../Entitys/ApiEntity.cs | 17 +
.../Entitys/ApplyJobEntity.cs | 121 +
.../Entitys/AreaEntity.cs | 67 +
.../Entitys/AuditEntity.cs | 50 +
.../Entitys/BannerEntity.cs | 69 +
.../Entitys/CallFeedbackEntity.cs | 37 +
.../Entitys/CertificationEntity.cs | 56 +
.../Entitys/CurrencyEntity.cs | 32 +
.../Entitys/CurrencyRecordEntity.cs | 37 +
.../Entitys/DbLogsEntity.cs | 41 +
.../Entitys/DictionaryEntity.cs | 49 +
.../Entitys/EquipmentEntity.cs | 134 +
.../Entitys/EquipmentPictureEntity.cs | 28 +
.../Entitys/ExceptionsLogsEntity.cs | 65 +
.../Entitys/FeedbackEntity.cs | 37 +
.../Entitys/FeedbackPicEntity.cs | 35 +
.../Entitys/IndustryJobsEntity.cs | 34 +
.../Entitys/LogEntity.cs | 85 +
.../Entitys/LoginLogsEntity.cs | 73 +
.../Entitys/MenuEntity.cs | 110 +
.../Entitys/MessageEntity.cs | 50 +
.../Entitys/MessageLogsEntity.cs | 29 +
.../Entitys/OperationLogsEntity.cs | 76 +
.../Entitys/OrderDetailEntity.cs | 41 +
.../Entitys/OrderEntity.cs | 116 +
.../Entitys/OrganizeEntity.cs | 56 +
.../Entitys/PaymentRecordEntity.cs | 54 +
.../Entitys/RechargeEntity.cs | 22 +
.../Entitys/RechargeIntroEntity.cs | 47 +
.../Entitys/RecruitmentEntity.cs | 114 +
.../Entitys/RegionEntity.cs | 32 +
.../Entitys/RoleAuthorizeEntity.cs | 43 +
.../Entitys/RoleDataEntity.cs | 27 +
.../Entitys/RoleEntityEntity.cs | 47 +
.../Entitys/StatisticalEntity.cs | 70 +
.../Entitys/SysSettingEntity.cs | 13 +
.../Entitys/SystemTypeEntity.cs | 44 +
.../Entitys/UploadFileEntity.cs | 86 +
.../Entitys/UserEntity.cs | 56 +
.../Entitys/UserExtendEntity.cs | 126 +
.../Entitys/UserFocusEntity.cs | 31 +
.../Entitys/UserNameCardViewEntity.cs | 174 ++
.../Entitys/UserOpenIdsEntity.cs | 31 +
.../Entitys/WxUnifyUserEntity.cs | 59 +
.../Entitys/WxUserRelationEntity.cs | 35 +
.../Recruitment/IAPPRepository.cs | 32 +
.../Recruitment/IActivityRepository.cs | 12 +
.../Recruitment/IAdminUserLogOnRepository.cs | 15 +
.../Recruitment/IAdminUserRepository.cs | 108 +
.../Recruitment/IApiRepository.cs | 9 +
.../Recruitment/IApplyJobRepository.cs | 18 +
.../Recruitment/IAreaRepository.cs | 9 +
.../Recruitment/IAuditRepository.cs | 12 +
.../Recruitment/IBannerRepository.cs | 12 +
.../Recruitment/ICallFeedbackRepository.cs | 18 +
.../Recruitment/ICertificationRepository.cs | 15 +
.../Recruitment/ICurrencyRecordRepository.cs | 12 +
.../Recruitment/ICurrencyRepository.cs | 12 +
.../Recruitment/IDictionaryRepository.cs | 24 +
.../IEquipmentPictureRepository.cs | 12 +
.../Recruitment/IEquipmentRepository.cs | 12 +
.../Recruitment/IExceptionsLogsRepository.cs | 9 +
.../Recruitment/IFeedbackPicRepository.cs | 11 +
.../Recruitment/IFeedbackRepository.cs | 11 +
.../Recruitment/IIndustryJobsRepository.cs | 9 +
.../Recruitment/ILoginLogsRepository.cs | 22 +
.../Recruitment/IMenuRepository.cs | 25 +
.../Recruitment/IMessageLogsRepository.cs | 11 +
.../Recruitment/IMessageRepository.cs | 11 +
.../Recruitment/IOperationLogsRepository.cs | 9 +
.../Recruitment/IOrderDetailRepository.cs | 11 +
.../Recruitment/IOrderRepository.cs | 11 +
.../Recruitment/IOrganizeRepository.cs | 19 +
.../Recruitment/IPaymentRecordRepository.cs | 12 +
.../Recruitment/IRechargeIntroRepository.cs | 12 +
.../Recruitment/IRechargeRepository.cs | 12 +
.../Recruitment/IRecruitmentRepository.cs | 18 +
.../Recruitment/IRegionRepository.cs | 23 +
.../Recruitment/IRoleAuthorizeRepository.cs | 23 +
.../Recruitment/IRoleDataRepository.cs | 16 +
.../Recruitment/IRoleRepository.cs | 9 +
.../Recruitment/IStatisticalRepository.cs | 13 +
.../Recruitment/ISystemTypeRepository.cs | 15 +
.../Recruitment/IUploadFileRepository.cs | 20 +
.../Recruitment/IUserRepository.cs | 18 +
.../Recruitment/IWxUnifyUserRepository.cs | 12 +
.../Recruitment/IWxUserRelationRepository.cs | 12 +
.../IServices/IAPPService.cs | 45 +
.../IServices/IActivityService.cs | 43 +
.../IServices/IAdminUserLogOnService.cs | 25 +
.../IServices/IAdminUserService.cs | 109 +
.../IServices/IApiService.cs | 12 +
.../IServices/IApplyJobService.cs | 46 +
.../IServices/IAreaService.cs | 28 +
.../IServices/IAuditService.cs | 29 +
.../IServices/IBannerService.cs | 43 +
.../IServices/ICallFeedbackService.cs | 29 +
.../IServices/ICertificationService.cs | 17 +
.../IServices/ICurrencyRecordService.cs | 25 +
.../IServices/ICurrencyService.cs | 41 +
.../IServices/IDictionaryService.cs | 54 +
.../IServices/IEquipmentService.cs | 35 +
.../IServices/IExceptionsLogsService.cs | 40 +
.../IServices/IFeedbackService.cs | 28 +
.../IServices/IIndustryJobsService.cs | 36 +
.../IServices/ILoginLogsService.cs | 42 +
.../IServices/IMenuService.cs | 69 +
.../IServices/IMessageLogsService.cs | 14 +
.../IServices/IMessageService.cs | 12 +
.../IServices/IOperationLogsService.cs | 42 +
.../IServices/IOrderDetailService.cs | 12 +
.../IServices/IOrderService.cs | 12 +
.../IServices/IOrganizeService.cs | 46 +
.../IServices/IPaymentRecordService.cs | 25 +
.../IServices/IRechargeService.cs | 41 +
.../IServices/IRecruitmentService.cs | 51 +
.../IServices/IRegionService.cs | 17 +
.../IServices/IRoleAuthorizeService.cs | 40 +
.../IServices/IRoleDataService.cs | 17 +
.../IServices/IRoleService.cs | 32 +
.../IServices/IStatisticalService.cs | 24 +
.../IServices/ISystemTypeService.cs | 27 +
.../IServices/IUploadFileService.cs | 21 +
.../IServices/IUserService.cs | 38 +
.../IServices/IWxUserRelationService.cs | 21 +
.../Repositories/Recruitment/APPRepository.cs | 59 +
.../Recruitment/ActivityRepository.cs | 21 +
.../Recruitment/AdminUserLogOnRepository.cs | 30 +
.../Recruitment/AdminUserRepository.cs | 189 ++
.../Repositories/Recruitment/ApiRepository.cs | 18 +
.../Recruitment/ApplyJobRepository.cs | 34 +
.../Recruitment/AreaRepository.cs | 18 +
.../Recruitment/AuditRepository.cs | 36 +
.../Recruitment/BannerRepository.cs | 21 +
.../Recruitment/CallFeedbackRepository.cs | 36 +
.../Recruitment/CertificationRepository.cs | 32 +
.../Recruitment/CurrencyRecordRepository.cs | 21 +
.../Recruitment/CurrencyRepository.cs | 21 +
.../Recruitment/DictionaryRepository.cs | 41 +
.../Recruitment/EquipmentPictureRepository.cs | 21 +
.../Recruitment/EquipmentRepository.cs | 21 +
.../Recruitment/ExceptionsLogsRepository.cs | 26 +
.../Recruitment/FeedbackPicRepository.cs | 22 +
.../Recruitment/FeedbackRepository.cs | 22 +
.../Recruitment/IndustryJobsRepository.cs | 18 +
.../Recruitment/LoginLogsRepository.cs | 57 +
.../Recruitment/MenuRepository.cs | 66 +
.../Recruitment/MessageLogsRepository.cs | 21 +
.../Recruitment/MessageRepository.cs | 40 +
.../Recruitment/OperationLogsRepository.cs | 26 +
.../Recruitment/OrderDetailRepository.cs | 22 +
.../Recruitment/OrderRepository.cs | 22 +
.../Recruitment/OrganizeRepository.cs | 43 +
.../Recruitment/PaymentRecordRepository.cs | 21 +
.../Recruitment/RechargeIntroRepository.cs | 21 +
.../Recruitment/RechargeRepository.cs | 21 +
.../Recruitment/RecruitmentRepository.cs | 34 +
.../Recruitment/RegionRepository.cs | 68 +
.../Recruitment/RoleAuthorizeRepository.cs | 98 +
.../Recruitment/RoleDataRepository.cs | 50 +
.../Recruitment/RoleRepository.cs | 18 +
.../Recruitment/StatisticalRepository.cs | 34 +
.../Recruitment/SystemTypeRepository.cs | 33 +
.../Recruitment/UploadFileRepository.cs | 53 +
.../Recruitment/UserRepository.cs | 87 +
.../Recruitment/WxUnifyUserRepository.cs | 21 +
.../Recruitment/WxUserRelationRepository.cs | 21 +
.../Services/Recruitment/APPService.cs | 162 ++
.../Services/Recruitment/ActivityService.cs | 235 ++
.../Recruitment/AdminUserLogOnService.cs | 44 +
.../Services/Recruitment/AdminUserService.cs | 285 +++
.../Services/Recruitment/ApiService.cs | 29 +
.../Services/Recruitment/ApplyJobService.cs | 322 +++
.../Services/Recruitment/AreaService.cs | 129 +
.../Services/Recruitment/AuditService.cs | 275 ++
.../Services/Recruitment/BannerService.cs | 179 ++
.../Recruitment/CallFeedbackService.cs | 110 +
.../Recruitment/CertificationService.cs | 246 ++
.../Recruitment/CurrencyRecordService.cs | 99 +
.../Services/Recruitment/CurrencyService.cs | 139 +
.../Services/Recruitment/DictionaryService.cs | 145 ++
.../Services/Recruitment/EquipmentService.cs | 165 ++
.../Recruitment/ExceptionsLogsService.cs | 214 ++
.../Services/Recruitment/FeedbackService.cs | 107 +
.../Recruitment/IndustryJobsService.cs | 148 ++
.../Services/Recruitment/LoginLogsService.cs | 225 ++
.../Services/Recruitment/MenuService.cs | 262 ++
.../Recruitment/MessageLogsService.cs | 109 +
.../Services/Recruitment/MessageService.cs | 64 +
.../Recruitment/OperationLogsService.cs | 228 ++
.../Recruitment/OrderDetailService.cs | 18 +
.../Services/Recruitment/OrderService.cs | 18 +
.../Services/Recruitment/OrganizeService.cs | 154 ++
.../Recruitment/PaymentRecordService.cs | 93 +
.../Services/Recruitment/RechargeService.cs | 164 ++
.../Recruitment/RecruitmentService.cs | 282 +++
.../Services/Recruitment/RegionService.cs | 69 +
.../Recruitment/RoleAuthorizeService.cs | 132 +
.../Services/Recruitment/RoleDataService.cs | 29 +
.../Services/Recruitment/RoleService.cs | 118 +
.../Recruitment/StatisticalService.cs | 132 +
.../Services/Recruitment/SystemTypeService.cs | 109 +
.../Services/Recruitment/UploadFileService.cs | 69 +
.../Services/Recruitment/UserService.cs | 173 ++
.../Recruitment/WxUserRelationService.cs | 53 +
.../Yuebon.Security.Core.csproj | 92 +
.../Znyc.Cloudcar.Admin.Security.Core.csproj | 81 +
.../CommonService/Download/CodeRecord.cs | 15 +
.../CommonService/Download/Config.cs | 21 +
.../CommonService/Download/ConfigHelper.cs | 107 +
.../CommonService/EventService.cs | 166 ++
.../CommonService/FixWeixinBugWeixinResult.cs | 139 +
.../CommonService/LocationService.cs | 92 +
.../Async/CustomMessageHandlerAsync_Events.cs | 29 +
.../CustomMessageContext.cs | 52 +
.../CustomMessageHandler.cs | 580 +++++
.../CustomMessageHandler_Events.cs | 584 +++++
.../OpenCheckMessageHandler.cs | 78 +
.../CustomNetCoreWebSocketMessageHandler.cs | 77 +
.../CustomWxOpenMessageContext.cs | 52 +
.../CustomWxOpenMessageHandler.cs | 83 +
.../OpenTicket/OpenTicketHelper.cs | 38 +
.../WxApplet/WxAppletSubscribeMessage.cs | 132 +
.../CommonService/TemplateMessage.cs | 77 +
.../TemplateMessage/TemplateApi.cs | 132 +
.../WeixinTemplate_ExceptionAlert.cs | 65 +
.../WeixinTemplate_PaySuccess.cs | 29 +
.../WeixinTemplate_Subscription.cs | 35 +
.../WxOpenTemplateMessage_PaySuccessNotice.cs | 55 +
.../CommonService/Utilities/Server.cs | 16 +
.../Model/PostModel.cs | 31 +
.../Model/WxMessage.cs | 14 +
.../Model/WxUserInfo.cs | 73 +
.../PublishProfiles/FolderProfile.pubxml | 13 +
.../Wx/CommonHelper.cs | 313 +++
.../Wx/MessageHelper.cs | 101 +
.../Yuebon.WeChat.Core.csproj | 49 +
.../Znyc.Cloudcar.Admin.WeChat.Core.csproj | 38 +
.../.config/dotnet-tools.json | 12 +
.../Attributes/QuartzAttribute.cs | 48 +
Znyc.Cloudcar.Admin.WebApi/Auth/ApiHandler.cs | 32 +
.../Auth/IApiHandler.cs | 17 +
.../Config/HangFireQueuesConfig.cs | 34 +
.../Controllers/APPController.cs | 123 +
.../Controllers/ActivityController.cs | 143 ++
.../Controllers/AdminUserController.cs | 407 +++
.../Controllers/ApplyJobController.cs | 191 ++
.../Controllers/AreaController.cs | 63 +
.../Controllers/AuditController.cs | 129 +
.../Controllers/BannerController.cs | 174 ++
.../Controllers/CallFeedbackController.cs | 108 +
.../Controllers/CertificationController.cs | 146 ++
.../Controllers/CurrencyController.cs | 27 +
.../Controllers/CurrencyRecordController.cs | 49 +
.../Controllers/DictionaryController.cs | 373 +++
.../Controllers/EquipmentController.cs | 131 +
.../Controllers/ExceptionsLogsController.cs | 81 +
.../Controllers/FeedbackController.cs | 114 +
.../Controllers/FilesController.cs | 297 +++
.../Controllers/FunctionController.cs | 81 +
.../Controllers/IndustryJobsController.cs | 308 +++
.../Controllers/LoginController.cs | 293 +++
.../Controllers/LoginLogsController.cs | 80 +
.../Controllers/MenuController.cs | 328 +++
.../Controllers/OperationLogsController.cs | 85 +
.../Controllers/OrganizeController.cs | 279 ++
.../Controllers/PaymentRecordController.cs | 51 +
.../Controllers/QuartzController.cs | 193 ++
.../Controllers/RechargeController.cs | 146 ++
.../Controllers/RecruitmentController.cs | 189 ++
.../Controllers/RegionController.cs | 83 +
.../Controllers/RoleAuthorizeController.cs | 242 ++
.../Controllers/RoleController.cs | 202 ++
.../Controllers/RoleDataController.cs | 82 +
.../Controllers/StatisticalController.cs | 157 ++
.../Controllers/SysSettingController.cs | 342 +++
.../Controllers/SystemTypeController.cs | 147 ++
.../Controllers/TokenController.cs | 205 ++
.../Controllers/UploadFileController.cs | 72 +
.../Controllers/UserController.cs | 178 ++
.../Controllers/WeixinController.cs | 115 +
Znyc.Cloudcar.Admin.WebApi/Dockerfile | 30 +
Znyc.Cloudcar.Admin.WebApi/Program.cs | 51 +
.../PublishProfiles/FolderProfile.pubxml | 20 +
Znyc.Cloudcar.Admin.WebApi/Startup.cs | 579 +++++
.../Znyc.Cloudcar.Admin.WebApi.csproj | 71 +
.../appsettings.Development.json | 128 +
.../appsettings.Production.json | 119 +
.../appsettings.Staging.json | 117 +
Znyc.Cloudcar.Admin.WebApi/index.html | 87 +
.../log4net.Production.config | 35 +
Znyc.Cloudcar.Admin.WebApi/log4net.config | 35 +
Znyc.Cloudcar.Admin.WebApi/logo.png | Bin 0 -> 9168 bytes
.../wwwroot/favicon.ico | Bin 0 -> 1150 bytes
.../xmlconfig/sys.config | 23 +
Znyc.Cloudcar.AdminNetCore.sln | 67 +
docker/Dockerfile | 11 +
logo.png | Bin 0 -> 41421 bytes
641 files changed, 64357 insertions(+)
create mode 100644 .dockerignore
create mode 100644 .gitattributes
create mode 100644 .gitignore
create mode 100644 Dockerfile
create mode 100644 LICENSE
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/AspNetCore.xml
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/CorsMiddleware.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/ErrCode.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/Initialization.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/MyApiException.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/Permission.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Common/SessionObject.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/ApiController.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/AreaApiController.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ActionFilter.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ExceptionHandlingAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizationFilter.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizeAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/HiddenApiAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/NoPermissionRequiredAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/SwaggerFileUploadFilter.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Mvc/TokenProvider.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Properties/PublishProfiles/FolderProfile.pubxml
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DBConnResult.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DbConnInfo.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/SearchModel.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/UpdateEnableViewModel.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VueCascaderModel.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VuexMenusTree.cs
create mode 100644 Znyc.Cloudcar.Admin.AspNetCore/Znyc.Cloudcar.Admin.AspNetCore.csproj
create mode 100644 Znyc.Cloudcar.Admin.Commons/Attributes/AppDbContextFactoryAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Attributes/ShardingTableAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Attributes/UnitOfWorkAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cache/CacheHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cache/CacheProvider.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cache/ICacheService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cache/MemoryCacheService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cache/RedisCacheService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Commons.csproj
create mode 100644 Znyc.Cloudcar.Admin.Commons/Config/Configs.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Const/CommonConst.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Const/CurrencyConst.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Const/ReturnConst.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/App/App.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/App/HostingStartup.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/App/HttpContextLocal.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Application/BaseApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dapper/DapperDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/AppDBContextAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/DBServerProvider.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/DbConnectionOptions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/WriteAndReadEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/YuebonDbOptions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DataManager/YuebonDbOptionsSetup.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/BaseDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/DbContextFactory.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/DefaultModelBuilder.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/MySqlDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/OracleDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/PostgreSQLDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/SQLiteDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/DbContextCore/SqlServerDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dtos/DeletesInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dtos/IInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dtos/IOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dtos/InputDtoValidateExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Dtos/SearchInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/IDbContextCore.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/IDbContextFactory.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/IMySqlDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/IOracleDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/IPostgreSQLDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/ISQLiteDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IDbContext/ISqlServerDbContext.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IRepositories/IReadOnlyRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IRepositories/IRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/IServices/IService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/BaseEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/BaseViewModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/Entity.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IBaseEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/ICreationAudited.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IDataAuthEnabled.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IDeleteAudited.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IEntityHash.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IExpirable.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IModificationAudited.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Models/IMustHaveTenant.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Module/AutoMapperService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Module/MoudleService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Repositories/BaseRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Core/Services/BaseService.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Cos/CosOptions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Data/Check.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Data/MicroDataTable.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Data/MicroDataTableHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/DependencyInjection/IPrivateDependency.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/DependencyInjection/IScopedDependency.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/DependencyInjection/ISingletonDependency.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/DependencyInjection/ITransientDependency.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/Base64Util.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/Cryptography.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/DEncrypt.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/EncodeHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/EncryptHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/MD5Util.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/QQEncryptUtil.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/RSASecurityHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Encrypt/RSAUtils.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/ActivityStatusEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/BannerTypeEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/CallFeedbackStatusEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/CommonStatus.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/CurrencyEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/DatabaseType.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/DictionaryCodeEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/EquipmentState.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/HandleStatusEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/JobAction.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/JobRunResult.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/LinqExpressionType.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/MsgType.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/PlatformTypeEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/ProductStatusEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/ProductTypeEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/QueryOrderBy.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/UserCertificationEnum.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Enums/UserType.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/ExtDate.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/ExtIEnumerable.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/ExtInt.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/ExtQueryable.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/ExtString.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/Extlong.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extend/Reflect.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/ApiDescriptionExtension.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/AppServiceCollectionExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/CollectionExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/DateTimeExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/EntityFrameworkCoreExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/EnumExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/ExpressionExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/HttpContextExtentions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/ObjectExtension.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/ParameterCheckExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/SessionExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/SqlMapperExtensions.Async.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/SqlMapperExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/TypeExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Extensions/YuebonClaimTypes.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/AppVersionHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/BooleanJsonConverter.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/ByteConvertHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/ConvertHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/CookiesHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/DatetimeJsonConverter.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/DecimalJsonConverter.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/EmojiFilterHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/EntityMapper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/FileHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/FileQuartz.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/GuidUtils.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/HttpContextHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/HttpRequestHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/ImgHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/IntJsonConverter.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/NPOIHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/ObjectReplaceHtmlHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/RuntimeHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/SessionHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/SignHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/StringHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/UpperFirstCaseNamingPolicy.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Helpers/XmlConverter.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/IoC/IoCContainer.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Json/JsonHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Linq/EnumerableExtentions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Log/DbLogType.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Log/Log4netHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Mapping/MapperExtensions.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/IIPAddressParser.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/IPAddressRange.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/IpAddressUtil.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/RemoteIpParser.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/ReversProxyIpParser.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Net/TencentIp.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/AllowCacheApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/AppSetting.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/AssembleTypeConsts.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/CodeGenerateOption.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/DbContextOption.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/JwtOption.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Options/UIConstants.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Page/PageIfno.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Page/PageResult.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Page/PagerHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Properties/PublishProfiles/FolderProfile.pubxml
create mode 100644 Znyc.Cloudcar.Admin.Commons/Properties/Resources.Designer.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Properties/Resources.resx
create mode 100644 Znyc.Cloudcar.Admin.Commons/Result/ResultOutPut.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Result/TokenResult.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/JsTree.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/JsTreeModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/TreeSelect.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/TreeSelectModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/TreeView.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/TreeViewModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Tree/VueRouterModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Commons/Znyc.Cloudcar.Admin.Commons.csproj
create mode 100644 Znyc.Cloudcar.Admin.Hangfire/HangfireDispose.cs
create mode 100644 Znyc.Cloudcar.Admin.Hangfire/TaskJobs/AutoActivityJob.cs
create mode 100644 Znyc.Cloudcar.Admin.Hangfire/TaskJobs/AutoBannerJob.cs
create mode 100644 Znyc.Cloudcar.Admin.Hangfire/TaskJobs/AutoStatisticalJob.cs
create mode 100644 Znyc.Cloudcar.Admin.Hangfire/Znyc.Cloudcar.Admin.Hangfire.csproj
create mode 100644 Znyc.Cloudcar.Admin.MongoDb/Collection/GpsRealTime.cs
create mode 100644 Znyc.Cloudcar.Admin.MongoDb/IRepositorys/IGpsRealTimeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.MongoDb/MongoContext.cs
create mode 100644 Znyc.Cloudcar.Admin.MongoDb/Repositorys/GpsRealTimeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.MongoDb/Znyc.Cloudcar.Admin.MongoDb.Core.csproj
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Application/AreaApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Application/MenuApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Application/UploadFileApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Application/UserApp.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Activity/ActivityAddInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Activity/ActivityOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Activity/ActivityUpdateInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Activity/SearchActivityModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/AdminCurrentUser.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/AdminUser/AdminUserInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/AdminUser/AdminUserOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Api/ApiInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Api/ApiOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/App/AppInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/App/AppOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/ApplyJob/ApplyJobInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/ApplyJob/ApplyJobOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Area/AreaInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Area/AreaOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Area/AreaPickerOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Area/AreaSelect2OutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Audit/AuditInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Audit/AuditOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Banner/BannerInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Banner/BannerOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Banner/BannerUpdateInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Banner/SearchBannerModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CallFeedback/CallFeedbackInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CallFeedback/CallFeedbackOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CallFeedback/SearchCallFeedbackModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Certification/CertificationOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Currency/CurrencyInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Currency/CurrencyOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CurrencyRecord/CurrencyRecordInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CurrencyRecord/CurrencyRecordOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/CurrencyRecord/SearchCurrencyRecordModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/DashboardOutModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Dictionary/DictionaryInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Dictionary/DictionaryListOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Dictionary/DictionaryOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Document/ImageOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Equipment/EquipmentAddInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Equipment/EquipmentOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Equipment/EquipmentUpdateInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Equipment/SearchEquipmentModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/ExceptionsLogs/ExceptionsLogsInPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/ExceptionsLogs/ExceptionsLogsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Feedback/FeedbackInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Feedback/FeedbackOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Feedback/FeedbackPicOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Feedback/SearchFeedbackModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Function/FunctionTreeTableOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Function/ModuleFunctionOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/IndustryJobs/IndustryJobsInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/IndustryJobs/IndustryJobsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/IndustryJobs/IndustryJobsTreeTableDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/LoginLogs/LoginLogsInPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/LoginLogs/LoginLogsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/LoginLogs/SearchLoginLogsModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Menu/MenuInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Menu/MenuOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Menu/MenuTreeTableOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Message/MessageInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Message/MessageLogsInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Message/MessageLogsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Message/MessageOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/OperationLogs/OperationLogsInPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/OperationLogs/OperationLogsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/OperationLogs/SearchOperationLogsModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Order/OrderOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/OrderDetail/OrderDetailOutput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Organize/OrganizeInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Organize/OrganizeOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/PaymentRecord/PaymentRecordInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/PaymentRecord/PaymentRecordOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/PaymentRecord/SearchPaymentRecordModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recharge/RechargeAddInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recharge/RechargeOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recharge/RechargeUpdateInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recharge/SearchRechargeModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/RechargeIntro/RechargeIntroAddInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/RechargeIntro/RechargeIntroOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recruitment/RecruitmentInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recruitment/RecruitmentOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Recruitment/SearchRecruitmentModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Region/RegionOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleAuthorizeDataInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleAuthorizeInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleAuthorizeOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleDataInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleDataOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Role/RoleOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/SecurityProfile.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Statistical/StatisticalInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Statistical/StatisticalListOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/Statistical/StatisticalOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/SysSetting/SysSettingOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/SystemType/SystemTypeInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/SystemType/SystemTypeOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/UploadFile/UploadFileInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/UploadFile/UploadFileOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/UploadFile/UploadFileResultOuputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/SearchUserModel.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserAllListFocusOutPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserExtendInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserExtendOutPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserFocusExtendOutPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserInPutDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserLogOnInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserLogOnOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserOpenIdsInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserOpenIdsOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserThemeInputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/User/UserWithAccessedCtrls.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/WxUnifyUser/WxUnifyUserAddInput.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/WxUnifyUser/WxUnifyUserOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Dtos/WxUserRelation/WxUserRelationOutputDto.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/APPEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/ActivityEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/AdminUserEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/AdminUserLogOnEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/ApiEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/ApplyJobEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/AreaEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/AuditEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/BannerEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/CallFeedbackEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/CertificationEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/CurrencyEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/CurrencyRecordEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/DbLogsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/DictionaryEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/EquipmentEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/EquipmentPictureEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/ExceptionsLogsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/FeedbackEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/FeedbackPicEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/IndustryJobsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/LogEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/LoginLogsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/MenuEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/MessageEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/MessageLogsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/OperationLogsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/OrderDetailEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/OrderEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/OrganizeEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/PaymentRecordEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RechargeEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RechargeIntroEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RecruitmentEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RegionEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RoleAuthorizeEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RoleDataEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/RoleEntityEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/StatisticalEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/SysSettingEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/SystemTypeEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UploadFileEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UserEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UserExtendEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UserFocusEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UserNameCardViewEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/UserOpenIdsEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/WxUnifyUserEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Entitys/WxUserRelationEntity.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IAPPRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IActivityRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IAdminUserLogOnRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IAdminUserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IApiRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IApplyJobRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IAreaRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IAuditRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IBannerRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ICallFeedbackRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ICertificationRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ICurrencyRecordRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ICurrencyRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IDictionaryRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IEquipmentPictureRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IEquipmentRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IExceptionsLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IFeedbackPicRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IFeedbackRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IIndustryJobsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ILoginLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IMenuRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IMessageLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IMessageRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IOperationLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IOrderDetailRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IOrderRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IOrganizeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IPaymentRecordRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRechargeIntroRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRechargeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRecruitmentRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRegionRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRoleAuthorizeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRoleDataRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IRoleRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IStatisticalRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/ISystemTypeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IUploadFileRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IUserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IWxUnifyUserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IRepositories/Recruitment/IWxUserRelationRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IAPPService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IActivityService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IAdminUserLogOnService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IAdminUserService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IApiService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IApplyJobService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IAreaService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IAuditService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IBannerService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ICallFeedbackService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ICertificationService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ICurrencyRecordService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ICurrencyService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IDictionaryService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IEquipmentService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IExceptionsLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IFeedbackService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IIndustryJobsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ILoginLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IMenuService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IMessageLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IMessageService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IOperationLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IOrderDetailService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IOrderService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IOrganizeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IPaymentRecordService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRechargeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRecruitmentService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRegionService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRoleAuthorizeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRoleDataService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IRoleService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IStatisticalService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/ISystemTypeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IUploadFileService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IUserService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/IServices/IWxUserRelationService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/APPRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/ActivityRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/AdminUserLogOnRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/AdminUserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/ApiRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/ApplyJobRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/AreaRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/AuditRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/BannerRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/CallFeedbackRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/CertificationRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/CurrencyRecordRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/CurrencyRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/DictionaryRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/EquipmentPictureRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/EquipmentRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/ExceptionsLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/FeedbackPicRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/FeedbackRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/IndustryJobsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/LoginLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/MenuRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/MessageLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/MessageRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/OperationLogsRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/OrderDetailRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/OrderRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/OrganizeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/PaymentRecordRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RechargeIntroRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RechargeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RecruitmentRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RegionRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RoleAuthorizeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RoleDataRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/RoleRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/StatisticalRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/SystemTypeRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/UploadFileRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/UserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/WxUnifyUserRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Repositories/Recruitment/WxUserRelationRepository.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/APPService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/ActivityService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/AdminUserLogOnService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/AdminUserService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/ApiService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/ApplyJobService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/AreaService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/AuditService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/BannerService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/CallFeedbackService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/CertificationService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/CurrencyRecordService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/CurrencyService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/DictionaryService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/EquipmentService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/ExceptionsLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/FeedbackService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/IndustryJobsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/LoginLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/MenuService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/MessageLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/MessageService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/OperationLogsService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/OrderDetailService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/OrderService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/OrganizeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/PaymentRecordService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RechargeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RecruitmentService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RegionService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RoleAuthorizeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RoleDataService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/RoleService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/StatisticalService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/SystemTypeService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/UploadFileService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/UserService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Services/Recruitment/WxUserRelationService.cs
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Yuebon.Security.Core.csproj
create mode 100644 Znyc.Cloudcar.Admin.Security.Core/Znyc.Cloudcar.Admin.Security.Core.csproj
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/Download/CodeRecord.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/Download/Config.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/Download/ConfigHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/EventService.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/FixWeixinBugWeixinResult.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/LocationService.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/OpenMessageHandler/OpenCheckMessageHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/OpenTicket/OpenTicketHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/SubscribeMessage/WxApplet/WxAppletSubscribeMessage.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage/TemplateApi.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage/WeixinTemplate_ExceptionAlert.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage/WeixinTemplate_PaySuccess.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage/WeixinTemplate_Subscription.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/TemplateMessage/WxOpen/WxOpenTemplateMessage_PaySuccessNotice.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/CommonService/Utilities/Server.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Model/PostModel.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Model/WxMessage.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Model/WxUserInfo.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Properties/PublishProfiles/FolderProfile.pubxml
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Wx/CommonHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Wx/MessageHelper.cs
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Yuebon.WeChat.Core.csproj
create mode 100644 Znyc.Cloudcar.Admin.WeChat.Core/Znyc.Cloudcar.Admin.WeChat.Core.csproj
create mode 100644 Znyc.Cloudcar.Admin.WebApi/.config/dotnet-tools.json
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Attributes/QuartzAttribute.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Auth/ApiHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Auth/IApiHandler.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Config/HangFireQueuesConfig.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/APPController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/ActivityController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/AdminUserController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/ApplyJobController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/AreaController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/AuditController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/BannerController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/CallFeedbackController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/CertificationController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/CurrencyController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/CurrencyRecordController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/DictionaryController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/EquipmentController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/ExceptionsLogsController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/FeedbackController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/FilesController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/FunctionController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/IndustryJobsController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/LoginController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/LoginLogsController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/MenuController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/OperationLogsController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/OrganizeController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/PaymentRecordController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/QuartzController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RechargeController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RecruitmentController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RegionController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RoleAuthorizeController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RoleController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/RoleDataController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/StatisticalController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/SysSettingController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/SystemTypeController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/TokenController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/UploadFileController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/UserController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Controllers/WeixinController.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Dockerfile
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Program.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Properties/PublishProfiles/FolderProfile.pubxml
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Startup.cs
create mode 100644 Znyc.Cloudcar.Admin.WebApi/Znyc.Cloudcar.Admin.WebApi.csproj
create mode 100644 Znyc.Cloudcar.Admin.WebApi/appsettings.Development.json
create mode 100644 Znyc.Cloudcar.Admin.WebApi/appsettings.Production.json
create mode 100644 Znyc.Cloudcar.Admin.WebApi/appsettings.Staging.json
create mode 100644 Znyc.Cloudcar.Admin.WebApi/index.html
create mode 100644 Znyc.Cloudcar.Admin.WebApi/log4net.Production.config
create mode 100644 Znyc.Cloudcar.Admin.WebApi/log4net.config
create mode 100644 Znyc.Cloudcar.Admin.WebApi/logo.png
create mode 100644 Znyc.Cloudcar.Admin.WebApi/wwwroot/favicon.ico
create mode 100644 Znyc.Cloudcar.Admin.WebApi/xmlconfig/sys.config
create mode 100644 Znyc.Cloudcar.AdminNetCore.sln
create mode 100644 docker/Dockerfile
create mode 100644 logo.png
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..3729ff0
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6e62cc8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,316 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+bin/
+obj/
+logs/
+upload/
+*.[pdb]
+**/bin/**
+**/obj/**
+.vs/*
+**/wwwroot/Generatecode/**
+**/wwwroot/upload/**
+
+
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]ogs/
+app_data/
+[Aa]pps/
+[Bb]in/
+[Oo]bj/
+app_data/
+[Aa]pps/
+**/[Bb]in/**
+**/[Oo]bj/**
+**.cache
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+**/Properties/launchSettings.json
+**.cache
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# vue
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+package-lock.json
+tests/**/coverage/
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+#*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+*.dll
+/Yuebon.Api/Yuebon.WebApi/wwwroot/upload
+/Yuebon.Api/Yuebon.WebApi/upload/opp/20190912
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816150498189370_300x300.jpeg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816150498189370.jpeg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816130781914822_300x300.jpeg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816130781914822.jpeg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816104345142749_300x300.jpg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816104345142749.jpg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816092171662104_300x300.jpg
+/Yuebon.Manager/Yuebon.WebApp/wwwroot/upload/cqinwn/opp/2019/11/18/2019111816092171662104.jpg
+/Yuebon.NetCore/Yuebon.Commons/Core/DataManager/DbAppSettings.cs
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..11bbb18
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,30 @@
+#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
+WORKDIR /app
+EXPOSE 8091
+EXPOSE 443
+
+ENV TZ=Asia/Shanghai
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+WORKDIR /src
+COPY ["Znyc.Cloudcar.Admin.WebApi/Znyc.Cloudcar.Admin.WebApi.csproj", "Znyc.Cloudcar.Admin.WebApi/"]
+COPY ["Znyc.Cloudcar.Admin.Security.Core/Znyc.Cloudcar.Admin.Security.Core.csproj", "Znyc.Cloudcar.Admin.Security.Core/"]
+COPY ["Znyc.Cloudcar.Admin.Commons/Znyc.Cloudcar.Admin.Commons.csproj", "Znyc.Cloudcar.Admin.Commons/"]
+COPY ["Znyc.Cloudcar.Admin.WeChat.Core/Znyc.Cloudcar.Admin.WeChat.Core.csproj", "Znyc.Cloudcar.Admin.WeChat.Core/"]
+COPY ["Znyc.Cloudcar.Admin.MongoDb/Znyc.Cloudcar.Admin.MongoDb.Core.csproj", "Znyc.Cloudcar.Admin.MongoDb/"]
+COPY ["Znyc.Cloudcar.Admin.AspNetCore/Znyc.Cloudcar.Admin.AspNetCore.csproj", "Znyc.Cloudcar.Admin.AspNetCore/"]
+RUN dotnet restore "Znyc.Cloudcar.Admin.WebApi/Znyc.Cloudcar.Admin.WebApi.csproj"
+COPY . .
+WORKDIR "/src/Znyc.Cloudcar.Admin.WebApi"
+RUN dotnet build "Znyc.Cloudcar.Admin.WebApi.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "Znyc.Cloudcar.Admin.WebApi.csproj" -c Release -o /app/publish
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "Znyc.Cloudcar.Admin.WebApi.dll"]
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..36b877e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 znyc_recruitment
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/AspNetCore.xml b/Znyc.Cloudcar.Admin.AspNetCore/AspNetCore.xml
new file mode 100644
index 0000000..017b1d9
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/AspNetCore.xml
@@ -0,0 +1,804 @@
+
+
+
+
+ Znyc.Cloudcar.Admin.AspNetCore
+
+
+
+
+ 错误代码描述
+
+
+
+
+ 请求成功
+
+
+
+
+ 请求成功代码0
+
+
+
+
+ 请求失败
+
+
+
+
+ 请求失败代码1
+
+
+
+
+ 获取access_token时AppID或AppSecret错误。请开发者认真比对appid和AppSecret的正确性,或查看是否正在为恰当的应用调用接口
+
+
+
+
+ 调用接口的服务器URL地址不正确,请联系供应商进行设置
+
+
+
+
+ 请确保grant_type字段值为client_credential
+
+
+
+
+ 不合法的凭证类型
+
+
+
+
+ 用户令牌accesstoken超时失效
+
+
+
+
+ 您未被授权使用该功能,请重新登录试试或联系管理员进行处理
+
+
+
+
+ 传递参数出现错误
+
+
+
+
+ 更新数据失败
+
+
+
+
+ 更新数据失败
+
+
+
+
+ 物理删除数据失败
+
+
+
+
+ 该用户不存在
+
+
+
+
+ 该用户已存在
+
+
+
+
+ 会员注册失败
+
+
+
+
+ 查询数据不存在
+
+
+
+
+ 自定义异常信息
+
+
+
+
+ 异常消息
+
+
+
+
+ 成功状态
+
+
+
+
+ 提示代码
+
+
+
+
+ 异常
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sso验证
+ 其他站点通过后台Post来认证
+ 或使用静态类Znyc.Cloudcar.Admin.Security.Application.SSO.AuthHelper访问
+
+
+
+
+ 检验token是否有效
+
+ The token.
+ 请求Id备用参数.
+
+
+
+ 根据token获取用户及用户可访问的所有资源
+
+
+ 备用参数.
+
+
+
+ 根据token获取用户名称
+
+
+ 备用参数.
+
+
+
+ 登录接口
+
+ 登录参数
+
+
+
+
+ 注销登录
+
+
+ 备用参数.
+
+
+
+ 获取token
+
+
+
+
+
+ 文件上传
+
+
+
+
+
+
+
+
+
+ 单文件上传接口
+
+
+ 服务器存储的文件信息
+
+
+
+ 批量上传文件接口
+
+
+ 服务器存储的文件信息
+
+
+
+ 批量上传文件
+
+ 文件
+ 所属应用,如文章article
+ 所属应用ID,如文章id
+
+
+
+
+ 单个上传文件
+
+
+
+
+
+
+ 实现文件上传到服务器保存,并生成缩略图
+
+ 文件名称
+ 文件字节流
+
+
+
+ Identity控制器
+
+
+
+
+
+
+
+
+
+ 用户登录接口控制器
+
+
+
+
+ 构造函数注入服务
+
+
+
+
+
+ 登录验证用户
+
+ 用户名
+ 密码
+ 返回Url
+ 返回用户User对象
+
+
+
+ Token令牌接口控制器
+
+
+
+
+
+
+
+
+
+
+ 根据应用信息获得token令牌
+
+ 获取access_token填写client_credential
+ 用户唯一凭证,应用AppId
+ 应用密钥AppSecret
+
+
+
+
+ 验证token的合法性。
+
+
+
+
+
+
+ 刷新token。
+
+
+
+
+
+
+ 把object对象转换为ContentResult
+
+
+
+
+
+
+ WebApi控制器基类
+
+
+
+
+ 当前登录的用户属性
+
+
+
+
+ 把object对象转换为ContentResult
+
+
+
+
+
+
+ 验证token的合法性。如果不合法,返回MyApiException异常
+
+
+
+
+
+ 获取token
+
+
+
+
+
+ 基本控制器,增删改查
+
+ 实体类型
+ Service类型
+
+
+
+ 服务接口
+
+
+
+
+ 构造方法
+
+
+
+
+
+ 在插入数据前对数据的修改操作
+
+
+
+
+
+
+ 在更新数据前对数据的修改操作
+
+
+
+
+
+
+ 在软删除数据前对数据的修改操作
+
+
+
+
+
+
+ 异步新增数据
+
+
+
+
+
+
+ 异步更新数据
+
+
+ 主键Id
+
+
+
+
+ 物理删除
+
+ 主键Id
+
+
+
+ 异步物理删除
+
+ 主键Id
+
+
+
+ 软删除信息
+
+ 主键Id
+ 删除标识,默认为1:即设为删除,0:未删除
+
+
+
+ 异步软删除信息
+
+ 主键Id
+ 删除标识,默认为1:即设为删除,0:未删除
+
+
+
+ 设为数据有效性
+
+ 主键Id
+ 有效标识,默认为1:即设为无效,0:有效
+
+
+
+ 异步设为数据有效性
+
+ 主键Id
+ 有效标识,默认为1:即设为无效,0:有效
+
+
+
+ 根据主键Id获取一个对象信息
+
+ 主键Id
+
+
+
+
+ 根据条件查询数据库,并返回对象集合(用于分页数据显示)
+
+ info
+ 指定对象的集合
+
+
+
+ 根据Request参数获取分页对象数据
+
+
+
+
+
+ 获取分页操作的查询条件
+
+
+
+
+
+ 表示一个特性,该特性用于全局捕获程序运行异常信息。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Swagger 上传文件过滤器
+
+
+
+
+ 应用过滤器
+
+
+
+
+
+
+ 隐藏接口,不生成到swagger文档展示
+
+
+
+
+ 隐藏接口,不生成到swagger文档展示
+
+
+
+
+ 实现Apply方法
+
+
+
+
+
+
+ 功能权限授权验证
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 权限
+
+
+
+
+ 构造函数
+
+
+
+
+
+ Token令牌提供类
+
+
+
+
+ 构造函数
+
+
+
+
+ 构造函数,初花jwtmodel
+
+
+
+
+
+ 直接通过appid和加密字符串获取访问令牌接口
+
+ 获取access_token填写client_credential
+ 用户唯一凭证
+ 用户唯一凭证密钥,即appsecret
+
+
+
+
+ 检查用户的Token有效性
+
+ token令牌
+
+
+
+
+ 根据用户获取token
+
+
+
+
+
+
+ 根据URL中的Token参数或Cookie获取token
+
+
+
+
+
+ 检查用户登录状态
+
+ token
+ 备注信息
+
+
+
+
+ 检查用户登录状态
+ 通过URL中的Token参数或Cookie中的Token
+
+ 备注信息
+
+
+
+ 获取当前登录的用户信息
+ 通过URL中的Token参数或Cookie中的Token
+
+ The remark.
+ LoginUserVM.
+
+
+
+ 获取当前登录的用户名
+ 通过URL中的Token参数或Cookie中的Token
+
+ The remark.
+ System.String.
+
+
+
+ 登录接口
+
+ 应用程序key.
+ 应用程序Secret.
+ 用户名
+ 密码
+ System.String.
+
+
+
+ 注销
+
+
+
+
+ 登录返回结果
+
+
+
+
+ 跳转Url
+
+
+
+
+ token
+
+
+
+
+ 系统登录请求实体
+
+
+
+
+ 账号
+
+
+
+
+ 密码
+
+
+
+
+ 系统编码
+
+
+
+
+ 用户登录验证,主要用管理后台、H5和App应用用户登录
+
+
+
+
+
+
+ 获取到的凭证值
+
+
+
+
+ 获取到的凭证值
+
+
+
+
+ 用户ID
+
+
+
+
+ 用户账号
+
+
+
+
+ 用户名
+
+
+
+
+ 昵称
+
+
+
+
+ 头像
+
+
+
+
+ 性别
+
+
+
+
+ 头像
+
+
+
+
+ 上级推广员
+
+
+
+
+ 注册时间
+
+
+
+
+ 角色编码,多个角色,使用“,”分格
+
+
+
+
+ 其他对象
+
+
+
+
+ 查询条件公共实体类
+
+
+
+
+ 关键词
+
+
+
+
+ 排序方式 默认asc
+
+
+
+
+ 排序字段 默认Id
+
+
+
+
+ 第几页
+
+
+
+
+ 每页显示数量
+
+
+
+
+ SessionObject是登录之后,给客户端传回的对象
+
+
+
+
+ SessionKey
+
+
+
+
+ 当前登录的用户的信息
+
+
+
+
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/CorsMiddleware.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/CorsMiddleware.cs
new file mode 100644
index 0000000..dc3a8b7
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/CorsMiddleware.cs
@@ -0,0 +1,49 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading.Tasks;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Common
+{
+ ///
+ /// 跨域中间件
+ /// 解决net core 3.1 跨域 Cors 找不到 “Access-Control-Allow-Origin”
+ ///
+ public class CorsMiddleware
+ {
+ ///
+ ///
+ private readonly RequestDelegate _next;
+
+ ///
+ ///
+ ///
+ public CorsMiddleware(RequestDelegate next)
+ {
+ _next = next;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public async Task Invoke(HttpContext httpContext)
+ {
+ if (!httpContext.Response.Headers.ContainsKey("Access-Control-Allow-Origin"))
+ {
+ httpContext.Response.Headers.Add("Access-Control-Allow-Origin", "*");
+ }
+
+ await _next(httpContext);
+ }
+ }
+
+ ///
+ ///
+ public static class CorsMiddlewareExtensions
+ {
+ public static IApplicationBuilder UseCorsMiddleware(this IApplicationBuilder builder)
+ {
+ return builder.UseMiddleware();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/ErrCode.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/ErrCode.cs
new file mode 100644
index 0000000..ee3cd1e
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/ErrCode.cs
@@ -0,0 +1,115 @@
+namespace Znyc.Cloudcar.Admin.AspNetCore.Entitys
+{
+ ///
+ /// 错误代码描述
+ ///
+ public static class ErrCode
+ {
+ ///
+ /// 请求成功
+ ///
+ public static string err0 = "请求成功";
+
+ ///
+ /// 请求成功代码0
+ ///
+ public static string successCode = "0";
+
+ ///
+ /// 请求失败
+ ///
+ public static string err1 = "请求失败";
+
+ ///
+ /// 请求失败代码1
+ ///
+ public static string failCode = "1";
+
+ ///
+ /// 获取access_token时AppID或AppSecret错误。请开发者认真比对appid和AppSecret的正确性,或查看是否正在为恰当的应用调用接口
+ ///
+ public static string err40001 =
+ "获取access_token时AppID或AppSecret错误。请开发者认真比对appid和AppSecret的正确性,或查看是否正在为恰当的应用调用接口";
+
+ ///
+ /// 调用接口的服务器URL地址不正确,请联系供应商进行设置
+ ///
+ public static string err40002 = "调用接口的服务器URL地址不正确,请联系供应商进行授权";
+
+ ///
+ /// 请确保grant_type字段值为client_credential
+ ///
+ public static string err40003 = "请确保grant_type字段值为client_credential";
+
+ ///
+ /// 不合法的凭证类型
+ ///
+ public static string err40004 = "不合法的凭证类型";
+
+ ///
+ /// 用户令牌accesstoken超时失效
+ ///
+ public static string err40005 = "用户令牌accesstoken超时失效";
+
+ ///
+ /// 您未被授权使用该功能,请重新登录试试或联系管理员进行处理
+ ///
+ public static string err40006 = "您未被授权使用该功能,请重新登录试试或联系系统管理员进行处理";
+
+ ///
+ /// 传递参数出现错误
+ ///
+ public static string err40007 = "传递参数出现错误";
+
+ ///
+ /// 用户未登录或超时
+ ///
+ public static string err40008 = "用户未登录或超时";
+
+ ///
+ /// 程序异常
+ ///
+ public static string err40110 = "程序异常";
+
+ ///
+ /// 新增数据失败
+ ///
+ public static string err43001 = "新增数据失败";
+
+ ///
+ /// 更新数据失败
+ ///
+ public static string err43002 = "更新数据失败";
+
+ ///
+ /// 物理删除数据失败
+ ///
+ public static string err43003 = "删除数据失败";
+
+ ///
+ /// 该用户不存在
+ ///
+ public static string err50001 = "该数据不存在";
+
+ ///
+ /// 该用户已存在
+ ///
+ public static string err50002 = "用户已存在,请登录或重新注册!";
+
+ ///
+ /// 会员注册失败
+ ///
+ public static string err50003 = "会员注册失败";
+
+ ///
+ /// 查询数据不存在
+ ///
+ public static string err60001 = "查询数据不存在";
+
+
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/Initialization.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/Initialization.cs
new file mode 100644
index 0000000..687a932
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/Initialization.cs
@@ -0,0 +1,25 @@
+using Znyc.Cloudcar.Admin.Commons.Cache;
+using Znyc.Cloudcar.Admin.Commons.Helpers;
+using Znyc.Cloudcar.Admin.Security.Entitys;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Common
+{
+ ///
+ /// 系统初始化内容
+ ///
+ public abstract class Initialization
+ {
+ ///
+ /// 初始化
+ ///
+ public virtual void Initial()
+ {
+ CacheHelper cacheHelper = new CacheHelper();
+ SysSettingEntity sysSetting = XmlConverter.Deserialize("xmlconfig/sys.config");
+ if (sysSetting != null)
+ {
+ cacheHelper.Add("SysSetting", sysSetting);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/MyApiException.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/MyApiException.cs
new file mode 100644
index 0000000..12627c6
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/MyApiException.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Common
+{
+ ///
+ /// 自定义异常信息
+ ///
+ public class MyApiException : Exception
+ {
+ ///
+ /// 异常
+ ///
+ ///
+ public MyApiException(string message)
+ {
+ Msg = message;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public MyApiException(string message, string errcode)
+ {
+ Msg = message;
+ ErrCode = errcode;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public MyApiException(string message, bool success, string errcode)
+ {
+ Msg = message;
+ Success = success;
+ ErrCode = errcode;
+ }
+
+ ///
+ ///
+ public MyApiException()
+ {
+ }
+
+ ///
+ ///
+ ///
+ ///
+ protected MyApiException(SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public MyApiException(string message, Exception innerException) : base(message, innerException)
+ {
+ Msg = message;
+ throw innerException;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public MyApiException(string message, string errcode, Exception innerException) : base(message, innerException)
+ {
+ Msg = message;
+ ErrCode = errcode;
+ throw innerException;
+ }
+
+ ///
+ /// 异常消息
+ ///
+ public string Msg { get; set; }
+
+ ///
+ /// 成功状态
+ ///
+ public bool Success { get; set; }
+
+ ///
+ /// 提示代码
+ ///
+ public string ErrCode { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/Permission.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/Permission.cs
new file mode 100644
index 0000000..91d893c
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/Permission.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Linq;
+using Znyc.Cloudcar.Admin.Commons.Cache;
+using Znyc.Cloudcar.Admin.Commons.Json;
+using Znyc.Cloudcar.Admin.Security.Dtos;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Common
+{
+ ///
+ /// 权限控制
+ ///
+ public static class Permission
+ {
+ ///
+ /// 判断当前用户是否拥有某功能点的权限
+ ///
+ /// 功能编码code
+ /// 用户id
+ ///
+ public static bool HasFunction(string functionCode, int userId)
+ {
+ bool hasFunction = false;
+ if (!string.IsNullOrEmpty(userId.ToString()))
+ {
+ if (string.IsNullOrEmpty(functionCode))
+ {
+ hasFunction = true;
+ }
+ else
+ {
+ System.Collections.Generic.List listFunction = new CacheHelper().Get("User_Function_" + userId).ToJson()
+ .ToList();
+ if (listFunction != null && listFunction.Count(t => t.EnCode == functionCode) > 0)
+ {
+ hasFunction = true;
+ }
+ }
+ }
+
+ return hasFunction;
+ }
+
+ ///
+ /// 判断是否为系统管理员或超级管理员
+ ///
+ /// true:系统管理员或超级管理员,false:不是系统管理员或超级管理员
+ ///
+ ///
+ public static bool IsAdmin(AdminCurrentUser AdminCurrentUser)
+ {
+ bool blnIsAdmin = false;
+ if (AdminCurrentUser != null)
+ {
+ if (AdminCurrentUser.Account == "admin" ||
+ AdminCurrentUser.Role.Contains("administrators", StringComparison.Ordinal))
+ {
+ return true;
+ }
+ }
+
+ return blnIsAdmin;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Common/SessionObject.cs b/Znyc.Cloudcar.Admin.AspNetCore/Common/SessionObject.cs
new file mode 100644
index 0000000..3f61b31
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Common/SessionObject.cs
@@ -0,0 +1,20 @@
+using Znyc.Cloudcar.Admin.Security.Entitys;
+
+namespace Znyc.Cloudcar.Admin.WebApi.Common
+{
+ ///
+ /// SessionObject是登录之后,给客户端传回的对象
+ ///
+ public class SessionObject
+ {
+ ///
+ /// SessionKey
+ ///
+ public string SessionKey { get; set; }
+
+ ///
+ /// 当前登录的用户的信息
+ ///
+ public AdminUserEntity LogonUser { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/ApiController.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/ApiController.cs
new file mode 100644
index 0000000..f7aa7a4
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/ApiController.cs
@@ -0,0 +1,253 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Cors;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Controllers;
+using Microsoft.AspNetCore.Mvc.Filters;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Security.Claims;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Unicode;
+using Znyc.Cloudcar.Admin.AspNetCore.Common;
+using Znyc.Cloudcar.Admin.AspNetCore.Entitys;
+using Znyc.Cloudcar.Admin.AspNetCore.Mvc;
+using Znyc.Cloudcar.Admin.AspNetCore.Mvc.Filter;
+using Znyc.Cloudcar.Admin.Commons.Cache;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Extensions;
+using Znyc.Cloudcar.Admin.Commons.Helpers;
+using Znyc.Cloudcar.Admin.Commons.Json;
+using Znyc.Cloudcar.Admin.Commons.Log;
+using Znyc.Cloudcar.Admin.Commons.Pages;
+using Znyc.Cloudcar.Admin.Security.Dtos;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Controllers
+{
+ ///
+ /// WebApi控制器基类
+ ///
+ [ApiController]
+ [EnableCors("Cors")]
+ public class ApiController : Controller
+ {
+ ///
+ /// 当前登录的用户属性
+ ///
+ public AdminCurrentUser CurrentUser;
+
+ #region
+
+ ///
+ /// 重写基类在Action执行之前的事情
+ /// 根据token获得当前用户,允许匿名的不需要获取用户
+ ///
+ /// 重写方法的参数
+ public override void OnActionExecuting(ActionExecutingContext context)
+ {
+ try
+ {
+ ControllerActionDescriptor controllerActionDescriptor = context.ActionDescriptor as ControllerActionDescriptor;
+ //匿名访问,不需要token认证、签名和登录
+ Attribute allowanyone =
+ controllerActionDescriptor.MethodInfo.GetCustomAttribute(typeof(AllowAnonymousAttribute), true);
+ if (allowanyone != null)
+ {
+ return;
+ }
+
+ CommonResult result = new CommonResult();
+ //需要token认证
+ string authHeader = context.HttpContext.Request.Headers["Authorization"]; //Header中的token
+ if (string.IsNullOrEmpty(authHeader))
+ {
+ result.ErrCode = "40004";
+ result.ErrMsg = ErrCode.err40004;
+ context.Result = ToJsonContent(result);
+ }
+ else
+ {
+ string token = string.Empty;
+ if (authHeader != null && authHeader.StartsWith("Bearer ", StringComparison.Ordinal))
+ {
+ token = authHeader.Substring(7);
+ }
+
+ TokenProvider tokenProvider = new TokenProvider();
+ result = tokenProvider.ValidateToken(token);
+ //token验证失败
+ if (!result.Success)
+ {
+ context.Result = ToJsonContent(result);
+ }
+ else
+ {
+ #region 是否需要验证用户登录以及相关的功能权限
+
+ //是否需要用户登录
+ Attribute isDefined =
+ controllerActionDescriptor.MethodInfo.GetCustomAttribute(
+ typeof(NoPermissionRequiredAttribute));
+ //不需要登录
+ if (isDefined != null)
+ {
+ return;
+ }
+ //需要登录和验证功能权限
+ if (result.ResData != null)
+ {
+ List claimlist = result.ResData as List;
+ string userId = claimlist[3].Value;
+
+ Claim[] claims =
+ {
+ new(ZnycClaimTypes.UserId, userId),
+ new(ZnycClaimTypes.UserName, claimlist[2].Value),
+ new(ZnycClaimTypes.Role, claimlist[4].Value)
+ };
+ ClaimsIdentity identity = new ClaimsIdentity(claims);
+ ClaimsPrincipal principal = new ClaimsPrincipal(identity);
+ context.HttpContext.User = principal;
+ CacheHelper yuebonCacheHelper = new CacheHelper();
+ AdminCurrentUser user = yuebonCacheHelper.Get("login_user_" + userId);
+ if (user != null)
+ {
+ CurrentUser = user;
+ }
+
+ bool isAdmin = Permission.IsAdmin(user);
+ if (!isAdmin)
+ {
+ IEnumerable authorizeAttributes = controllerActionDescriptor.MethodInfo
+ .GetCustomAttributes(typeof(FunctionAuthorizeAttribute), true)
+ .OfType();
+ if (authorizeAttributes.FirstOrDefault() != null)
+ {
+ string function = authorizeAttributes.First().Function;
+ if (!string.IsNullOrEmpty(function))
+ {
+ string functionCode = controllerActionDescriptor.ControllerName + "/" + function;
+
+ bool bl = Permission.HasFunction(functionCode, userId.ToInt());
+ if (!bl)
+ {
+ result.ErrCode = "40006";
+ result.ErrMsg = ErrCode.err40006;
+ context.Result = ToJsonContent(result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ result.ErrCode = "40008";
+ result.ErrMsg = ErrCode.err40008;
+ context.Result = ToJsonContent(result);
+ }
+
+ #endregion 是否需要验证用户登录以及相关的功能权限
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Log4NetHelper.Error("", ex);
+ }
+ }
+
+ #endregion
+
+ ///
+ /// 把object对象转换为ContentResult
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("api/ToJsonContent")]
+ protected IActionResult ToJsonContent(object obj)
+ {
+ return Content(obj.ToJson());
+ }
+
+ ///
+ /// 把object对象转换为ContentResult
+ ///
+ /// 转换对象
+ /// 是否忽略空值
+ ///
+ [HttpPost]
+ [Route("api/ToJsonContent")]
+ protected IActionResult ToJsonContent(object obj, bool isNull = false)
+ {
+ JsonSerializerOptions options = new JsonSerializerOptions
+ {
+ WriteIndented = true, //格式化json字符串
+ AllowTrailingCommas = true, //可以结尾有逗号
+ IgnoreNullValues = true, //可以有空值,转换json去除空值属性
+ IgnoreReadOnlyProperties = true, //忽略只读属性
+ PropertyNameCaseInsensitive = true, //忽略大小写
+ Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
+ };
+ options.Converters.Add(new DateTimeJsonConverter());
+ return Content(JsonSerializer.Serialize(obj, options));
+ }
+
+ ///
+ /// 根据Request参数获取分页对象数据
+ ///
+ ///
+ protected virtual PagerInfo GetPagerInfo()
+ {
+ int pageSize = Request.Query["length"].ToString() == null ? 1 : Request.Query["length"].ToString().ToInt();
+ int pageIndex = 1;
+ string currentPage = Request.Query["CurrentPage"].ToString();
+ if (string.IsNullOrWhiteSpace(currentPage))
+ {
+ string start = Request.Query["start"].ToString();
+ if (!string.IsNullOrWhiteSpace(start))
+ {
+ pageIndex = start.ToInt() / pageSize + 1;
+ }
+ }
+ else
+ {
+ pageIndex = currentPage.ToInt();
+ }
+
+ PagerInfo pagerInfo = new PagerInfo
+ {
+ CurrenetPageIndex = pageIndex,
+ PageSize = pageSize
+ };
+ return pagerInfo;
+ }
+
+ ///
+ /// 获取token
+ ///
+ ///
+ [HttpGet("GetToken")]
+ [HiddenApi]
+ public string GetToken()
+ {
+ string token = HttpContext.Request.Query["Token"];
+ if (!string.IsNullOrEmpty(token))
+ {
+ return token;
+ }
+
+ string authHeader = HttpContext.Request.Headers["Authorization"]; //Header中的token
+ if (authHeader != null && authHeader.StartsWith("Bearer"))
+ {
+ token = authHeader.Substring("Bearer ".Length).Trim();
+ return token;
+ }
+
+ string cookie = HttpContext.Request.Cookies["Token"];
+ return cookie == null ? string.Empty : cookie;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/AreaApiController.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/AreaApiController.cs
new file mode 100644
index 0000000..808c816
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/AreaApiController.cs
@@ -0,0 +1,373 @@
+using Microsoft.AspNetCore.Mvc;
+using System;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Commons.IServices;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Controllers
+{
+ ///
+ /// 基本控制器,增删改查
+ ///
+ /// 实体类型
+ /// 数据输出实体类型
+ /// 数据输入实体类型
+ /// Service类型
+ /// 主键数据类型
+ [ApiController]
+ public abstract class AreaApiController : ApiController
+ where T : Entity
+ where TService : IService
+ where TODto : class
+ where TIDto : class
+ where TKey : IEquatable
+ {
+ #region 属性变量
+
+ ///
+ /// 服务接口
+ ///
+ public TService _service;
+
+ #endregion 属性变量
+
+ #region 构造函数及常用
+
+ ///
+ /// 构造方法
+ ///
+ ///
+ public AreaApiController(TService service)
+ {
+ _service = service;
+ }
+
+ #endregion 构造函数及常用
+
+ #region 查询单个实体
+
+ // ///
+ // /// 根据主键Id获取一个对象信息
+ // ///
+ // /// 主键Id
+ // ///
+ // [HttpGet("GetById")]
+ //// [FunctionAuthorize("")]
+ // //[NoPermissionRequired]
+ // [AllowAnonymous]
+ // public virtual async Task> GetById(TKey id)
+ // {
+ // var result = new CommonResult();
+ // var info = await _service.GetOutDtoAsync(id);
+ // if (info != null)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ResData = info;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err50001;
+ // result.ErrCode = "50001";
+ // }
+
+ // return result;
+ // }
+
+ #endregion 查询单个实体
+
+ //#region 返回集合的接口
+
+ /////
+ ///// 根据条件查询数据库,并返回对象集合(用于分页数据显示)
+ /////
+ ///// 查询条件
+ ///// 指定对象的集合
+ //[HttpPost("FindWithPager")]
+ //[FunctionAuthorize("List")]
+ //public virtual CommonResult> FindWithPager(SearchInputDto search)
+ //{
+ // var result = new CommonResult>();
+ // result.ResData = _service.FindWithPager(search);
+ // result.ErrCode = ErrCode.successCode;
+ // return result;
+ //}
+
+ /////
+ ///// 根据条件查询数据库,并返回对象集合(用于分页数据显示)
+ /////
+ /////
+ /////
+ //[HttpPost("FindWithPagerAsync")]
+ //[FunctionAuthorize("List")]
+ //public virtual async Task>> FindWithPagerAsync(SearchInputDto search)
+ //{
+ // var result = new CommonResult>();
+ // result.ResData = await _service.FindWithPagerAsync(search);
+ // result.ErrCode = ErrCode.successCode;
+ // return result;
+ //}
+
+ ///
+ /// 获取所有可用的
+ ///
+ ///
+ //[HttpGet("GetAllEnable")]
+ //[FunctionAuthorize("List")]
+ //public virtual async Task>> GetAllEnable()
+ //{
+ // var result = new CommonResult>();
+ // var list = await _service.GetAllByIsNotDeleteAndEnabledMarkAsync();
+ // var resultList = list.MapTo();
+ // result.ResData = resultList;
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+
+ // return result;
+ //}
+
+ #region 公共添加、修改、删除、软删除接口
+
+ ///
+ /// 在插入数据前对数据的修改操作
+ ///
+ ///
+ ///
+ protected virtual void OnBeforeInsert(T info)
+ {
+ //留给子类对参数对象进行修改
+ }
+
+ ///
+ /// 在更新数据前对数据的修改操作
+ ///
+ ///
+ ///
+ protected virtual void OnBeforeUpdate(T info)
+ {
+ //留给子类对参数对象进行修改
+ }
+
+ ///
+ /// 在软删除数据前对数据的修改操作
+ ///
+ ///
+ ///
+ protected virtual void OnBeforeSoftDelete(T info)
+ {
+ //留给子类对参数对象进行修改
+ }
+
+ /////
+ ///// 异步新增数据,无效
+ /////
+ /////
+ /////
+ //[HttpPost("Insert")]
+ //[FunctionAuthorize("Add")]
+ //public virtual async Task InsertAsync(TIDto tinfo)
+ //{
+ // var result = new CommonResult();
+ // var info = tinfo.MapTo();
+ // OnBeforeInsert(info);
+ // long ln = await _service.InsertAsync(info).ConfigureAwait(false);
+ // if (ln > 0)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43001;
+ // result.ErrCode = "43001";
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 异步更新数据,需要在业务模块控制器重写该方法,否则更新无效
+ /////
+ /////
+ /////
+ //[HttpPost("Update")]
+ //[FunctionAuthorize("Edit")]
+ //public virtual async Task UpdateAsync(TIDto inInfo)
+ //{
+ // var result = new CommonResult();
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 物理删除
+ /////
+ ///// 主键Id
+ //[HttpDelete("Delete")]
+ //[FunctionAuthorize("Delete")]
+ //public virtual IActionResult Delete(TKey id)
+ //{
+ // var result = new CommonResult();
+ // var bl = _service.Delete(id);
+ // if (bl)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43003;
+ // result.ErrCode = "43003";
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 异步物理删除
+ /////
+ ///// 主键Id
+ //[HttpDelete("DeleteAsync")]
+ //[FunctionAuthorize("Delete")]
+ //public virtual async Task DeleteAsync(TKey id)
+ //{
+ // var result = new CommonResult();
+ // var bl = await _service.DeleteAsync(id).ConfigureAwait(false);
+ // if (bl)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43003;
+ // result.ErrCode = "43003";
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 异步批量物理删除
+ /////
+ /////
+ //[HttpDelete("DeleteBatchAsync")]
+ //[FunctionAuthorize("Delete")]
+ //public virtual async Task DeleteBatchAsync(DeletesInputDto info)
+ //{
+ // var result = new CommonResult();
+ // var where = string.Empty;
+ // if (typeof(TKey) == typeof(string))
+ // @where = "id in ('" + info.Ids.Join(",").Trim(',').Replace(",", "','") + "')";
+ // else if (typeof(TKey) == typeof(int)) @where = "id in (" + info.Ids.Join(",") + ")";
+ // if (!string.IsNullOrEmpty(where))
+ // {
+ // var bl = await _service.DeleteBatchWhereAsync(where).ConfigureAwait(false);
+ // if (bl)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43003;
+ // result.ErrCode = "43003";
+ // }
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 软删除信息
+ /////
+ ///// 主键Id
+ ///// 删除标识,默认为1:即设为删除,0:未删除
+ //[HttpPost("DeleteSoft")]
+ //[FunctionAuthorize("DeleteSoft")]
+ //public virtual IActionResult DeleteSoft(TKey id, string bltag = "1")
+ //{
+ // var result = new CommonResult();
+ // var bl = false;
+ // if (bltag == "0") bl = true;
+ // var blResult = _service.DeleteSoft(bl, id, CurrentUser.UserId);
+ // if (blResult)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43002;
+ // result.ErrCode = "43002";
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ ///
+ /// 异步软删除信息
+ ///
+ /// 主键Id
+ /// 删除标识,默认为1:即设为删除,0:未删除
+ //[HttpDelete("DeleteSoftAsync")]
+ //[FunctionAuthorize("DeleteSoft")]
+ //public virtual async Task DeleteSoftAsync(TKey id, string bltag = "1")
+ //{
+ // var result = new CommonResult();
+ // var bl = false;
+ // if (bltag == "0") bl = true;
+
+ // var blResult = await _service.DeleteSoftAsync(bl, id, CurrentUser.UserId);
+ // if (blResult)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43002;
+ // result.ErrCode = "43002";
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ /////
+ ///// 异步批量软删除信息
+ /////
+ /////
+ /////
+ //[HttpDelete("DeleteSoftBatchAsync")]
+ //[FunctionAuthorize("DeleteSoft")]
+ //public virtual async Task DeleteSoftBatchAsync(UpdateEnableViewModel info)
+ //{
+ // var result = new CommonResult();
+ // var where = string.Empty;
+ // if (typeof(int) == typeof(string))
+ // @where = "id in ('" + info.Ids.Join(",").Trim(',').Replace(",", "','") + "')";
+ // else if (typeof(int) == typeof(int)) @where = "id in (" + info.Ids.Join(",") + ")";
+
+ // if (!string.IsNullOrEmpty(where))
+ // {
+ // var bl = false;
+ // if (info.Flag == "1") bl = true;
+
+ // var blResult = await _service.DeleteSoftBatchAsync(bl, where, CurrentUser.UserId);
+ // if (blResult)
+ // {
+ // result.ErrCode = ErrCode.successCode;
+ // result.ErrMsg = ErrCode.err0;
+ // }
+ // else
+ // {
+ // result.ErrMsg = ErrCode.err43002;
+ // result.ErrCode = "43002";
+ // }
+ // }
+
+ // return ToJsonContent(result);
+ //}
+
+ #endregion 公共添加、修改、删除、软删除接口
+
+ // #endregion
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ActionFilter.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ActionFilter.cs
new file mode 100644
index 0000000..0c05bcb
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ActionFilter.cs
@@ -0,0 +1,149 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using Newtonsoft.Json;
+using StackExchange.Profiling;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Text;
+using System.Threading.Tasks;
+using Znyc.Cloudcar.Admin.Commons.Core.App;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Security.Dtos;
+using Znyc.Cloudcar.Admin.Security.Entitys;
+using Znyc.Cloudcar.Admin.Security.IServices;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc.Filter
+{
+ ///
+ ///
+ public class ActionFilter : IAsyncActionFilter
+ {
+ private readonly IOperationLogsService _operationLogsService = App.GetService();
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
+ {
+ MiniProfiler profiler = MiniProfiler.StartNew("StartNew");
+ using (profiler.Step("Level1"))
+ {
+ // WriteLog(profiler);
+
+ //执行Action
+ await next();
+ }
+ // await WriteOperationLog(context, next);
+
+ //WriteLog(profiler);
+ }
+
+ public async Task WriteOperationLog(ActionExecutingContext context, ActionExecutionDelegate next)
+ {
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ ActionExecutedContext actionExecutedContext = await next();
+ sw.Stop();
+
+ //操作参数
+ string args = JsonConvert.SerializeObject(context.ActionArguments);
+ //操作结果
+ // var result = JsonConvert.SerializeObject(actionResult?.Value);
+
+ try
+ {
+ OperationLogsEntity input = new OperationLogsEntity
+ {
+ UserName = new AdminCurrentUser().Name ?? "",
+ CreatedTime = DateTime.Now,
+ OperationTime = DateTime.Now,
+ CreatedUserId = new AdminCurrentUser().UserId,
+ RequestUrl = args,
+ OS = "PC",
+ IP = new AdminCurrentUser().CurrentLoginIP ?? "",
+ City = new AdminCurrentUser().IPAddressName ?? "",
+ CRUD = context.HttpContext.Request.Method.ToLower(),
+ Browser = "",
+ RequertData = "",
+ UserAgent = context.RouteData.Values["controller"].ToString()
+ // context.HttpContext.Request.Method.ToLower(),
+ // context.ActionDescriptor.AttributeRouteInfo.Template.ToLower(),
+ // sw.ElapsedMilliseconds
+ };
+
+ if (actionExecutedContext.Result is ObjectResult result && result.Value is CommonResult res)
+ {
+ input.RequertData = res.ErrCode;
+ }
+ //input.Msg = res.Success;
+ await _operationLogsService.InsertAsync(input);
+ }
+ catch (Exception)
+ {
+ // _logger.LogError("操作日志插入异常:{@ex}", ex);
+ }
+ }
+
+ ///
+ /// sql跟踪
+ /// 下载:MiniProfiler.AspNetCore
+ ///
+ ///
+ private void WriteLog(MiniProfiler profiler)
+ {
+ if (profiler?.Root != null)
+ {
+ Timing root = profiler.Root;
+ if (root.HasChildren)
+ {
+ GetSqlLog(root.Children);
+ }
+ }
+ }
+
+ ///
+ /// 递归获取MiniProfiler内容
+ ///
+ ///
+ private void GetSqlLog(List chil)
+ {
+ chil.ForEach(chill =>
+ {
+ if (chill.CustomTimings?.Count > 0)
+ {
+ StringBuilder logSql = new StringBuilder();
+ foreach (KeyValuePair> customTiming in chill.CustomTimings)
+ {
+ int i = 1;
+ customTiming.Value?.ForEach(value =>
+ {
+ if (value.ExecuteType != "OpenAsync" && !value.CommandString.Contains("Connection"))
+ {
+ logSql.Append(
+ $"【{customTiming.Key}{i++}】{value.CommandString} 耗时 :{value.DurationMilliseconds} ms,状态 :{(value.Errored ? "失败" : "成功")}");
+ }
+ });
+ }
+
+ Console.WriteLine($"sql+{logSql}");
+ //var logEntity = new Log();
+ //logEntity.Date = logEntity.CreatedTime = DateTime.Now;
+ //logEntity.Type = "SQL";
+ //logEntity.Result = true;
+ //logEntity.Description = logSql.ToString();
+ //_logService.Insert(logEntity);
+ }
+ else
+ {
+ if (chill.Children != null)
+ {
+ GetSqlLog(chill.Children);
+ }
+ }
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ExceptionHandlingAttribute.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ExceptionHandlingAttribute.cs
new file mode 100644
index 0000000..cc07bd2
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/ExceptionHandlingAttribute.cs
@@ -0,0 +1,102 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Security.Claims;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Unicode;
+using Yitter.IdGenerator;
+using Znyc.Cloudcar.Admin.AspNetCore.Common;
+using Znyc.Cloudcar.Admin.Commons.Cache;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Helpers;
+using Znyc.Cloudcar.Admin.Commons.Json;
+using Znyc.Cloudcar.Admin.Commons.Log;
+using Znyc.Cloudcar.Admin.Security.Dtos;
+using Znyc.Cloudcar.Admin.Security.Entitys;
+using Znyc.Cloudcar.Admin.Security.Repositories;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc.Filter
+{
+ ///
+ /// 表示一个特性,该特性用于全局捕获程序运行异常信息。
+ ///
+ public class ExceptionHandlingAttribute : ExceptionFilterAttribute
+ {
+ private readonly ExceptionsLogsRepository _exceptionsLogs = new();
+
+ ///
+ ///
+ ///
+ public override void OnException(ExceptionContext context)
+ {
+ Exception exception = context.Exception;
+ AdminCurrentUser CurrentUser = new AdminCurrentUser();
+ string requestPath = context.HttpContext.Request.Path.ToString();
+ string queryString = context.HttpContext.Request.QueryString.ToString();
+ Type type = MethodBase.GetCurrentMethod().DeclaringType;
+ string exDesc = requestPath + queryString;
+ Log4NetHelper.Error(type, "全局捕获程序运行异常信息\n\r" + exDesc, context.Exception);
+ CommonResult result = new CommonResult();
+ if (exception is MyApiException myApiex)
+ {
+ context.HttpContext.Response.StatusCode = 200;
+ context.ExceptionHandled = true;
+ result.ErrMsg = myApiex.Msg;
+ result.ErrCode = myApiex.ErrCode;
+ }
+ else
+ {
+ result.ErrMsg = "程序异常,服务端出现异常![异常消息]" + exception.Message;
+ result.ErrCode = "500";
+ }
+
+ JsonSerializerOptions options = new JsonSerializerOptions
+ {
+ WriteIndented = true, //格式化json字符串
+ AllowTrailingCommas = true, //可以结尾有逗号
+ //IgnoreNullValues = true, //可以有空值,转换json去除空值属性
+ IgnoreReadOnlyProperties = true, //忽略只读属性
+ PropertyNameCaseInsensitive = true, //忽略大小写
+ //PropertyNamingPolicy = JsonNamingPolicy.CamelCase //命名方式是默认还是CamelCase
+ Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
+ };
+ options.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss"));
+ context.Result = new JsonResult(result, options);
+ ExceptionsLogsEntity exceptionsLogs = new ExceptionsLogsEntity();
+ IEnumerable identities = context.HttpContext.User.Identities;
+ ClaimsIdentity claimsIdentity = identities.First();
+ if (claimsIdentity != null)
+ {
+ List claimlist = claimsIdentity.Claims as List;
+ if (claimlist.Count > 0)
+ {
+ string userId = claimlist[0].Value;
+ CacheHelper cacheHelper = new CacheHelper();
+ AdminCurrentUser user = cacheHelper.Get("login_user_" + userId).ToJson().ToObject();
+ if (user != null)
+ {
+ CurrentUser = user;
+ }
+
+ exceptionsLogs.Id = YitIdHelper.NextId();
+ exceptionsLogs.AppDomainName = requestPath;
+ exceptionsLogs.ErrorPage = queryString;
+ exceptionsLogs.UserName = CurrentUser.Name;
+ exceptionsLogs.IP = CurrentUser.CurrentLoginIP;
+ exceptionsLogs.ExceptionType = exception.GetType().Name;
+ exceptionsLogs.Message = exception.Message;
+ exceptionsLogs.StackTrace = exception.StackTrace;
+ exceptionsLogs.ExceptionTime = exceptionsLogs.CreatedTime = DateTime.Now;
+ exceptionsLogs.CreatedTime = DateTime.Now;
+ exceptionsLogs.CreatedUserId = CurrentUser.UserId;
+ exceptionsLogs.IsDeleted = false;
+ _exceptionsLogs.Insert(exceptionsLogs);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizationFilter.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizationFilter.cs
new file mode 100644
index 0000000..24afc5c
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizationFilter.cs
@@ -0,0 +1,74 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Controllers;
+using Microsoft.AspNetCore.Mvc.Filters;
+using System.Reflection;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Unicode;
+using Znyc.Cloudcar.Admin.AspNetCore.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Helpers;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc
+{
+ ///
+ /// 功能权限授权验证
+ ///
+ public class FunctionAuthorizationFilter : AuthorizeAttribute, IAuthorizationFilter
+ {
+ ///
+ /// 授权验证
+ ///
+ ///
+ public void OnAuthorization(AuthorizationFilterContext context)
+ {
+ ControllerActionDescriptor controllerActionDescriptor = context.ActionDescriptor as ControllerActionDescriptor;
+ //匿名访问,不需要token认证、签名和登录
+ System.Attribute allowanyone =
+ controllerActionDescriptor.MethodInfo.GetCustomAttribute(typeof(AllowAnonymousAttribute), true);
+ if (allowanyone != null)
+ {
+ return;
+ }
+
+ CommonResult result = new CommonResult();
+ JsonSerializerOptions options = new JsonSerializerOptions
+ {
+ WriteIndented = true, //格式化json字符串
+ AllowTrailingCommas = true, //可以结尾有逗号
+ //IgnoreNullValues = true, //可以有空值,转换json去除空值属性
+ IgnoreReadOnlyProperties = true, //忽略只读属性
+ PropertyNameCaseInsensitive = true, //忽略大小写
+ //PropertyNamingPolicy = JsonNamingPolicy.CamelCase //命名方式是默认还是CamelCase
+ Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
+ };
+ options.Converters.Add(new DateTimeJsonConverter());
+
+ //需要token认证
+ string authHeader = context.HttpContext.Request.Headers["Authorization"]; //Header中的token
+ if (string.IsNullOrEmpty(authHeader))
+ {
+ result.ErrCode = "40004";
+ result.ErrMsg = ErrCode.err40004;
+ context.Result = new JsonResult(result, options);
+ }
+ else
+ {
+ string token = string.Empty;
+ if (authHeader != null)
+ {
+ token = authHeader.Substring(7);
+ }
+
+ TokenProvider tokenProvider = new TokenProvider();
+ result = tokenProvider.ValidateToken(token);
+ //token验证失败
+ if (!result.Success)
+ {
+ context.Result = new JsonResult(result, options);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizeAttribute.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizeAttribute.cs
new file mode 100644
index 0000000..b64fa15
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/FunctionAuthorizeAttribute.cs
@@ -0,0 +1,26 @@
+using Microsoft.AspNetCore.Mvc.Filters;
+using System;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc
+{
+ ///
+ /// 功能权限属性配置
+ ///
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
+ public class FunctionAuthorizeAttribute : ActionFilterAttribute
+ {
+ ///
+ /// 构造函数
+ ///
+ /// 功能代码
+ public FunctionAuthorizeAttribute(string function)
+ {
+ Function = function;
+ }
+
+ ///
+ /// 功能权限
+ ///
+ public string Function { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/HiddenApiAttribute.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/HiddenApiAttribute.cs
new file mode 100644
index 0000000..1bac58f
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/HiddenApiAttribute.cs
@@ -0,0 +1,49 @@
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using System;
+using System.Linq;
+using System.Reflection;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc
+{
+ ///
+ /// 隐藏接口,不生成到swagger文档展示
+ ///
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
+ public class HiddenApiAttribute : Attribute
+ {
+ }
+
+ ///
+ /// 隐藏接口,不生成到swagger文档展示
+ ///
+ public class HiddenApiFilter : IDocumentFilter
+ {
+ ///
+ /// 实现Apply方法
+ ///
+ ///
+ ///
+ public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext documentFilterContext)
+ {
+ foreach (Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription apiDescription in documentFilterContext.ApiDescriptions)
+ {
+ if (apiDescription.TryGetMethodInfo(out MethodInfo methodInfo))
+ {
+ if (methodInfo.GetCustomAttributes().OfType()
+ .Any())
+ {
+ string key = "/" + apiDescription.RelativePath.TrimEnd('/');
+ if (key.Contains("?"))
+ {
+ int idx = key.IndexOf("?", StringComparison.Ordinal);
+ key = key.Substring(0, idx);
+ }
+
+ swaggerDoc.Paths.Remove(key);
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/NoPermissionRequiredAttribute.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/NoPermissionRequiredAttribute.cs
new file mode 100644
index 0000000..f5d7b30
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/NoPermissionRequiredAttribute.cs
@@ -0,0 +1,18 @@
+using Microsoft.AspNetCore.Mvc.Filters;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc.Filter
+{
+ ///
+ /// 不需要权限验证,不需要登录
+ ///
+ public class NoPermissionRequiredAttribute : ActionFilterAttribute
+ {
+ ///
+ ///
+ ///
+ public override void OnActionExecuting(ActionExecutingContext filterContext)
+ {
+ base.OnActionExecuting(filterContext);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/SwaggerFileUploadFilter.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/SwaggerFileUploadFilter.cs
new file mode 100644
index 0000000..0e0d5ad
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/Filter/SwaggerFileUploadFilter.cs
@@ -0,0 +1,55 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using System;
+using System.Linq;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc.Filter
+{
+ ///
+ /// Swagger 上传文件过滤器
+ ///
+ public class SwaggerFileUploadFilter : IOperationFilter
+ {
+ ///
+ /// 应用过滤器
+ ///
+ ///
+ ///
+ public void Apply(OpenApiOperation operation, OperationFilterContext context)
+ {
+ {
+ #region 文件上传处理
+
+ if (!context.ApiDescription.HttpMethod.Equals("POST", StringComparison.OrdinalIgnoreCase) &&
+ !context.ApiDescription.HttpMethod.Equals("PUT", StringComparison.OrdinalIgnoreCase))
+ {
+ return;
+ }
+
+ System.Collections.Generic.List fileParameters = context.ApiDescription.ActionDescriptor.Parameters
+ .Where(n => n.ParameterType == typeof(IFormFile)).ToList();
+ if (fileParameters.Count < 0)
+ {
+ return;
+ }
+
+ foreach (Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor fileParameter in fileParameters)
+ {
+ OpenApiParameter parameter = operation.Parameters.Single(n => n.Name == fileParameter.Name);
+ operation.Parameters.Remove(parameter);
+ operation.Parameters.Add(new OpenApiParameter
+ {
+ Name = parameter.Name,
+ In = ParameterLocation.Header, //"formData",
+ Description = parameter.Description,
+ Required = parameter.Required,
+ Content = parameter.Content
+ });
+ }
+
+ #endregion 文件上传处理
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Mvc/TokenProvider.cs b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/TokenProvider.cs
new file mode 100644
index 0000000..dcbe956
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Mvc/TokenProvider.cs
@@ -0,0 +1,220 @@
+using IdentityModel;
+using Microsoft.IdentityModel.Tokens;
+using System;
+using System.Collections.Generic;
+using System.IdentityModel.Tokens.Jwt;
+using System.Security.Claims;
+using System.Text;
+using Znyc.Cloudcar.Admin.AspNetCore.Common;
+using Znyc.Cloudcar.Admin.AspNetCore.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Core.App;
+using Znyc.Cloudcar.Admin.Commons.Entitys;
+using Znyc.Cloudcar.Admin.Commons.Log;
+using Znyc.Cloudcar.Admin.Commons.Options;
+using Znyc.Cloudcar.Admin.Security.Entitys;
+using Znyc.Cloudcar.Admin.Security.IServices;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.Mvc
+{
+ ///
+ /// Token令牌提供类
+ ///
+ public class TokenProvider
+ {
+ private readonly JwtOption _jwtModel = App.GetService();
+ private readonly IRoleService _roleService = App.GetService();
+
+ ///
+ /// 构造函数
+ ///
+ public TokenProvider()
+ {
+ }
+
+ ///
+ /// 构造函数,初花jwtmodel
+ ///
+ ///
+ public TokenProvider(JwtOption jwtModel)
+ {
+ _jwtModel = jwtModel;
+ }
+
+ ///
+ /// 直接通过appid和加密字符串获取访问令牌接口
+ ///
+ /// 获取access_token填写client_credential
+ /// 用户唯一凭证AppId
+ /// 用户唯一凭证密钥,即appsecret
+ ///
+ public TokenResult GenerateToken(string granttype, string appid, string secret)
+ {
+ byte[] keyByteArray = Encoding.UTF8.GetBytes(secret);
+ SymmetricSecurityKey signingKey = new SymmetricSecurityKey(keyByteArray);
+ DateTime expires = DateTime.UtcNow.Add(TimeSpan.FromMinutes(_jwtModel.Expiration));
+ SigningCredentials signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256);
+ SecurityTokenDescriptor tokenDescripor = new SecurityTokenDescriptor
+ {
+ Subject = new ClaimsIdentity(new[]
+ {
+ new(JwtClaimTypes.Audience, appid),
+ new Claim(JwtClaimTypes.Issuer, _jwtModel.Issuer),
+ new Claim(JwtClaimTypes.Subject, GrantType.ClientCredentials)
+ }, granttype),
+ Expires = expires,
+ //对称秘钥SymmetricSecurityKey
+ //签名证书(秘钥,加密算法)SecurityAlgorithms
+ SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(keyByteArray),
+ SecurityAlgorithms.HmacSha256Signature)
+ };
+ JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();
+ SecurityToken token = tokenHandler.CreateToken(tokenDescripor);
+ string tokenString = tokenHandler.WriteToken(token);
+ TokenResult result = new TokenResult
+ {
+ AccessToken = tokenString,
+ ExpiresIn = (int)TimeSpan.FromMinutes(_jwtModel.Expiration).TotalMinutes
+ };
+ return result;
+ }
+
+ ///
+ /// 检查用户的Token有效性
+ ///
+ /// token令牌
+ ///
+ public CommonResult ValidateToken(string token)
+ {
+ //返回的结果对象
+ CommonResult result = new CommonResult();
+ if (!string.IsNullOrEmpty(token))
+ {
+ try
+ {
+ JwtSecurityToken jwtToken = new JwtSecurityTokenHandler().ReadJwtToken(token);
+ if (jwtToken != null)
+ {
+ #region 检查令牌对象内容
+
+ DateTime now = DateTime.UtcNow;
+ DateTime refreshTime = jwtToken.ValidFrom;
+ refreshTime = refreshTime.Add(TimeSpan.FromMinutes(_jwtModel.refreshJwtTime));
+ if (now > refreshTime && jwtToken.Issuer == _jwtModel.Issuer)
+ {
+ result.ErrMsg = ErrCode.err40005;
+ result.ErrCode = "40005";
+ }
+ else
+ {
+ if (jwtToken.Subject == GrantType.Password)
+ {
+ List claimlist = jwtToken?.Payload.Claims as List;
+ result.ResData = claimlist;
+ }
+
+ result.ErrMsg = ErrCode.err0;
+ result.ErrCode = ErrCode.successCode;
+ }
+
+ #endregion 检查令牌对象内容
+ }
+ else
+ {
+ result.ErrMsg = ErrCode.err40004;
+ result.ErrCode = "40004";
+ }
+ }
+ catch (Exception ex)
+ {
+ Log4NetHelper.Error("验证token异常", ex);
+ throw new MyApiException(ErrCode.err40004, "40004");
+ }
+ }
+ else
+ {
+ result.ErrMsg = ErrCode.err40004;
+ result.ErrCode = "40004";
+ }
+
+ return result;
+ }
+
+ ///
+ /// 根据用户获取token
+ ///
+ /// 用户信息
+ /// 应用Id
+ ///
+ public TokenResult LoginToken(AdminUserEntity userInfo, string appid)
+ {
+ JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();
+ byte[] key = Encoding.UTF8.GetBytes(_jwtModel.Secret);
+ DateTime authTime = DateTime.UtcNow; //授权时间
+ DateTime expires = authTime.Add(TimeSpan.FromMinutes(_jwtModel.Expiration)); //过期时间
+ SecurityTokenDescriptor tokenDescripor = new SecurityTokenDescriptor
+ {
+ Subject = new ClaimsIdentity(new[]
+ {
+ new(JwtClaimTypes.Audience, appid),
+ new Claim(JwtClaimTypes.Issuer, _jwtModel.Issuer),
+ new Claim(JwtClaimTypes.Name, userInfo.Account),
+ new Claim(JwtClaimTypes.Id, userInfo.Id.ToString()),
+ new Claim(JwtClaimTypes.Role, _roleService.GetRoleEnCode(userInfo.RoleId.ToString())),
+ new Claim(JwtClaimTypes.Subject, GrantType.Password)
+ }),
+ Expires = expires,
+ //对称秘钥SymmetricSecurityKey
+ //签名证书(秘钥,加密算法)SecurityAlgorithms
+ SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key),
+ SecurityAlgorithms.HmacSha256Signature)
+ };
+ SecurityToken token = tokenHandler.CreateToken(tokenDescripor);
+ string tokenString = tokenHandler.WriteToken(token);
+ TokenResult result = new TokenResult
+ {
+ AccessToken = tokenString,
+ ExpiresIn = (int)TimeSpan.FromMinutes(_jwtModel.Expiration).TotalMinutes
+ };
+ return result;
+ }
+
+ ///
+ /// 根据登录用户获取token
+ ///
+ /// 用户信息
+ /// 应用Id
+ ///
+ public TokenResult GetUserToken(AdminUserEntity userInfo, string appid)
+ {
+ JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();
+ byte[] key = Encoding.UTF8.GetBytes(_jwtModel.Secret);
+ DateTime authTime = DateTime.UtcNow; //授权时间
+ DateTime expires = authTime.Add(TimeSpan.FromMinutes(_jwtModel.Expiration)); //过期时间
+ SecurityTokenDescriptor tokenDescripor = new SecurityTokenDescriptor
+ {
+ Subject = new ClaimsIdentity(new[]
+ {
+ new(JwtClaimTypes.Audience, appid),
+ new Claim(JwtClaimTypes.Issuer, _jwtModel.Issuer),
+ new Claim(JwtClaimTypes.Name, userInfo.Account),
+ new Claim(JwtClaimTypes.Id, userInfo.Id.ToString()),
+ new Claim(JwtClaimTypes.Role, userInfo.RoleId.ToString()),
+ new Claim(JwtClaimTypes.Subject, GrantType.Password)
+ }),
+ Expires = expires,
+ //对称秘钥SymmetricSecurityKey
+ //签名证书(秘钥,加密算法)SecurityAlgorithms
+ SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key),
+ SecurityAlgorithms.HmacSha256Signature)
+ };
+ SecurityToken token = tokenHandler.CreateToken(tokenDescripor);
+ string tokenString = tokenHandler.WriteToken(token);
+ TokenResult result = new TokenResult
+ {
+ AccessToken = tokenString,
+ ExpiresIn = (int)TimeSpan.FromMinutes(_jwtModel.Expiration).TotalMinutes
+ };
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Properties/PublishProfiles/FolderProfile.pubxml b/Znyc.Cloudcar.Admin.AspNetCore/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 0000000..377dd20
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,16 @@
+
+
+
+
+ False
+ False
+ True
+ Release
+ Any CPU
+ FileSystem
+ bin\Release\net6.0\publish\
+ FileSystem
+
+
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DBConnResult.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DBConnResult.cs
new file mode 100644
index 0000000..8e716d8
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DBConnResult.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// 数据库连接返回结果实体
+ ///
+ [Serializable]
+ public class DBConnResult
+ {
+ ///
+ /// 未加密字符串
+ ///
+ [DataMember]
+ public string ConnStr { get; set; }
+
+ ///
+ /// 数据库名称
+ ///
+ [DataMember]
+ public string EncryptConnStr { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DbConnInfo.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DbConnInfo.cs
new file mode 100644
index 0000000..0a1cb42
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/DbConnInfo.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// 数据库连接字符串实体
+ ///
+ [Serializable]
+ public class DbConnInfo
+ {
+ ///
+ /// 访问地址
+ ///
+ [DataMember]
+ public string DbAddress { get; set; }
+
+ ///
+ /// 端口,默认SQLServer为1433;Mysql为3306
+ ///
+ [DataMember]
+ public int DbPort { get; set; }
+
+ ///
+ /// 数据库名称
+ ///
+ [DataMember]
+ public string DbName { get; set; }
+
+ ///
+ /// 用户名
+ ///
+ [DataMember]
+ public string DbUserName { get; set; }
+
+ ///
+ /// 访问密码
+ ///
+ [DataMember]
+ public string DbPassword { get; set; }
+
+ ///
+ /// 数据库类型
+ ///
+ [DataMember]
+ public string DbType { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/SearchModel.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/SearchModel.cs
new file mode 100644
index 0000000..e827337
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/SearchModel.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Runtime.Serialization;
+using Znyc.Cloudcar.Admin.Commons.Pages;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// 查询条件公共实体类
+ ///
+ [Serializable]
+ [DataContract]
+ public class SearchModel : PagerInfo
+ {
+ ///
+ /// 关键词
+ ///
+ public string Keywords { get; set; }
+
+ ///
+ /// 编码/代码
+ ///
+ public string EnCode { get; set; }
+
+ ///
+ /// 排序方式 默认asc
+ ///
+ public string Order { get; set; }
+
+ ///
+ /// 排序字段 默认Id
+ ///
+ public string Sort { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/UpdateEnableViewModel.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/UpdateEnableViewModel.cs
new file mode 100644
index 0000000..1891b2f
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/UpdateEnableViewModel.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// 批量更新操作传入参数,如设为禁用、有效、软删除;
+ /// 物理删除操作是Flag无效不用传参
+ ///
+ [Serializable]
+ public class UpdateEnableViewModel
+ {
+ ///
+ /// 主键Id集合
+ ///
+ public dynamic[] Ids { get; set; }
+
+ ///
+ /// 有效标识,默认为1:即设为无效,0:有效
+ ///
+ public string Flag { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VueCascaderModel.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VueCascaderModel.cs
new file mode 100644
index 0000000..577b725
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VueCascaderModel.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// Vue Cascader 级联选择模型
+ ///
+ [Serializable]
+ public class VueCascaderModel
+ {
+ ///
+ /// 值
+ ///
+ public string value { get; set; }
+
+ ///
+ /// 显示名称
+ ///
+ public string label { get; set; }
+
+ ///
+ /// 子集
+ ///
+ public List children { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VuexMenusTree.cs b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VuexMenusTree.cs
new file mode 100644
index 0000000..a368f13
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/ViewModel/VuexMenusTree.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+
+namespace Znyc.Cloudcar.Admin.AspNetCore.ViewModel
+{
+ ///
+ /// Vuex菜单模型
+ ///
+ [Serializable]
+ public class VuexMenusTreeModel
+ {
+ ///
+ /// 字符串,对应当前路由的路径,总是解析为绝对路径
+ ///
+ public string path { get; set; }
+
+ ///
+ /// 命名视图组件
+ ///
+ public string component { get; set; }
+
+ ///
+ /// 重定向地址,在面包屑中点击会重定向去的地址
+ ///
+ public string redirect { get; set; }
+
+ ///
+ /// 设定路由的名字,一定要填写不然使用keep-alive时会出现各种问题
+ ///
+ public string name { get; set; }
+
+ ///
+ /// 在根路由设置权限,这样它下面所以的子路由都继承了这个权限
+ ///
+ public Meta meta { get; set; }
+
+ ///
+ /// 子菜单
+ ///
+ public List children { get; set; }
+ }
+
+ ///
+ /// VuexMenus路由模型
+ ///
+ [Serializable]
+ public class VuexMenus
+ {
+ ///
+ /// 访问路径
+ ///
+ public string path { get; set; }
+
+ ///
+ /// 对应模块
+ ///
+ public string component { get; set; }
+
+ ///
+ /// 重定向地址,在面包屑中点击会重定向去的地址
+ ///
+ public string redirect { get; set; }
+
+ ///
+ /// 设定路由的名字,一定要填写不然使用keep-alive时会出现各种问题
+ ///
+ public string name { get; set; }
+
+ ///
+ ///
+ public Meta meta { get; set; }
+ }
+
+ ///
+ /// 路由元信息模型
+ ///
+ [Serializable]
+ public class Meta
+ {
+ ///
+ /// 设置该路由在侧边栏和面包屑中展示的名字
+ ///
+ public string title { get; set; }
+
+ ///
+ /// 设置该路由的图标
+ ///
+ public string icon { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.AspNetCore/Znyc.Cloudcar.Admin.AspNetCore.csproj b/Znyc.Cloudcar.Admin.AspNetCore/Znyc.Cloudcar.Admin.AspNetCore.csproj
new file mode 100644
index 0000000..42c2b83
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.AspNetCore/Znyc.Cloudcar.Admin.AspNetCore.csproj
@@ -0,0 +1,73 @@
+
+
+
+ net6.0
+
+ Library
+
+
+
+
+ Znyc.Admin
+ true
+ true
+ 1.0
+
+ true
+ true
+
+ true
+ Znyc.Recruitment.Admin.AspNetCore
+
+ 1.3.1.37
+ MIT
+
+
+ bin\Release\Znyc.Recruitment.Admin.AspNetCore.xml
+ bin\Release\
+
+
+
+ bin\Debug\
+ bin\Debug\Znyc.Recruitment.Admin.AspNetCore.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Attributes/AppDbContextFactoryAttribute.cs b/Znyc.Cloudcar.Admin.Commons/Attributes/AppDbContextFactoryAttribute.cs
new file mode 100644
index 0000000..01efe88
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Attributes/AppDbContextFactoryAttribute.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace Znyc.Cloudcar.Admin.Commons.Attributes
+{
+ ///
+ /// 数据库上下文配置
+ ///
+ public class AppDbContextFactoryAttribute : Attribute
+ {
+ ///
+ ///
+ /// 数据库配置名称
+ public AppDbContextFactoryAttribute(string dbConfigName)
+ {
+ DbConfigName = dbConfigName;
+ }
+
+ ///
+ /// 数据库配置名称
+ ///
+ public string DbConfigName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Attributes/ShardingTableAttribute.cs b/Znyc.Cloudcar.Admin.Commons/Attributes/ShardingTableAttribute.cs
new file mode 100644
index 0000000..9d21151
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Attributes/ShardingTableAttribute.cs
@@ -0,0 +1,39 @@
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Znyc.Cloudcar.Admin.Commons.Attributes
+{
+ ///
+ /// 数据库分表特性
+ ///
+ public class ShardingTableAttribute : TableAttribute
+ {
+ ///
+ ///
+ ///
+ public ShardingTableAttribute(string name) : base(name)
+ {
+ Suffix = "yyyyMMdd";
+ Splitter = "_";
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ShardingTableAttribute(string name, string splitter = "_", string suffix = "yyyyMMdd") : base(name)
+ {
+ Suffix = suffix;
+ }
+
+ ///
+ /// 分隔符
+ ///
+ public string Splitter { get; set; } = "_";
+
+ ///
+ /// 分表后缀格式。默认值:_yyyyMMdd
+ ///
+ public string Suffix { get; set; } = "yyyyMMdd";
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Attributes/UnitOfWorkAttribute.cs b/Znyc.Cloudcar.Admin.Commons/Attributes/UnitOfWorkAttribute.cs
new file mode 100644
index 0000000..b4de7a2
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Attributes/UnitOfWorkAttribute.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Znyc.Cloudcar.Admin.Commons.Attributes
+{
+ ///
+ /// 工作单元
+ /// 仅用来做特性标记
+ ///
+ public class UnitOfWorkAttribute : Attribute
+ {
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Cache/CacheHelper.cs b/Znyc.Cloudcar.Admin.Commons/Cache/CacheHelper.cs
new file mode 100644
index 0000000..a9657b4
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Cache/CacheHelper.cs
@@ -0,0 +1,406 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Znyc.Cloudcar.Admin.Commons.Core.App;
+
+namespace Znyc.Cloudcar.Admin.Commons.Cache
+{
+ ///
+ /// 缓存操作帮助类
+ ///
+ public class CacheHelper
+ {
+ ///
+ /// 缓存提供模式
+ ///
+ private static CacheProvider cacheProvider;
+
+ ///
+ /// 缓存接口
+ ///
+ private readonly ICacheService cacheservice;
+
+ ///
+ ///
+ public CacheHelper()
+ {
+ cacheProvider = App.GetService();
+ if (cacheProvider == null)
+ {
+ throw new ArgumentNullException(nameof(cacheProvider));
+ }
+
+ cacheservice = App.GetService();
+ }
+
+ ///
+ /// 使用MemoryCache缓存操作
+ ///
+ /// 是否使用MemoryCache
+ public CacheHelper(bool isMemoryCache = false)
+ {
+ cacheProvider = App.GetService();
+ if (cacheProvider == null)
+ {
+ throw new ArgumentNullException(nameof(cacheProvider));
+ }
+
+ if (isMemoryCache)
+ {
+ cacheservice = App.GetService();
+ }
+ else
+ {
+ cacheservice = App.GetService();
+ }
+ }
+
+ #region 验证缓存项是否存在
+
+ ///
+ /// 验证缓存项是否存在,TryGetValue 来检测 Key是否存在的
+ ///
+ /// 缓存Key
+ ///
+ public bool Exists(string key)
+ {
+ return cacheservice.Exists(key);
+ }
+
+ #endregion 验证缓存项是否存在
+
+ #region 添加缓存
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ ///
+ public bool Add(string key, object value)
+ {
+ return cacheservice.Add(key, value);
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ public bool Add(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ return cacheservice.Add(key, value, expiresSliding, expiressAbsoulte);
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ public bool Add(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ return cacheservice.Add(key, value, expiresIn, isSliding);
+ }
+
+ #endregion 添加缓存
+
+ #region 删除缓存
+
+ ///
+ /// 删除缓存
+ ///
+ /// 缓存Key
+ ///
+ public bool Remove(string key)
+ {
+ return cacheservice.Remove(key);
+ }
+
+ ///
+ /// 批量删除缓存
+ ///
+ /// 缓存Key集合
+ ///
+ public void RemoveAll(IEnumerable keys)
+ {
+ cacheservice.RemoveAll(keys);
+ }
+
+ ///
+ /// 删除匹配到的缓存
+ ///
+ ///
+ ///
+ public void RemoveByPattern(string pattern)
+ {
+ cacheservice.RemoveByPattern(pattern);
+ }
+
+ ///
+ /// 删除所有缓存
+ ///
+ public void RemoveCacheAll()
+ {
+ cacheservice.RemoveCacheAll();
+ }
+
+ #endregion 删除缓存
+
+ #region 获取缓存
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public T Get(string key) where T : class
+ {
+ return cacheservice.Get(key);
+ }
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public object Get(string key)
+ {
+ return cacheservice.Get(key);
+ }
+
+ ///
+ /// 获取缓存集合
+ ///
+ /// 缓存Key集合
+ ///
+ public IDictionary GetAll(IEnumerable keys)
+ {
+ return cacheservice.GetAll(keys);
+ }
+
+ #endregion 获取缓存
+
+ #region 修改缓存
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ ///
+ public bool Replace(string key, object value)
+ {
+ return cacheservice.Replace(key, value);
+ }
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ public bool Replace(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ return cacheservice.Replace(key, value, expiresSliding, expiressAbsoulte);
+ }
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ public bool Replace(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ return cacheservice.Replace(key, value, expiresIn, isSliding);
+ }
+
+ #endregion 修改缓存
+
+ #region Hash
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HSet(string key, string filed, object value)
+ {
+ return cacheservice.HSet(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HSetAsync(string key, string filed, object value)
+ {
+ return cacheservice.HSetAsync(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HMSetAsync(string key, object[] value)
+ {
+ return cacheservice.HMSetAsync(key, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HMSet(string key, object[] value)
+ {
+ return cacheservice.HMSet(key, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string[] HMGet(string key, string[] filed)
+ {
+ return cacheservice.HMGet(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HMGetAsync(string key, string filed)
+ {
+ return cacheservice.HMGetAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public long HDel(string key, string[] filed)
+ {
+ return cacheservice.HDel(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HDelAsync(string key, string filed)
+ {
+ return cacheservice.HDelAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HExists(string key, string filed)
+ {
+ return cacheservice.HExists(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HExistsAsync(string key, string filed)
+ {
+ return cacheservice.HExistsAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HIncrAsync(string key, string filed)
+ {
+ return cacheservice.HIncrByAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public long HIncr(string key, string filed)
+ {
+ return cacheservice.HIncrBy(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Task> HGetAllAsync(string key)
+ {
+ return cacheservice.HGetAllAsync(key);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Dictionary HGetAll(string key)
+ {
+ return cacheservice.HGetAll(key);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HGetAsync(string key, string filed)
+ {
+ return cacheservice.HGetAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HSetNxAsync(string key, string filed, object value)
+ {
+ return cacheservice.HSetNxAsync(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HSetNx(string key, string filed, object value)
+ {
+ return cacheservice.HSetNx(key, filed, value);
+ }
+
+ #endregion Hash
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Cache/CacheProvider.cs b/Znyc.Cloudcar.Admin.Commons/Cache/CacheProvider.cs
new file mode 100644
index 0000000..95d1b9e
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Cache/CacheProvider.cs
@@ -0,0 +1,23 @@
+namespace Znyc.Cloudcar.Admin.Commons.Cache
+{
+ ///
+ /// 缓存提供模式,使用Redis或MemoryCache
+ ///
+ public class CacheProvider
+ {
+ ///
+ /// 是否使用Redis
+ ///
+ public bool IsUseRedis { get; set; }
+
+ ///
+ /// Redis连接
+ ///
+ public string ConnectionString { get; set; }
+
+ ///
+ /// Redis实例名称
+ ///
+ public string InstanceName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Cache/ICacheService.cs b/Znyc.Cloudcar.Admin.Commons/Cache/ICacheService.cs
new file mode 100644
index 0000000..bf3264f
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Cache/ICacheService.cs
@@ -0,0 +1,305 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Znyc.Cloudcar.Admin.Commons.Cache
+{
+ ///
+ /// 缓存服务接口
+ ///
+ public interface ICacheService
+ {
+ #region 验证缓存项是否存在
+
+ ///
+ /// 验证缓存项是否存在
+ ///
+ /// 缓存Key
+ ///
+ bool Exists(string key);
+
+ #endregion 验证缓存项是否存在
+
+ #region 添加缓存
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ ///
+ bool Add(string key, object value);
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ bool Add(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte);
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ bool Add(string key, object value, TimeSpan expiresIn, bool isSliding = false);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HashSetAsync(string key, string filed, object value);
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ ///
+ Task AddAsync(string key, object value);
+
+ ///
+ /// /
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task AddAsync(string key, object value, TimeSpan expiresIn, bool isSliding = false);
+
+ #endregion 添加缓存
+
+ #region 删除缓存
+
+ ///
+ /// 删除缓存
+ ///
+ /// 缓存Key
+ ///
+ bool Remove(string key);
+
+ ///
+ /// 批量删除缓存
+ ///
+ /// 缓存Key集合
+ ///
+ void RemoveAll(IEnumerable keys);
+
+ ///
+ /// 使用通配符找出所有的key然后逐个删除
+ ///
+ /// 通配符
+ void RemoveByPattern(string pattern);
+
+ ///
+ /// 删除所有缓存
+ ///
+ void RemoveCacheAll();
+
+ ///
+ /// 删除缓存
+ ///
+ /// 缓存Key
+ ///
+ Task RemoveAsync(string key);
+
+ #endregion 删除缓存
+
+ #region 获取缓存
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ T Get(string key) where T : class;
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ object Get(string key);
+
+ ///
+ /// 获取缓存集合
+ ///
+ /// 缓存Key集合
+ ///
+ IDictionary GetAll(IEnumerable keys);
+
+ #endregion 获取缓存
+
+ #region 修改缓存
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ ///
+ bool Replace(string key, object value);
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ bool Replace(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte);
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ bool Replace(string key, object value, TimeSpan expiresIn, bool isSliding = false);
+
+ #endregion 修改缓存
+
+ #region Hash
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ bool HSet(string key, string filed, object value);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HSetAsync(string key, string filed, object value);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HMSetAsync(string key, object[] value);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ bool HMSet(string key, object[] value);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ string[] HMGet(string key, string[] filed);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HMGetAsync(string key, string filed);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ long HDel(string key, string[] filed);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HDelAsync(string key, string filed);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ bool HExists(string key, string filed);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HExistsAsync(string key, string filed);
+
+ ///
+ /// 自增
+ ///
+ ///
+ ///
+ ///
+ Task HIncrByAsync(string key, string filed);
+
+ ///
+ /// 自增
+ ///
+ ///
+ ///
+ ///
+ long HIncrBy(string key, string filed);
+
+ ///
+ /// 获取所有
+ ///
+ ///
+ ///
+ Task> HGetAllAsync(string key);
+
+ ///
+ /// 获取所有
+ ///
+ ///
+ ///
+ Dictionary HGetAll(string key);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HGetAsync(string key, string filed);
+
+ ///
+ /// 设置一个键值对(不存在,则创建;否则,修改)
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task HSetNxAsync(string key, string filed, object value);
+
+ ///
+ /// 设置一个键值对(不存在,则创建;否则,修改)
+ ///
+ ///
+ ///
+ ///
+ ///
+ bool HSetNx(string key, string filed, object value);
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Cache/MemoryCacheService.cs b/Znyc.Cloudcar.Admin.Commons/Cache/MemoryCacheService.cs
new file mode 100644
index 0000000..55a9b98
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Cache/MemoryCacheService.cs
@@ -0,0 +1,594 @@
+using Microsoft.Extensions.Caching.Memory;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+
+namespace Znyc.Cloudcar.Admin.Commons.Cache
+{
+ ///
+ /// MemoryCache缓存操作
+ ///
+ public class MemoryCacheService : ICacheService
+ {
+ ///
+ ///
+ protected IMemoryCache _cache;
+
+ ///
+ ///
+ ///
+ public MemoryCacheService(IMemoryCache cache)
+ {
+ _cache = cache;
+ }
+
+ #region 验证缓存项是否存在
+
+ ///
+ /// 验证缓存项是否存在,TryGetValue 来检测 Key是否存在的
+ ///
+ /// 缓存Key
+ ///
+ public bool Exists(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.TryGetValue(key, out object cached);
+ }
+
+ #endregion 验证缓存项是否存在
+
+ public Task AddAsync(string key, object value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task AddAsync(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task RemoveAsync(string key)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ ///
+ public void Dispose()
+ {
+ if (_cache != null)
+ {
+ _cache.Dispose();
+ }
+
+ GC.SuppressFinalize(this);
+ }
+
+ #region 添加缓存
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ ///
+ public bool Add(string key, object value)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ _cache.Set(key, value);
+ return Exists(key);
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ public bool Add(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ _cache.Set(key, value,
+ new MemoryCacheEntryOptions()
+ .SetSlidingExpiration(expiresSliding)
+ .SetAbsoluteExpiration(expiressAbsoulte)
+ );
+
+ return Exists(key);
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ public bool Add(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ if (isSliding)
+ {
+ _cache.Set(key, value,
+ new MemoryCacheEntryOptions()
+ .SetSlidingExpiration(expiresIn)
+ );
+ }
+ else
+ {
+ _cache.Set(key, value,
+ new MemoryCacheEntryOptions()
+ .SetAbsoluteExpiration(expiresIn)
+ );
+ }
+
+ return Exists(key);
+ }
+
+ public Task HashSetAsync(string key, string filed, object value)
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion 添加缓存
+
+ #region 删除缓存
+
+ ///
+ /// 删除缓存
+ ///
+ /// 缓存Key
+ ///
+ public bool Remove(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ _cache.Remove(key);
+
+ return !Exists(key);
+ }
+
+ ///
+ /// 批量删除缓存
+ ///
+ /// 缓存Key集合
+ ///
+ public void RemoveAll(IEnumerable keys)
+ {
+ if (keys == null)
+ {
+ throw new ArgumentNullException(nameof(keys));
+ }
+
+ keys.ToList().ForEach(item => _cache.Remove(item));
+ }
+
+ ///
+ /// 删除所有缓存
+ ///
+ public void RemoveCacheAll()
+ {
+ List l = GetCacheKeys();
+ foreach (string s in l)
+ {
+ Remove(s);
+ }
+ }
+
+ ///
+ /// 删除匹配到的缓存
+ ///
+ ///
+ ///
+ public void RemoveByPattern(string pattern)
+ {
+ IList l = SearchCacheRegex(pattern);
+ foreach (string s in l)
+ {
+ Remove(s);
+ }
+ }
+
+ ///
+ /// 搜索 匹配到的缓存
+ ///
+ ///
+ ///
+ public IList SearchCacheRegex(string pattern)
+ {
+ List cacheKeys = GetCacheKeys();
+ List l = cacheKeys.Where(k => Regex.IsMatch(k, pattern)).ToList();
+ return l.AsReadOnly();
+ }
+
+ #endregion 删除缓存
+
+ #region 获取缓存
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public T Get(string key) where T : class
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.Get(key) as T;
+ }
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public object Get(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.Get(key);
+ }
+
+ ///
+ /// 获取缓存集合
+ ///
+ /// 缓存Key集合
+ ///
+ public IDictionary GetAll(IEnumerable keys)
+ {
+ if (keys == null)
+ {
+ throw new ArgumentNullException(nameof(keys));
+ }
+
+ Dictionary dict = new Dictionary();
+
+ keys.ToList().ForEach(item => dict.Add(item, _cache.Get(item)));
+
+ return dict;
+ }
+
+ ///
+ /// 获取所有缓存键
+ ///
+ ///
+ public List GetCacheKeys()
+ {
+ const BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic;
+ object entries = _cache.GetType().GetField("_entries", flags).GetValue(_cache);
+ IDictionary cacheItems = entries as IDictionary;
+ List keys = new List();
+ if (cacheItems == null)
+ {
+ return keys;
+ }
+
+ foreach (DictionaryEntry cacheItem in cacheItems)
+ {
+ keys.Add(cacheItem.Key.ToString());
+ }
+
+ return keys;
+ }
+
+ #endregion 获取缓存
+
+ #region 修改缓存
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ ///
+ public bool Replace(string key, object value)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ if (Exists(key))
+ {
+ if (!Remove(key))
+ {
+ return false;
+ }
+ }
+
+ return Add(key, value);
+ }
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ /// 绝对过期时长
+ ///
+ public bool Replace(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ if (Exists(key))
+ {
+ if (!Remove(key))
+ {
+ return false;
+ }
+ }
+
+ return Add(key, value, expiresSliding, expiressAbsoulte);
+ }
+
+ ///
+ /// 修改缓存
+ ///
+ /// 缓存Key
+ /// 新的缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间)
+ ///
+ public bool Replace(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ if (Exists(key))
+ {
+ if (!Remove(key))
+ {
+ return false;
+ }
+ }
+
+ return Add(key, value, expiresIn, isSliding);
+ }
+
+ #endregion 修改缓存
+
+ #region Hash
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HSet(string key, string filed, object value)
+ {
+ return RedisHelper.HSet(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HSetAsync(string key, string filed, object value)
+ {
+ return RedisHelper.HSetAsync(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HMSetAsync(string key, object[] value)
+ {
+ return RedisHelper.HMSetAsync(key, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HMSet(string key, object[] value)
+ {
+ return RedisHelper.HMSet(key, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string[] HMGet(string key, string[] filed)
+ {
+ return RedisHelper.HMGet(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HMGetAsync(string key, string filed)
+ {
+ return RedisHelper.HMGetAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public long HDel(string key, string[] filed)
+ {
+ return RedisHelper.HDel(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HDelAsync(string key, string filed)
+ {
+ return RedisHelper.HDelAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HExists(string key, string filed)
+ {
+ return RedisHelper.HExists(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HExistsAsync(string key, string filed)
+ {
+ return RedisHelper.HExistsAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HIncrByAsync(string key, string filed)
+ {
+ return RedisHelper.HIncrByAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public long HIncrBy(string key, string filed)
+ {
+ return RedisHelper.HIncrBy(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Task> HGetAllAsync(string key)
+ {
+ return RedisHelper.HGetAllAsync(key);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Dictionary HGetAll(string key)
+ {
+ return RedisHelper.HGetAll(key);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task HGetAsync(string key, string filed)
+ {
+ return await RedisHelper.HGetAsync(key, filed);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task HSetNxAsync(string key, string filed, object value)
+ {
+ return RedisHelper.HSetNxAsync(key, filed, value);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool HSetNx(string key, string filed, object value)
+ {
+ return RedisHelper.HSetNx(key, filed, value);
+ }
+
+ #endregion Hash
+ }
+}
\ No newline at end of file
diff --git a/Znyc.Cloudcar.Admin.Commons/Cache/RedisCacheService.cs b/Znyc.Cloudcar.Admin.Commons/Cache/RedisCacheService.cs
new file mode 100644
index 0000000..0d2cca0
--- /dev/null
+++ b/Znyc.Cloudcar.Admin.Commons/Cache/RedisCacheService.cs
@@ -0,0 +1,634 @@
+using Microsoft.Extensions.Caching.StackExchangeRedis;
+using StackExchange.Redis;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+
+namespace Znyc.Cloudcar.Admin.Commons.Cache
+{
+ ///
+ /// Redis缓存操作
+ ///
+ public class RedisCacheService : ICacheService
+ {
+ ///
+ ///
+ private readonly ConnectionMultiplexer _connection;
+
+ ///
+ ///
+ private readonly string _instance;
+
+ private readonly JsonSerializerOptions _jsonOptions;
+
+ ///
+ ///
+ protected IDatabase _cache;
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public RedisCacheService(RedisCacheOptions options, JsonSerializerOptions jsonOptions, int database = 0)
+ {
+ _connection = ConnectionMultiplexer.Connect(options.Configuration);
+ _cache = _connection.GetDatabase(database);
+ _instance = options.InstanceName;
+ _jsonOptions = jsonOptions;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public string GetKeyForRedis(string key)
+ {
+ return _instance + key;
+ }
+
+ public void Dispose()
+ {
+ if (_connection != null)
+ {
+ _connection.Dispose();
+ }
+
+ GC.SuppressFinalize(this);
+ }
+
+ #region 验证缓存项是否存在
+
+ ///
+ /// 验证缓存项是否存在
+ ///
+ /// 缓存Key
+ ///
+ public bool Exists(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.KeyExists(GetKeyForRedis(key));
+ }
+
+ ///
+ /// 验证缓存项是否存在
+ ///
+ /// 缓存Key
+ ///
+ public Task ExistsAsync(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.KeyExistsAsync(GetKeyForRedis(key));
+ }
+
+ #endregion 验证缓存项是否存在
+
+ #region 添加缓存
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ ///
+ public bool Add(string key, object value)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSet(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)));
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 滑动过期时长(如果在过期时间内有操作,则以当前时间点延长过期时间,Redis中无效)
+ /// 绝对过期时长
+ ///
+ public bool Add(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSet(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)), expiressAbsoulte);
+ }
+
+ ///
+ /// 添加缓存
+ ///
+ /// 缓存Key
+ /// 缓存Value
+ /// 缓存时长
+ /// 是否滑动过期(如果在过期时间内有操作,则以当前时间点延长过期时间,Redis中无效)
+ ///
+ public bool Add(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSet(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)), expiresIn);
+ }
+
+ public Task AddAsync(string key, object value)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSetAsync(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)));
+ }
+
+ public Task AddAsync(string key, object value, TimeSpan expiresSliding, TimeSpan expiressAbsoulte)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSetAsync(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)), expiressAbsoulte);
+ }
+
+ public Task AddAsync(string key, object value, TimeSpan expiresIn, bool isSliding = false)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.StringSetAsync(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)), expiresIn);
+ }
+
+ public Task HashSetAsync(string key, string filed, object value)
+ {
+ return _cache.HashSetAsync(GetKeyForRedis(key),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(filed, _jsonOptions)),
+ Encoding.UTF8.GetBytes(JsonSerializer.Serialize(value, _jsonOptions)));
+ }
+
+ #endregion 添加缓存
+
+ #region 删除缓存
+
+ ///
+ /// 删除缓存
+ ///
+ /// 缓存Key
+ ///
+ public bool Remove(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.KeyDelete(GetKeyForRedis(key));
+ }
+
+ ///
+ /// 批量删除缓存
+ ///
+ /// 缓存Key集合
+ ///
+ public void RemoveAll(IEnumerable keys)
+ {
+ if (keys == null)
+ {
+ throw new ArgumentNullException(nameof(keys));
+ }
+
+ keys.ToList().ForEach(item => Remove(item));
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Task RemoveAsync(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ return _cache.KeyDeleteAsync(GetKeyForRedis(key));
+ }
+
+ public Task RemoveAllAsync(IEnumerable keys)
+ {
+ //if (keys == null)
+ //{
+ throw new ArgumentNullException(nameof(keys));
+ //}
+
+ //keys.ToList().ForEach(item => RemoveAsync(item));
+ }
+
+ ///
+ /// 使用通配符找出所有的key然后逐个删除
+ ///
+ /// 通配符
+ public virtual void RemoveByPattern(string pattern)
+ {
+ foreach (System.Net.EndPoint ep in _connection.GetEndPoints())
+ {
+ IServer server = _connection.GetServer(ep);
+ IEnumerable keys = server.Keys(pattern: "*" + pattern + "*", database: _cache.Database);
+ foreach (RedisKey key in keys)
+ {
+ _cache.KeyDelete(key);
+ }
+ }
+ }
+
+ ///
+ /// 删除所有缓存
+ ///
+ public void RemoveCacheAll()
+ {
+ RemoveByPattern("");
+ }
+
+ #endregion 删除缓存
+
+ #region 获取缓存
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public T Get(string key) where T : class
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ RedisValue value = _cache.StringGet(GetKeyForRedis(key));
+
+ if (!value.HasValue)
+ {
+ return default;
+ }
+
+ return JsonSerializer.Deserialize(value, _jsonOptions);
+ }
+
+ ///
+ /// 获取缓存
+ ///
+ /// 缓存Key
+ ///
+ public object Get(string key)
+ {
+ if (key == null)
+ {
+ throw new ArgumentNullException(nameof(key));
+ }
+
+ RedisValue value = _cache.StringGet(GetKeyForRedis(key));
+
+ if (!value.HasValue)
+ {
+ return null;
+ }
+
+ return JsonSerializer.Deserialize