xf 2 rokov pred
rodič
commit
1ff30426ff
31 zmenil súbory, kde vykonal 77 pridanie a 67 odobranie
  1. 2 2
      src/Hotline.Api/Controllers/HotSpotController.cs
  2. 1 1
      src/Hotline.Api/Controllers/KnowledgeController.cs
  3. 16 0
      src/Hotline.Api/Controllers/TestController.cs
  4. 1 1
      src/Hotline.Api/appsettings.Development.json
  5. 1 1
      src/Hotline.Api/appsettings.json
  6. 1 1
      src/Hotline.Application/Knowledge/KnowApplication.cs
  7. 2 2
      src/Hotline.Application/Mappers/MapperConfigs.cs
  8. 18 20
      src/Hotline.Repository.SqlSugar/Extensions/SqlSugarStartupExtensions.cs
  9. 1 1
      src/Hotline.Repository.SqlSugar/System/HotspotTypeRepository.cs
  10. 1 1
      src/Hotline/CallCenter/Ivrs/Ivr.cs
  11. 2 2
      src/Hotline/FlowEngine/Definitions/Definition.cs
  12. 4 4
      src/Hotline/FlowEngine/Workflows/StepBasicEntity.cs
  13. 2 2
      src/Hotline/FlowEngine/Workflows/Workflow.cs
  14. 2 2
      src/Hotline/FlowEngine/Workflows/WorkflowStep.cs
  15. 1 1
      src/Hotline/FlowEngine/Workflows/WorkflowSupplement.cs
  16. 4 4
      src/Hotline/KnowledgeBase/Knowledge.cs
  17. 1 1
      src/Hotline/KnowledgeBase/KnowledgeStandard.cs
  18. 1 1
      src/Hotline/Orders/Order.cs
  19. 1 1
      src/Hotline/Orders/OrderComplain.cs
  20. 1 1
      src/Hotline/Orders/OrderExtensionEntity.cs
  21. 0 1
      src/Hotline/SeedData/OrgSeedData.cs
  22. 0 1
      src/Hotline/SeedData/RoleSeedData.cs
  23. 0 1
      src/Hotline/SeedData/SysAccountSeedData.cs
  24. 0 1
      src/Hotline/SeedData/UserSeedData.cs
  25. 2 2
      src/Hotline/Settings/Hotspots/Hotspot.cs
  26. 1 1
      src/Hotline/Settings/Hotspots/IHotspotTypeRepository.cs
  27. 2 2
      src/Hotline/Settings/SystemAuthority.cs
  28. 3 3
      src/Hotline/Settings/TimeLimits/TimeLimit.cs
  29. 1 1
      src/Hotline/Settings/TrunkIvrManager.cs
  30. 1 1
      src/Hotline/Settings/UserFastMenu.cs
  31. 4 4
      src/XF.Domain.Repository/Entity.cs

+ 2 - 2
src/Hotline.Api/Controllers/HotSpotController.cs

@@ -40,7 +40,7 @@ namespace Hotline.Api.Controllers
         /// 查询子项
         /// </summary>
         [HttpGet("children")]
