😎1、去掉bool类型默认值(多库不兼容) 2、调整系统配置接口名称 3、其他代码优化
This commit is contained in:
parent
3b362a937f
commit
d17e26aa26
@ -41,7 +41,7 @@
|
|||||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
||||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
||||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1080" />
|
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1081" />
|
||||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -80,8 +80,8 @@ public abstract class EntityBase : EntityBaseId, IDeletedFilter
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 软删除
|
/// 软删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "软删除", DefaultValue = "false")]
|
[SugarColumn(ColumnDescription = "软删除")]
|
||||||
public virtual bool IsDelete { get; set; } = false;
|
public virtual bool? IsDelete { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ internal interface IDeletedFilter
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 软删除
|
/// 软删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsDelete { get; set; }
|
bool? IsDelete { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -126,7 +126,7 @@ public partial class SysCodeGen : EntityBase
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否使用 Api Service
|
/// 是否使用 Api Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否使用 Api Service", DefaultValue = "false")]
|
[SugarColumn(ColumnDescription = "是否使用 Api Service")]
|
||||||
public bool IsApiService { get; set; } = false;
|
public bool IsApiService { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -106,6 +106,6 @@ public partial class SysFile : EntityTenantBaseData
|
|||||||
/// 是否公开
|
/// 是否公开
|
||||||
/// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
/// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否公开", DefaultValue = "false")]
|
[SugarColumn(ColumnDescription = "是否公开")]
|
||||||
public bool IsPublic { get; set; } = false;
|
public bool IsPublic { get; set; } = false;
|
||||||
}
|
}
|
||||||
@ -52,13 +52,13 @@ public partial class SysJobDetail : EntityBaseId
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否并行执行
|
/// 是否并行执行
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否并行执行", DefaultValue = "true")]
|
[SugarColumn(ColumnDescription = "是否并行执行")]
|
||||||
public bool Concurrent { get; set; } = true;
|
public bool Concurrent { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否扫描特性触发器
|
/// 是否扫描特性触发器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否扫描特性触发器", ColumnName = "annotation", DefaultValue = "false")]
|
[SugarColumn(ColumnDescription = "是否扫描特性触发器", ColumnName = "annotation")]
|
||||||
public bool IncludeAnnotation { get; set; } = false;
|
public bool IncludeAnnotation { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -118,25 +118,25 @@ public partial class SysJobTrigger : EntityBaseId
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重试间隔时间(ms)
|
/// 重试间隔时间(ms)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "重试间隔时间(ms)", DefaultValue = "1000")]
|
[SugarColumn(ColumnDescription = "重试间隔时间(ms)", DefaultValue = "3000")]
|
||||||
public int RetryTimeout { get; set; } = 1000;
|
public int RetryTimeout { get; set; } = 3000;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否立即启动
|
/// 是否立即启动
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否立即启动", DefaultValue = "true")]
|
[SugarColumn(ColumnDescription = "是否立即启动")]
|
||||||
public bool StartNow { get; set; } = true;
|
public bool StartNow { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否启动时执行一次
|
/// 是否启动时执行一次
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否启动时执行一次", DefaultValue = "false")]
|
[SugarColumn(ColumnDescription = "是否启动时执行一次")]
|
||||||
public bool RunOnStart { get; set; } = false;
|
public bool RunOnStart { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否在启动时重置最大触发次数等于一次的作业
|
/// 是否在启动时重置最大触发次数等于一次的作业
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "是否重置触发次数", DefaultValue = "true")]
|
[SugarColumn(ColumnDescription = "是否重置触发次数")]
|
||||||
public bool ResetOnlyOnce { get; set; } = true;
|
public bool ResetOnlyOnce { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -478,10 +478,10 @@ public class SysFileService : IDynamicApiController, ITransient
|
|||||||
if (ids == null || ids.Count == 0)
|
if (ids == null || ids.Count == 0)
|
||||||
return 0;
|
return 0;
|
||||||
return await _sysFileRep.AsUpdateable()
|
return await _sysFileRep.AsUpdateable()
|
||||||
.SetColumns(m => m.RelationName == relationName)
|
.SetColumns(u => u.RelationName == relationName)
|
||||||
.SetColumns(m => m.RelationId == relationId)
|
.SetColumns(u => u.RelationId == relationId)
|
||||||
.SetColumns(m => m.BelongId == belongId)
|
.SetColumns(u => u.BelongId == belongId)
|
||||||
.Where(m => ids.Contains(m.Id))
|
.Where(u => ids.Contains(u.Id))
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,25 +495,24 @@ public class SysFileService : IDynamicApiController, ITransient
|
|||||||
public async Task<List<FileOutput>> GetRelationFiles([FromQuery] RelationQueryInput input)
|
public async Task<List<FileOutput>> GetRelationFiles([FromQuery] RelationQueryInput input)
|
||||||
{
|
{
|
||||||
return await _sysFileRep.AsQueryable()
|
return await _sysFileRep.AsQueryable()
|
||||||
.Where(m => !m.IsDelete)
|
.WhereIF(input.RelationId.HasValue && input.RelationId > 0, u => u.RelationId == input.RelationId)
|
||||||
.WhereIF(input.RelationId.HasValue && input.RelationId > 0, m => m.RelationId == input.RelationId)
|
.WhereIF(input.BelongId.HasValue && input.BelongId > 0, u => u.BelongId == input.BelongId.Value)
|
||||||
.WhereIF(input.BelongId.HasValue && input.BelongId > 0, m => m.BelongId == input.BelongId.Value)
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RelationName), u => u.RelationName == input.RelationName)
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.RelationName), m => m.RelationName == input.RelationName)
|
.WhereIF(!string.IsNullOrWhiteSpace(input.FileTypes), u => input.GetFileTypeBS().Contains(u.FileType))
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.FileTypes), m => input.GetFileTypeBS().Contains(m.FileType))
|
.Select(u => new FileOutput
|
||||||
.Select(m => new FileOutput
|
|
||||||
{
|
{
|
||||||
Id = m.Id,
|
Id = u.Id,
|
||||||
FileType = m.FileType,
|
FileType = u.FileType,
|
||||||
Name = m.FileName,
|
Name = u.FileName,
|
||||||
RelationId = m.RelationId,
|
RelationId = u.RelationId,
|
||||||
BelongId = m.BelongId,
|
BelongId = u.BelongId,
|
||||||
FilePath = m.FilePath,
|
FilePath = u.FilePath,
|
||||||
SizeKb = m.SizeKb,
|
SizeKb = u.SizeKb,
|
||||||
Suffix = m.Suffix,
|
Suffix = u.Suffix,
|
||||||
RelationName = m.RelationName,
|
RelationName = u.RelationName,
|
||||||
Url = SqlFunc.MergeString("/api/sysFile/Preview/", m.Id.ToString()),
|
Url = SqlFunc.MergeString("/api/sysFile/Preview/", u.Id.ToString()),
|
||||||
CreateUserName = m.CreateUserName,
|
CreateUserName = u.CreateUserName,
|
||||||
CreateTime = m.CreateTime,
|
CreateTime = u.CreateTime,
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user