From bb9c7066c7c5c5249ff7eaaf8baeb00eaa99d57b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Apr 2026 15:51:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=88=90=E5=A4=96?= =?UTF-8?q?=E9=94=AE=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 17 ++++++ .../Service/Management/UserFeedBackService.cs | 2 +- .../NoForeignKeyMigrationsSqlGenerator.cs | 52 ++++++++++++++----- .../Context/IRaCISDBContext.cs | 3 +- 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 22d408412..afeaca4cb 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -3523,6 +3523,13 @@ UserFeedBackService + + + 设置用户反馈状态 并且可以提供理由 + + + + 批量更新状态 @@ -17299,12 +17306,22 @@ UserFeedBackView 列表视图模型 + + + 原因 + + UserFeedBackQuery 列表查询参数模型 UserFeedBackAddOrEdit 列表查询参数模型 + + + 原因 + + UserLogView 列表视图模型 diff --git a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs index f51b01300..b98d1f12b 100644 --- a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs @@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application.Service { if (inQuery.Id == null && inQuery.VisitTaskId == null) { - throw new BusinessValidationFailedException("Id 或者VisitTaskId 必传一个"); + throw new BusinessValidationFailedException("The interface parameter Id or VisitTaskId cannot be passed at the same time"); } var result = await _userFeedBackRepository diff --git a/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs b/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs index 941930c99..7ecc9f9a0 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/Convention/NoForeignKeyMigrationsSqlGenerator.cs @@ -61,23 +61,51 @@ public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerato //} // 检查是否是外键索引 - var table = model?.FindEntityType(operation.Table); - if (table != null) - { - foreach (var foreignKey in table.GetForeignKeys()) - { - // 如果索引列和外键列相同,跳过生成 - if (operation.Columns.SequenceEqual(foreignKey.Properties.Select(p => p.Name))) - { - return; // 跳过生成外键索引 - } - } - } + //var table = model?.FindEntityType(operation.Table); + //if (table != null) + //{ + // foreach (var foreignKey in table.GetForeignKeys()) + // { + // // 如果索引列和外键列相同,跳过生成 + // if (operation.Columns.SequenceEqual(foreignKey.Properties.Select(p => p.Name))) + // { + // return; // 跳过生成外键索引 + // } + // } + //} + + + if (IsForeignKeyIndex(operation, model)) + return; // 非外键索引,调用基类方法正常生成 base.Generate(operation, model, builder, terminate); } + private bool IsForeignKeyIndex(CreateIndexOperation operation, IModel? model) + { + var entity = model? + .GetEntityTypes() + .FirstOrDefault(e => + e.GetTableName() == operation.Table && + e.GetSchema() == operation.Schema); + if (entity == null) + return false; + + var tableId = StoreObjectIdentifier.Table(operation.Table, operation.Schema); + + foreach (var fk in entity.GetForeignKeys()) + { + var cols = fk.Properties + .Select(p => p.GetColumnName(tableId)) + .ToArray(); + + if (cols.SequenceEqual(operation.Columns)) + return true; + } + + return false; + } } diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index bdeb5d3c6..2bc5b9878 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -67,7 +67,8 @@ public class IRaCISDBContext : DbContext //https://learn.microsoft.com/zh-cn/ef/core/modeling/relationships/conventions?utm_source=chatgpt.com configurationBuilder.Conventions.Remove(typeof(ForeignKeyIndexConvention)); - + + } protected override void OnModelCreating(ModelBuilder modelBuilder) From b56bfcbfcf5be8f78ff893f78b0f3728efd53c8c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Apr 2026 15:52:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- irc_api.drone.yml | 53 ----------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/irc_api.drone.yml b/irc_api.drone.yml index f06092d78..35aed66a2 100644 --- a/irc_api.drone.yml +++ b/irc_api.drone.yml @@ -1,30 +1,4 @@ -kind: pipeline -type: ssh -name: ssh-linux-uat-irc-build-image -platform: - os: Linux - arch: 386 - -clone: - disable: true - -server: - host: 101.132.253.119 - user: root - password: - from_secret: test_ssh_pwd - -steps: -- name: build-uat-irc - commands: - - bash /opt/1panel/xc-deploy-new/Uat_IRC/devops-publish/uat-branch-publish.sh - -trigger: - branch: - - Uat_IRC_Net8 - ---- kind: pipeline type: ssh name: ssh-linux-test-irc-publish @@ -59,33 +33,6 @@ trigger: ---- -kind: pipeline -type: ssh -name: ssh-linux-test-study-publish - -platform: - os: Linux - arch: 386 - -clone: - disable: true #禁用默认克隆 - -server: - host: 106.14.89.110 - user: root - password: - from_secret: test_ssh_pwd - -steps: -- name: publish-test-study - commands: - - cd /opt/1panel/xc-deploy/Test_Study/devops-build-publish ; sh pull-build-test-study-image.sh v${DRONE_BUILD_NUMBER} - - cd /opt/1panel/xc-deploy/Test_Study ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER} - -trigger: - branch: - - Test_Study_Net8