-        public async Task<IReadOnlyList<HotSpotType>> GetChildren([FromQuery] string? id)
+        public async Task<IReadOnlyList<Hotspot>> GetChildren([FromQuery] string? id)
         {
             return await _hotspotTypeRepository.Queryable()
                 .Where(x => x.ParentId == id)
@@ -57,7 +57,7 @@ namespace Hotline.Api.Controllers
         /// <param name="id"></param>
         /// <returns></returns>
         [HttpGet("{id}/with-parents")]
-        public async Task<IReadOnlyList<HotSpotType>> GetWithParents(string id)
+        public async Task<IReadOnlyList<Hotspot>> GetWithParents(string id)
         {
             var targetList = await _hotspotTypeRepository.Queryable()
                 .ToTreeAsync(d => d.Children, d => d.ParentId, null, new[] { id });

+ 1 - 1
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -440,7 +440,7 @@ namespace Hotline.Api.Controllers
                .Includes(it => it.Knowledge, it => it.User)
                .Includes(it => it.Knowledge, it => it.SystemOrganize)
                .Includes(it => it.Knowledge, it => it.KnowledgeType)
-               .Includes(it => it.Knowledge, it => it.HotSpotType)
+               .Includes(it => it.Knowledge, it => it.HotspotType)
                .Includes(it => it.Workflow)
                .Where(d => d.CreatorId == _sessionContext.RequiredUserId && d.WorkflowModuleStatus == EKnowledgeApplyType.Delete)
                .WhereIF(pagedDto.EKnowledgeWorkFlowStatus.HasValue, d => d.WorkFlowApplyStatus == pagedDto.EKnowledgeWorkFlowStatus)

+ 16 - 0
src/Hotline.Api/Controllers/TestController.cs

@@ -97,6 +97,22 @@ public class TestController : BaseController
         _mediator = mediator;
         _timeLimitApplication = timeLimitApplication;
     }
+    
+    [HttpGet("pgsql")]
+    public async Task<string> Pgsql()
+    {
+        var role = new Role
+        {
+            Name = $"test_role_{TimeOnly.FromDateTime(DateTime.Now)}",
+            DisplayName = "test_role_display",
+            ClientId = "test"
+        };
+        var roleId = await _roleRepository.AddAsync(role, HttpContext.RequestAborted);
+        role.Description = "Description";
+        await _roleRepository.UpdateAsync(role, HttpContext.RequestAborted);
+
+        return roleId;
+    }
 
     [AllowAnonymous]
     [HttpGet("roles")]

+ 1 - 1
src/Hotline.Api/appsettings.Development.json

@@ -54,7 +54,7 @@
     "Expired": 86300 //认证过期时间(秒)
   },
   "ConnectionStrings": {
-    "Hotline": "server=192.168.100.121;Database=hotline;Uid=dev;Pwd=fengwo11!!;SslMode=none;",
+    "Hotline": " PORT=5432;DATABASE=hotline;HOST=192.168.100.121;PASSWORD=fengwo11!!;USER ID=dev;",
     "Redis": "192.168.100.223:6379",
     "MongoDB": "mongodb://192.168.100.121:27017"
   },

+ 1 - 1
src/Hotline.Api/appsettings.json

@@ -80,7 +80,7 @@
     "Expired": 1440 //认证过期时间(秒)
   },
   "ConnectionStrings": {
-    "Hotline": "server=192.168.100.121;port=3306;Database=hotline;Uid=dev;Pwd=fengwo11!!;SslMode=none;",
+    "Hotline": " PORT=5432;DATABASE=hotline;HOST=192.168.100.121;PASSWORD=fengwo11!!;USER ID=dev;",
     "Redis": "192.168.100.223:6379",
     "MongoDB": "mongodb://192.168.100.121:27017"
   },

+ 1 - 1
src/Hotline.Application/Knowledge/KnowApplication.cs

@@ -49,7 +49,7 @@ namespace Hotline.Application.Knowledge
                .LeftJoin<User>((o, cus) => o.CreatorId == cus.Id)
                .LeftJoin<SystemOrganize>((o, cus, sys) => o.CreatorOrgId == sys.Id)
                .LeftJoin<KnowledgeType>((o, cus, sys, kn) => o.KnowledgeTypeId == kn.Id)
-               .LeftJoin<HotSpotType>((o, cus, sys, kn, hst) => o.HotspotId == hst.Id)
+               .LeftJoin<Hotspot>((o, cus, sys, kn, hst) => o.HotspotId == hst.Id)
                .Where((o, cus, sys, kn, hst) => o.IsDeleted == false && o.Status != EKnowledgeStatus.Revert)
                //关键词查询标题、创建人、创建部门
                .WhereIF(!string.IsNullOrEmpty(pagedDto.Keyword), (o, cus, sys, kn, hst) => o.Title.Contains(pagedDto.Keyword!) || cus.Name.Contains(pagedDto.Keyword!) || sys.OrgName.Contains(pagedDto.Keyword!))

+ 2 - 2
src/Hotline.Application/Mappers/MapperConfigs.cs

@@ -91,7 +91,7 @@ namespace Hotline.Application.Mappers
             config.NewConfig<Hotline.KnowledgeBase.Knowledge, KnowledgeDataDto>()
               .Map(d => d.CreationName, x => x.User.Name)
                 .Map(d => d.KnowledgeTypeName, x => x.KnowledgeType.SpliceName)
-                 .Map(d => d.HotspotName, x => x.HotSpotType.HotSpotFullName);
+                 .Map(d => d.HotspotName, x => x.HotspotType.HotSpotFullName);
 
             config.NewConfig<Hotline.KnowledgeBase.Knowledge, KnowledgeApprovalDataDto>()
             .Map(d => d.CreationName, x => x.User.Name)
