From 0d04733a1c1a0de244cff1d096e5330a0795cb5d Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 18 Jun 2026 13:06:19 +0800 Subject: [PATCH] chore: Update abp framework to 10.4.0 --- .changes/Migration 10.2.0 - 10.4.0.md | 76 +++++ Directory.Packages.props | 46 ++-- .../vben5/apps/app-antd/src/layouts/basic.vue | 10 +- .../src/components/settings/SettingForm.vue | 20 +- .../components/job-infos/JobInfoDrawer.vue | 51 +++- .../src/components/job-infos/JobInfoTable.vue | 18 ++ .../@abp/tasks/src/types/job-infos.ts | 10 +- .../components/properties/PropertyTable.vue | 13 +- .../ui/src/components/properties/types.ts | 1 + .../wechat/src/components/bind-user/index.vue | 15 +- .../@abp/wechat/src/constants/features.ts | 2 + aspnet-core/LINGYUN.MicroService.All.slnx | 1 + aspnet-core/LINGYUN.MicroService.Aspire.slnx | 8 + .../AIServiceModule.cs | 2 + .../appsettings.Development.json | 3 +- .../AdminServiceDataSeeder.cs | 3 +- .../appsettings.Development.json | 1 + .../yarp.json | 30 ++ .../AppHost.cs | 19 +- .../DataSeeds/OpenIddictDataSeeder.cs | 8 +- .../appsettings.Development.json | 1 + .../package.json | 8 +- .../appsettings.Development.json | 1 + .../LocalizationServiceModule.Configure.cs | 8 + .../LocalizationServiceModule.cs | 1 + .../appsettings.Development.json | 1 + .../DataSeeds/NotificationDataSeeder.cs | 120 ++++++++ .../MessageServiceDataSeedConsts.cs | 10 + .../MessageServiceDataSeeder.cs | 33 +++ .../MessageServiceDbMigrationEventHandler.cs | 64 +---- .../MessageServiceDbMigrationService.cs | 10 + .../appsettings.Development.json | 1 + ...UN.Abp.MicroService.PlatformService.csproj | 1 + .../PlatformServiceModule.cs | 2 + .../appsettings.Development.json | 1 + .../appsettings.Development.json | 1 + .../WeChatServiceModule.Configure.cs | 4 +- .../appsettings.Development.json | 1 + .../appsettings.Development.json | 1 + .../appsettings.Development.json | 1 + .../EventBus/CAP/CAPDistributedEventBus.cs | 121 ++++++-- .../AbpTelemetryOpenTelemetryModule.cs | 20 +- .../Abp/WeChat/Common/Utils/Cryptography.cs | 12 + .../Abp/WeChat/Common/Utils/WXBizMsgCrypt.cs | 8 +- aspnet-core/migrate-database.bat | 3 +- .../OpenIddictDataSeederContributor.cs | 8 +- .../DataSeeds/OpenIddictDataSeeder.cs | 8 +- ...IdentitySessionUserInactiveSynchronizer.cs | 18 +- .../InactiveUserDeactivationNotifier.tpl | 2 +- .../InactiveUserDeletionNotifier.tpl | 2 +- .../InactiveUserReminderNotifier.tpl | 2 +- ...eVbenAdmin5NavigationDefinitionProvider.cs | 24 ++ .../TaskManagement/BackgroundJobInfoDto.cs | 4 + ...rviceApplicationsSingleModule.Configure.cs | 1 + .../MicroServiceApplicationsSingleModule.cs | 2 + .../SystemGroupSettingDefinitionProvider.cs | 253 +++++++++++++++++ .../appsettings.Development.json | 34 ++- .../SystemGroupSettingDefinitionProvider.cs | 260 ++++++++++++++++++ ...INGYUN.Abp.BlobStoring.Aliyun.Tests.csproj | 2 +- ...LINGYUN.Abp.BlobStoring.Nexus.Tests.csproj | 2 +- .../LINGYUN.Abp.DataProtection.Tests.csproj | 2 +- ...NGYUN.Abp.EntityFrameworkCore.Tests.csproj | 2 +- ...bp.ExceptionHandling.Emailing.Tests.csproj | 2 +- ...eatures.LimitValidation.Redis.Tests.csproj | 2 +- ....Abp.Features.LimitValidation.Tests.csproj | 2 +- .../LINGYUN.Abp.IdGenerator.Tests.csproj | 2 +- .../LINGYUN.Abp.Localization.Xml.Tests.csproj | 2 +- .../LINGYUN.Abp.Location.Baidu.Tests.csproj | 2 +- .../LINGYUN.Abp.Location.Tencent.Tests.csproj | 2 +- ...LINGYUN.Abp.Rules.RulesEngine.Tests.csproj | 2 +- .../LINGYUN.Abp.WeChat.Work.Tests.csproj | 2 +- 71 files changed, 1224 insertions(+), 191 deletions(-) create mode 100644 .changes/Migration 10.2.0 - 10.4.0.md create mode 100644 apps/vben5/packages/@abp/wechat/src/constants/features.ts create mode 100644 aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs create mode 100644 aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeedConsts.cs create mode 100644 aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeeder.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/Settings/SystemGroupSettingDefinitionProvider.cs create mode 100644 aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Settings/SystemGroupSettingDefinitionProvider.cs diff --git a/.changes/Migration 10.2.0 - 10.4.0.md b/.changes/Migration 10.2.0 - 10.4.0.md new file mode 100644 index 000000000..864bde8f2 --- /dev/null +++ b/.changes/Migration 10.2.0 - 10.4.0.md @@ -0,0 +1,76 @@ +# 10.2.0 - 10.4.0 + +## 模块变更 + +1. [身份标识模块] 增加不活跃用户通知/清理作业,实现了三个通知模板(账户保持活跃通知、账户停用通知、账户删除通知) +2. [身份标识模块] 增加不活跃用户实体 `IdentityUserInactive` 需要执行数据库迁移 +3. [身份标识模块] 增加用户登录Url设置定义: `Abp.Identity.Link.UserLoginUri`, 用于在外部系统中关联用户登录页 +4. [身份认证模块] 增加用户登录Url定义: `Abp.Account.UserLogin` +5. [身份认证模块] 增加关联用户登录功能, 可以实现跨租户用户关联, 切换关联用户登录 +6. [设置管理模块] 增加身份标识模块缺少的设置项: 启用防止密码重用、防止密码重用数量 +7. [设置基础模块] 增加设置定义分组、所属设置、优先级、依赖权限、依赖功能、选择项等常用结构扩展 +8. [设置管理模块] 重构设置管理应用服务接口, 通过预设定的设置定义分组、上下级关系等自动构成Dto结构 + +## 依赖项变更 + +| 库名称 | 原版本 | 现版本 | +| -------------------------------------------- | --------- | ------ | +| Microsoft.AspNetCore.* | 10.0.2 | 10.0.7 | +| Microsoft.Bcl.AsyncInterfaces | 10.0.2 | 10.0.7 | +| Microsoft.Data.Sqlite.Core | 10.0.0 | 10.0.7 | +| Microsoft.EntityFrameworkCore.* | 10.0.2 | 10.0.7 | +| Microting.EntityFrameworkCore.MySql | 10.0.3 | 10.0.7 | +| Microsoft.Extensions.* | 10.0.2 | 10.0.7 | +| OpenTelemetry.Extensions.Hosting | 1.14.0 | 1.15.3 | +| OpenTelemetry.Exporter.Console | 1.14.0 | 1.15.3 | +| OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.14.0 | 1.15.3 | +| OpenTelemetry.Exporter.Zipkin | 1.14.0 | 1.15.3 | +| OpenTelemetry.Instrumentation.AspNetCore | 1.14.0 | 1.15.2 | +| OpenTelemetry.Instrumentation.Http | 1.14.0 | 1.15.1 | +| OpenTelemetry.Instrumentation.Quartz | 1.14.0-beta.2 | 1.15.1-beta.1 | +| OpenTelemetry.Instrumentation.Runtime | 1.14.0 | 1.15.1 | +| OpenTelemetry.Instrumentation.SqlClient | 1.14.0-beta.1 | 1.15.2 | +| OpenIddict.Server.DataProtection | 7.2.0 | 7.5.0 | +| OpenIddict.Validation.DataProtection | 7.2.0 | 7.5.0 | +| System.Threading.Channels | 10.0.0 | 10.0.7 | +| Volo.Abp.* | 10.2.0 | 10.4.0 | +| Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite | 5.2.0 | 5.4.0 | + + + +## 数据库迁移 + +| Project Name | Database Provider | Scripts | EF Core Version | +| ------------------------ | ----------------- | ---------------------------------------------- | --------------- | +| aspire/AuthServer | PostgreSQL | 20260530060327_Add-Identity-User-Inactive | 10.0.2 | +| services/Single | MySQL | 20260529063257_Add-Identity-User-Inactive | 10.0.3 | +| services/Single | PostgreSQL | 20260530055941_Add-Identity-User-Inactive | 10.0.2 | +| services/Single | SqlServer | 20260530060009_Add-Identity-User-Inactive | 10.0.2 | +| services/AuthServer | MySQL | 20260530061141_Add-Identity-User-Inactive | 10.0.3 | + + +## 数据库连接字符串 + +| Module Name | ConnectionString Name | Example(MySQL) | +| ----------------------------- | ---------------------------- | ------------------------------------------------------------ | +| Default | Default | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/Identity | AbpIdentity | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/IdentityServer | AbpIdentityServer | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/OpenIddict | AbpOpenIddict | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/TenantManagement | AbpTenantManagement(AbpSaas) | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/FeatureManagement | AbpFeatureManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/SettingManagement | AbpSettingManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| abp/PermissionManagement | AbpPermissionManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/AIManagement | AbpAIManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/BlobManagement | AbpBlobManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/DataProtectionManagement | AbpDataProtectionManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/Gdpr | AbpGdpr | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/Saas | AbpSaas | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/LocalizationManagement | AbpLocalizationManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/TextTemplating | AbpTextTemplating | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/Platform | AppPlatform | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/MessageService | MessageService | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/NotificationService | Notifications | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/TaskManagement | TaskManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/WebhooksManagement | WebhooksManagement | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | +| labp/Elsa | Workflow | Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None | diff --git a/Directory.Packages.props b/Directory.Packages.props index 7c7d36b3d..eae775c5f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,17 +3,17 @@ 10.0.0 2.16.1 3.6.0 - 10.2.0 - 10.2.0 - 10.0.2 - 10.0.2 - 10.0.2 + 10.4.0 + 10.4.0 + 10.0.7 + 10.0.7 + 10.0.7 13.1.0 true - + @@ -164,7 +164,7 @@ - + @@ -186,11 +186,11 @@ - + - + @@ -200,7 +200,7 @@ - + @@ -276,16 +276,16 @@ - - - - - - + + + + + + - - - + + + @@ -318,7 +318,7 @@ - + @@ -365,8 +365,8 @@ - - + + @@ -383,7 +383,7 @@ - + diff --git a/apps/vben5/apps/app-antd/src/layouts/basic.vue b/apps/vben5/apps/app-antd/src/layouts/basic.vue index 755598abb..eeb8302f4 100644 --- a/apps/vben5/apps/app-antd/src/layouts/basic.vue +++ b/apps/vben5/apps/app-antd/src/layouts/basic.vue @@ -14,7 +14,7 @@ import { UserDropdown, } from '@vben/layouts'; import { preferences } from '@vben/preferences'; -import { useAccessStore, useUserStore } from '@vben/stores'; +import { useAccessStore, useTabbarStore, useUserStore } from '@vben/stores'; import { useAbpStore } from '@abp/core'; @@ -30,11 +30,12 @@ const notifications = ref([]); useSessions(); -const { replace } = useRouter(); +const router = useRouter(); const abpStore = useAbpStore(); const userStore = useUserStore(); const authStore = useAuthStore(); const accessStore = useAccessStore(); +const tabbarStore = useTabbarStore(); const { destroyWatermark, updateWatermark } = useWatermark(); const showDot = computed(() => notifications.value.some((item) => !item.isRead), @@ -57,7 +58,7 @@ const menus = computed(() => [ }, { handler: () => { - replace('/account/my-settings'); + router.replace('/account/my-settings'); }, icon: UserSettingsIcon, text: $t('abp.account.settings.title'), @@ -109,7 +110,8 @@ async function handleLinkUser(token: string) { async function handleLinkLogin(userId: string, tenantId?: string) { await authStore.linkUseLogin(userId, tenantId, () => { - window.location.reload(); + tabbarStore.closeAllTabs(router); + window.location.replace('/'); }); } watch( diff --git a/apps/vben5/packages/@abp/settings/src/components/settings/SettingForm.vue b/apps/vben5/packages/@abp/settings/src/components/settings/SettingForm.vue index a2dd403ae..0b172671b 100644 --- a/apps/vben5/packages/@abp/settings/src/components/settings/SettingForm.vue +++ b/apps/vben5/packages/@abp/settings/src/components/settings/SettingForm.vue @@ -41,7 +41,6 @@ const emits = defineEmits<{ const FormItem = Form.Item; const TabPane = Tabs.TabPane; const CollapsePanel = Collapse.Panel; -const SelectOption = Select.Option; const defaultModel: SettingsUpdateInput = { settings: [], @@ -104,6 +103,15 @@ function onValueChange(setting: SettingDetail) { } } +function onFilterOption(input: string, option: any) { + if (option?.value || option?.name) { + return ( + option?.name?.toLowerCase().includes(input.toLowerCase()) || + option?.value?.toLowerCase().includes(input.toLowerCase()) + ); + } +} + onMounted(onGet); @@ -190,16 +198,20 @@ onMounted(onGet); @@ -217,6 +237,7 @@ function onDeleteParam(record: JobParamter) { > @@ -228,6 +249,7 @@ function onDeleteParam(record: JobParamter) { > @@ -241,6 +263,7 @@ function onDeleteParam(record: JobParamter) {