diff --git a/OpenAuth.App/Base/SqlSugarBaseApp.cs b/OpenAuth.App/Base/SqlSugarBaseApp.cs index b8c047b3..93432a1f 100644 --- a/OpenAuth.App/Base/SqlSugarBaseApp.cs +++ b/OpenAuth.App/Base/SqlSugarBaseApp.cs @@ -35,10 +35,6 @@ namespace OpenAuth.App public T Get(string id) { - if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL) - { - return SugarClient.Queryable().Where("\"Id\"=@id", new {id = id}).First(); - } return SugarClient.Queryable().Where("Id=@id", new {id = id}).First(); } diff --git a/OpenAuth.App/FlowApproverApp/FlowApproverApp.cs b/OpenAuth.App/FlowApproverApp/FlowApproverApp.cs index c259798c..fafa5f88 100644 --- a/OpenAuth.App/FlowApproverApp/FlowApproverApp.cs +++ b/OpenAuth.App/FlowApproverApp/FlowApproverApp.cs @@ -56,7 +56,7 @@ namespace OpenAuth.App CreateUserId = loginContext.User.Id, CreateUserName = loginContext.User.Name, CreateDate = DateTime.Now, - Content = $"【加签】流程加签给:{string.Join(",", objs.Select(u => u.ApproverName))}" + Content = $"【加签】{loginContext.User.Name}加签给:{string.Join(",", objs.Select(u => u.ApproverName))}" }).ExecuteCommand(); } diff --git a/OpenAuth.App/FlowInstance/FlowInstanceApp.cs b/OpenAuth.App/FlowInstance/FlowInstanceApp.cs index c48f86ed..912d84b2 100644 --- a/OpenAuth.App/FlowInstance/FlowInstanceApp.cs +++ b/OpenAuth.App/FlowInstance/FlowInstanceApp.cs @@ -2,7 +2,7 @@ * @Author: yubaolee | ahfu~ <954478625@qq.com> * @Date: 2024-12-13 16:55:17 * @Description: 工作流实例表操作 - * @LastEditTime: 2025-02-25 22:42:53 + * @LastEditTime: 2025-02-26 10:39:03 * Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved. */ @@ -617,6 +617,12 @@ namespace OpenAuth.App from SysUser where fi.MakerList like '%' || Id || '%') "; } + else if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL) + { + groupConcatSql = $@" (select string_agg(Account, ',') + from SysUser + where fi.MakerList like '%' || Id || '%') "; + } string sql = String.Empty; @@ -705,17 +711,17 @@ namespace OpenAuth.App select distinct FirstId as InstanceId from Relevance rel inner join FlowInstance flow on rel.FirstId = flow.Id and flow.IsFinish = 1 - where `Key` = '{Define.INSTANCE_NOTICE_USER}' + where `key` = '{Define.INSTANCE_NOTICE_USER}' and SecondId = '{user.User.Id}' union select distinct a.FirstId as InstanceId from Relevance a inner join (select SecondId as RoleId from Relevance - where `Key` = 'UserRole' + where `key` = 'UserRole' and FirstId = '{user.User.Id}') b on a.SecondId = b.RoleId inner join FlowInstance flow on a.FirstId = flow.Id and flow.IsFinish = 1 - where a.`Key` = '{Define.INSTANCE_NOTICE_ROLE}') UniqueInstanceIds + where a.`key` = '{Define.INSTANCE_NOTICE_ROLE}') UniqueInstanceIds ON fi.Id = UniqueInstanceIds.InstanceId "; } @@ -723,11 +729,14 @@ namespace OpenAuth.App switch (SugarClient.CurrentConnectionConfig.DbType) { case DbType.SqlServer: - sql = sql.Replace("`Key`", "[Key]"); + sql = sql.Replace("`key`", "[Key]"); sql = sql.Replace("from dual", ""); break; case DbType.Oracle: - sql = sql.Replace("`Key`", "\"KEY\""); + sql = sql.Replace("`key`", "\"KEY\""); + break; + case DbType.PostgreSQL: + sql = sql.Replace("`key`", "key"); break; }