@@ -113,7 +113,7 @@ namespace Hotline.Application.Mappers
                  .Map(d => d.Id, x => x.Knowledge.Id)
                   .Map(d => d.Title, x => x.Knowledge.Title)
                .Map(d => d.KnowledgeTypeName, x => x.Knowledge.KnowledgeType.SpliceName)
-               .Map(d => d.HotspotName, x => x.Knowledge.HotSpotType.HotSpotFullName)
+               .Map(d => d.HotspotName, x => x.Knowledge.HotspotType.HotSpotFullName)
                .Map(d => d.CreationName, x => x.Knowledge.User.Name)
                .Map(d => d.CreationBMName, x => x.Knowledge.SystemOrganize.OrgName)
                .Map(d => d.PageView, x => x.Knowledge.PageView)

+ 18 - 20
src/Hotline.Repository.SqlSugar/Extensions/SqlSugarStartupExtensions.cs

@@ -26,7 +26,7 @@ namespace Hotline.Repository.SqlSugar.Extensions
 
             SqlSugarScope sqlSugar = new SqlSugarScope(new ConnectionConfig()
             {
-                DbType = DbType.MySql,
+                DbType = DbType.PostgreSQL,
                 ConnectionString = configuration.GetConnectionString(dbName),
                 IsAutoCloseConnection = true,
                 ConfigureExternalServices = new ConfigureExternalServices
@@ -98,6 +98,11 @@ namespace Hotline.Repository.SqlSugar.Extensions
                                 .Description;
                         }
                     }
+                },
+                MoreSettings = new ConnMoreSettings
+                {
+                    PgSqlIsAutoToLower = false,//增删查改支持驼峰表
+                    PgSqlIsAutoToLowerCodeFirst = false, // 建表建驼峰表。5.1.3.30 
                 }
             },
                 SetDbAop
@@ -111,14 +116,13 @@ namespace Hotline.Repository.SqlSugar.Extensions
 
         private static void InitDatabase(ISugarUnitOfWork<HotlineDbContext> context, IConfiguration configuration)
         {
-            context.Db.DbMaintenance.CreateDatabase();
-
             var dbOptions = configuration.GetSection("DatabaseConfiguration").Get<DatabaseOptions>() ?? new DatabaseOptions();
             if (dbOptions.ApplyDbMigrations)
             {
-                var nonTableTypes = new[] { typeof(OrderExtensionEntity), typeof(StepBasicEntity) };
+                context.Db.DbMaintenance.CreateDatabase();
+
                 var types = typeof(User).Assembly.GetTypes()
-                    .Where(d => d.GetInterfaces().Any(x => x == typeof(ITable) && !nonTableTypes.Contains(x)))
+                    .Where(d => d.GetInterfaces().Any(x => x == typeof(ITable) && !d.IsAbstract))
                     .Distinct()
                     .ToArray();
 
@@ -141,25 +145,18 @@ namespace Hotline.Repository.SqlSugar.Extensions
                     if (seedData == null) continue;
 
                     var entityType = seedType.GetInterfaces().First().GetGenericArguments().First();
-                    var tableName = context.Db.EntityMaintenance.GetTableName(entityType);
-
-                    var seedDataTable = seedData.ToList().ToDataTable(tableName);
-
-                    if (seedDataTable.Columns.Contains(SqlSugarConst.PrimaryKey))
+                    
+                    var entityInfo = context.Db.EntityMaintenance.GetEntityInfo(entityType);
+                    if (entityInfo.Columns.Any(d => d.IsPrimarykey))
                     {
-                        var storage = context.Db.Storageable(seedDataTable)
-                            //.SplitInsert(d => !d.Any())
-                            .WhereColumns(SqlSugarConst.PrimaryKey).ToStorage();
+                        var storage = context.Db.StorageableByObject(seedData.ToList()).ToStorage();
                         storage.AsInsertable.ExecuteCommand();
-                        //var ignoreUpdate = hasDataMethod.GetCustomAttribute<IgnoreUpdateAttribute>();
-                        //if (ignoreUpdate == null) storage.AsUpdateable.ExecuteCommand();
                     }
-                    else // 没有主键或者不是预定义的主键(有重复的可能)
+                    else
                     {
-                        var storage = context.Db.Storageable(seedDataTable)
-                            .SplitDelete(d => true)
-                            .ToStorage();
-                        storage.AsInsertable.ExecuteCommand();
+                        // 无主键则只进行插入
+                        if (!context.Db.Queryable(entityInfo.DbTableName, entityInfo.DbTableName).Any())
+                            context.Db.InsertableByObject(seedData.ToList()).ExecuteCommand();
                     }
                 }
             }
@@ -173,6 +170,7 @@ namespace Hotline.Repository.SqlSugar.Extensions
             db.Aop.OnLogExecuting = (sql, pars) =>
             {
                 //Log.Information(sql);
+                //Log.Information(string.Join(',', pars.Select(d => d.Value)));
             };
             db.Aop.OnError = (exp) =>//SQL报错
             {

+ 1 - 1
src/Hotline.Repository.SqlSugar/System/HotspotTypeRepository.cs

@@ -6,7 +6,7 @@ using XF.Domain.Dependency;
 
 namespace Hotline.Repository.SqlSugar.System
 {
-    public class HotspotTypeRepository : BaseRepository<HotSpotType>, IHotspotTypeRepository, IScopeDependency
+    public class HotspotTypeRepository : BaseRepository<Hotspot>, IHotspotTypeRepository, IScopeDependency
     {
         public HotspotTypeRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder) : base(uow, dataPermissionFilterBuilder)
         {

+ 1 - 1
src/Hotline/CallCenter/Ivrs/Ivr.cs

@@ -70,7 +70,7 @@ public class Ivr : CreationEntity
     /// <summary>
     /// IVR策略
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<IvrStrategy> IvrStrategies { get; set; } = new();
 
     [SugarColumn(IsIgnore = true)]

+ 2 - 2
src/Hotline/FlowEngine/Definitions/Definition.cs

@@ -26,10 +26,10 @@ public class Definition : CreationEntity
     [SugarColumn(IsNullable = true)]
     public string? Description { get; set; }
 
-    [SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<StepDefine> Steps { get; set; } = new();
 
-    [SugarColumn(ColumnDataType = "longtext", IsNullable = true)]
+    [SugarColumn(ColumnDataType = "text", IsNullable = true)]
     public string? ExternalData { get; set; }
 
     public EDefinitionStatus Status { get; set; }

+ 4 - 4
src/Hotline/FlowEngine/Workflows/StepBasicEntity.cs

@@ -6,7 +6,7 @@ using XF.Domain.Repository;
 
 namespace Hotline.FlowEngine.Workflows;
 
-public class StepBasicEntity : CreationEntity
+public abstract class StepBasicEntity : CreationEntity
 {
     public string WorkflowId { get; set; }
 
@@ -30,7 +30,7 @@ public class StepBasicEntity : CreationEntity
     /// 根据类型可能为:roles, depLevels, depTypes, depCodes, userIds
     /// </example>
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<IdName> HandlerClassifies { get; set; } = new();
 
     /// <summary>
@@ -46,7 +46,7 @@ public class StepBasicEntity : CreationEntity
     /// 部门等级/分类为:orgCodes, 角色为:userIds
     /// </example>
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<IdName> NextHandlers { get; set; } = new();
 
     /// <summary>
@@ -74,7 +74,7 @@ public class StepBasicEntity : CreationEntity
     /// <summary>
     /// 附件
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> Additions { get; set; } = new();
 
     #endregion

+ 2 - 2
src/Hotline/FlowEngine/Workflows/Workflow.cs

@@ -78,13 +78,13 @@ public class Workflow : CreationEntity
     /// <summary>
     /// 办理人id
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> HandlerUsers { get; set; } = new();
 
     /// <summary>
     /// 办理部门code
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> HandlerOrgs { get; set; } = new();
 
     /// <summary>

+ 2 - 2
src/Hotline/FlowEngine/Workflows/WorkflowStep.cs

@@ -5,14 +5,14 @@ namespace Hotline.FlowEngine.Workflows;
 
 public class WorkflowStep : StepBasicEntity
 {
-    [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<NextStep> NextSteps { get; set; }
 
     /// <summary>
     /// 被指派办理对象(依据不同指派方式可能为:depCode或userId),该字段subStep才会存在,stepBox不存在
     /// 改为list,兼容多个办理对象可以办理同一个节点的场景
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> HandlerIds { get; set; } = new();
 
     /// <summary>

+ 1 - 1
src/Hotline/FlowEngine/Workflows/WorkflowSupplement.cs

@@ -20,7 +20,7 @@ public class WorkflowSupplement : CreationEntity
     /// <summary>
     /// 附件
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> Additions { get; set; } = new();
 
     [Navigate(NavigateType.OneToOne, nameof(CreatorId))]

+ 4 - 4
src/Hotline/KnowledgeBase/Knowledge.cs

@@ -41,7 +41,7 @@ public class Knowledge : WorkflowEntity//   WorkflowEntity  FullStateEntity
     /// <summary>
     /// 内容
     /// </summary>
-    [SugarColumn(ColumnDataType = "longtext")]
+    [SugarColumn(ColumnDataType = "text")]
     public string Content { get; set; }
 
     /// <summary>
@@ -94,13 +94,13 @@ public class Knowledge : WorkflowEntity//   WorkflowEntity  FullStateEntity
     /// <summary>
     /// 附件
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true, IsNullable = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
     public List<string> Additions { get; set; }
 
     /// <summary>
     /// 关联知识
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true, IsNullable = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true,IsNullable =true)]
     public List<string> Knowledges { get; set; }
 
     /// <summary>
@@ -125,5 +125,5 @@ public class Knowledge : WorkflowEntity//   WorkflowEntity  FullStateEntity
     /// 热点
     /// </summary>
     [Navigate(NavigateType.OneToOne, nameof(HotspotId))]//一对一 
-    public HotSpotType HotSpotType { get; set; }
+    public Hotspot HotspotType { get; set; }
 }

+ 1 - 1
src/Hotline/KnowledgeBase/KnowledgeStandard.cs

@@ -16,7 +16,7 @@ namespace Hotline.KnowledgeBase
         /// <summary>
         /// 内容
         /// </summary>
-        [SugarColumn(ColumnDataType = "longtext")]
+        [SugarColumn(ColumnDataType = "text")]
         public string Content { get; set; }
     }
 }

+ 1 - 1
src/Hotline/Orders/Order.cs

@@ -171,7 +171,7 @@ namespace Hotline.Orders
         /// <summary>
         /// 附件
         /// </summary>
-        [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<string> Additions { get; set; } = new();
 
         /// <summary>

+ 1 - 1
src/Hotline/Orders/OrderComplain.cs

@@ -45,7 +45,7 @@ public class OrderComplain : OrderExtensionEntity
     /// <summary>
     /// 诉求内容,多选
     /// </summary>
-    [SugarColumn(ColumnDataType = "varchar(600)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<EComplainType> ComplainTypes { get; set; } = new();
 
     #endregion

+ 1 - 1
src/Hotline/Orders/OrderExtensionEntity.cs

@@ -4,7 +4,7 @@ using XF.Domain.Repository;
 
 namespace Hotline.Orders;
 
-public class OrderExtensionEntity : FullStateEntity
+public abstract class OrderExtensionEntity : FullStateEntity
 {
     #region 投诉人信息
 

+ 0 - 1
src/Hotline/SeedData/OrgSeedData.cs

@@ -18,7 +18,6 @@ namespace Hotline.SeedData
                 OrgName = "12345政务服务便民热线",
                 OrgCode = CallCenterCode,
                 IsEnable = true,
-                CreationTime = DateTime.Now
             }
         };
     }

+ 0 - 1
src/Hotline/SeedData/RoleSeedData.cs

@@ -22,7 +22,6 @@ public class RoleSeedData : ISeedData<Role>
                 Name = AdminRole,
                 DisplayName = "系统管理员",
                 Description = "系统管理员",
-                CreationTime = DateTime.Now
             }
         };
 }

+ 0 - 1
src/Hotline/SeedData/SysAccountSeedData.cs

@@ -26,7 +26,6 @@ namespace Hotline.SeedData
                     UserName = "sysadmin",
                     Name = "初始系统管理账号",
                     PasswordHash = "AQAAAAEAACcQAAAAEKTgPA/GB2GnCEX+yTgZl878j9M7MOEHxdEgRIMc6xcErRv/oDsMmJBB5zaxcDmXyw==",
-                    CreationTime = DateTime.Now
                 }
             };
     }

+ 0 - 1
src/Hotline/SeedData/UserSeedData.cs

@@ -16,7 +16,6 @@ public class UserSeedData : ISeedData<User>
             {
                 Id = SysAccountSeedData.Id,
                 Name = "系统管理员",
-                CreationTime = DateTime.Now,
             }
         };
 }

+ 2 - 2
src/Hotline/Settings/Hotspots/HotSpotType.cs → src/Hotline/Settings/Hotspots/Hotspot.cs

@@ -6,7 +6,7 @@ namespace Hotline.Settings.Hotspots
     /// <summary>
     /// 热点基础数据
     /// </summary>
-    public class HotSpotType : CreationSoftDeleteEntity
+    public class Hotspot : CreationSoftDeleteEntity
     {
         public string HotSpotName { get; set; }
         [SugarColumn(IsNullable = true)]
@@ -24,6 +24,6 @@ namespace Hotline.Settings.Hotspots
         public string HotSpotFullName { get; set; }
 
         [SugarColumn(IsIgnore = true)]
-        public List<HotSpotType> Children { get; set; }
+        public List<Hotspot> Children { get; set; }
     }
 }

+ 1 - 1
src/Hotline/Settings/Hotspots/IHotspotTypeRepository.cs

@@ -2,7 +2,7 @@
 
 namespace Hotline.Settings.Hotspots
 {
-    public interface IHotspotTypeRepository : IRepository<HotSpotType>
+    public interface IHotspotTypeRepository : IRepository<Hotspot>
     {
 
     }

+ 2 - 2
src/Hotline/Settings/SystemAuthority.cs

@@ -22,13 +22,13 @@ namespace Hotline.Settings
         /// <summary>
         /// 菜单ID
         /// </summary>
-        [SugarColumn(ColumnDataType = "varchar(3000)", IsJson = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<string> SystemMenuArr { get; set; }
 
         /// <summary>
         /// 功能点
         /// </summary>
-        [SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<string> SystemButtonArr { get; set; }
 
         public List<string> GetAllPermissions()

+ 3 - 3
src/Hotline/Settings/TimeLimits/TimeLimit.cs

@@ -16,19 +16,19 @@ namespace Hotline.Settings.TimeLimits
 
         public ETimeLimitState TimeLimitState { get; set; }
 
-        [SugarColumn(ColumnDataType = "longtext", IsJson = true, IsNullable = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
         public List<ParamValueModel>? ParamArr { get; set; }
 
         /// <summary>
         /// 排序
         /// </summary>
-        [SugarColumn(ColumnDataType = "longtext", IsJson = true, IsNullable = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
         public List<PriorityModel>? Priority { get; set; }
 
         /// <summary>
         /// 组合
         /// </summary>
-        [SugarColumn(ColumnDataType = "longtext", IsJson = true, IsNullable = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
         public List<CombinationModel>? Combination { get; set; }
 
     }

+ 1 - 1
src/Hotline/Settings/TrunkIvrManager.cs

@@ -38,7 +38,7 @@ namespace Hotline.Settings
         /// <summary>
         /// 工作日
         /// </summary>
-        [SugarColumn(ColumnDataType = "varchar(255)", IsJson = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<WorkDayModel> WorkDay { get; set; }
 
         /// <summary>

+ 1 - 1
src/Hotline/Settings/UserFastMenu.cs

@@ -17,7 +17,7 @@ namespace Hotline.Settings
         /// <summary>
         /// 快捷菜单集合
         /// </summary>
-        [SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
+        [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<string> FastMenuArr { get; set; }
     }
 }

+ 4 - 4
src/XF.Domain.Repository/Entity.cs

@@ -146,10 +146,10 @@ public abstract class WorkflowEntity : FullStateEntity, IWorkflow
     [SugarColumn(IsNullable = true)]
     public string? ExpiredTimeConfigId { get; set; }
 
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> AssignOrgCodes { get; set; } = new();
 
-    [SugarColumn(ColumnDataType = "longtext", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> AssignUserIds { get; set; } = new();
 
     //[SugarColumn(ColumnDataType = "varchar(600)", IsJson = true)]
@@ -241,10 +241,10 @@ public abstract class PositionWorkflowEntity : PositionEntity, IWorkflow
     [SugarColumn(IsNullable = true)]
     public string? ExpiredTimeConfigId { get; set; }
 
-    [SugarColumn(ColumnDataType = "varchar(1000)", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> AssignOrgCodes { get; set; } = new();
 
-    [SugarColumn(ColumnDataType = "longtext", IsJson = true)]
+    [SugarColumn(ColumnDataType = "json", IsJson = true)]
     public List<string> AssignUserIds { get; set; } = new();
 
     //[SugarColumn(ColumnDataType = "varchar(600)", IsJson = true)]