mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-10-31 03:19:26 +08:00 
			
		
		
		
	refactor: ♻️ 基础框架的实体更新逻辑 (#137)
Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
		| @@ -23,7 +23,7 @@ XML注释文件不存在 | ||||
| 学历不正确 | ||||
| 密码不能为空 | ||||
| 已处理完毕 | ||||
| 并发冲突请稍后重试 | ||||
| 并发冲突_请稍后重试 | ||||
| 开始事务 | ||||
| 性别不正确 | ||||
| 手机号码不正确 | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -10,16 +10,12 @@ namespace NetAdmin.Application.Modules; | ||||
| /// <typeparam name="TCreateRsp">创建响应类型</typeparam> | ||||
| /// <typeparam name="TQueryReq">查询请求类型</typeparam> | ||||
| /// <typeparam name="TQueryRsp">查询响应类型</typeparam> | ||||
| /// <typeparam name="TUpdateReq">修改请求类型</typeparam> | ||||
| /// <typeparam name="TUpdateRsp">修改响应类型</typeparam> | ||||
| /// <typeparam name="TDelReq">删除请求类型</typeparam> | ||||
| public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, in TUpdateReq, TUpdateRsp, TDelReq> | ||||
| public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TDelReq> | ||||
|     where TCreateReq : DataAbstraction, new() | ||||
|     where TCreateRsp : DataAbstraction | ||||
|     where TQueryReq : DataAbstraction, new() | ||||
|     where TQueryRsp : DataAbstraction | ||||
|     where TUpdateReq : DataAbstraction, new() | ||||
|     where TUpdateRsp : DataAbstraction | ||||
|     where TDelReq : DataAbstraction, new() | ||||
| { | ||||
|     /// <summary> | ||||
| @@ -61,9 +57,4 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, in | ||||
|     ///     查询实体 | ||||
|     /// </summary> | ||||
|     Task<IEnumerable<TQueryRsp>> QueryAsync(QueryReq<TQueryReq> req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     更新实体 | ||||
|     /// </summary> | ||||
|     Task<TUpdateRsp> UpdateAsync(TUpdateReq req); | ||||
| } | ||||
| @@ -0,0 +1,20 @@ | ||||
| using NetAdmin.Domain.Contexts; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Application.Repositories; | ||||
|  | ||||
| /// <summary> | ||||
| ///     基础仓储 | ||||
| /// </summary> | ||||
| public sealed class BasicRepository<TEntity, TPrimary>( | ||||
|     IFreeSql          fSql | ||||
|   , UnitOfWorkManager uowManger | ||||
|   , ContextUserToken  userToken) : DefaultRepository<TEntity, TPrimary>(fSql, uowManger) | ||||
|     where TEntity : EntityBase<TPrimary> // | ||||
|     where TPrimary : IEquatable<TPrimary> | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     当前上下文关联的用户令牌 | ||||
|     /// </summary> | ||||
|     public ContextUserToken UserToken => userToken; | ||||
| } | ||||
| @@ -1,17 +0,0 @@ | ||||
| using NetAdmin.Domain.Contexts; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Application.Repositories; | ||||
|  | ||||
| /// <summary> | ||||
| ///     默认仓储 | ||||
| /// </summary> | ||||
| public sealed class DefaultRepository<TEntity>(IFreeSql fSql, UnitOfWorkManager uowManger, ContextUserToken userToken) | ||||
|     : DefaultRepository<TEntity, long>(fSql, uowManger) | ||||
|     where TEntity : EntityBase | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     当前上下文关联的用户令牌 | ||||
|     /// </summary> | ||||
|     public ContextUserToken UserToken => userToken; | ||||
| } | ||||
| @@ -7,9 +7,11 @@ namespace NetAdmin.Application.Services; | ||||
| /// <summary> | ||||
| ///     RedLocker Service Base | ||||
| /// </summary> | ||||
| public abstract class RedLockerService<T1, T2>(DefaultRepository<T1> rpo, RedLocker redLocker) | ||||
|     : RepositoryService<T1, T2>(rpo) | ||||
|     where T1 : EntityBase | ||||
| public abstract class RedLockerService<TEntity, TPrimary, TLogger>( | ||||
|     BasicRepository<TEntity, TPrimary> rpo | ||||
|   , RedLocker                          redLocker) : RepositoryService<TEntity, TPrimary, TLogger>(rpo) | ||||
|     where TEntity : EntityBase<TPrimary> // | ||||
|     where TPrimary : IEquatable<TPrimary> | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     获取锁 | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| using NetAdmin.Application.Repositories; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Application.Services; | ||||
|  | ||||
| @@ -7,14 +8,17 @@ namespace NetAdmin.Application.Services; | ||||
| ///     仓储服务基类 | ||||
| /// </summary> | ||||
| /// <typeparam name="TEntity">实体类型</typeparam> | ||||
| /// <typeparam name="TPrimary">主键类型</typeparam> | ||||
| /// <typeparam name="TLogger">日志类型</typeparam> | ||||
| public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEntity> rpo) : ServiceBase<TLogger> | ||||
|     where TEntity : EntityBase | ||||
| public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicRepository<TEntity, TPrimary> rpo) | ||||
|     : ServiceBase<TLogger> | ||||
|     where TEntity : EntityBase<TPrimary> // | ||||
|     where TPrimary : IEquatable<TPrimary> | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     默认仓储 | ||||
|     /// </summary> | ||||
|     protected DefaultRepository<TEntity> Rpo => rpo; | ||||
|     protected BasicRepository<TEntity, TPrimary> Rpo => rpo; | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     启用级联保存 | ||||
| @@ -25,10 +29,45 @@ public abstract class RepositoryService<TEntity, TLogger>(DefaultRepository<TEnt | ||||
|     } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     针对 Sqlite 数据的更新操作 | ||||
|     ///     更新实体 | ||||
|     /// </summary> | ||||
|     /// <returns> | ||||
|     ///     非 Sqlite 数据库请删除 | ||||
|     /// </returns> | ||||
|     protected abstract Task<TEntity> UpdateForSqliteAsync(TEntity req); | ||||
|     protected Task<int> UpdateAsync(TEntity dto, IEnumerable<string> includeFields, string[] excludeFields = null | ||||
|                                   , Expression<Func<TEntity, bool>> whereExp = null) | ||||
|     { | ||||
|         whereExp ??= a => a.Id.Equals(dto.Id); | ||||
|         var update = BuildUpdate(dto, includeFields, excludeFields).Where(whereExp); | ||||
|  | ||||
|         return update.ExecuteAffrowsAsync(); | ||||
|     } | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     /// <summary> | ||||
|     ///     更新实体 | ||||
|     /// </summary> | ||||
|     protected Task<List<TEntity>> UpdateEntityAsync(TEntity dto, IEnumerable<string> includeFields | ||||
|                                                   , string[] excludeFields = null | ||||
|                                                   , Expression<Func<TEntity, bool>> whereExp = null) | ||||
|     { | ||||
|         whereExp ??= a => a.Id.Equals(dto.Id); | ||||
|         return BuildUpdate(dto, includeFields, excludeFields).Where(whereExp).ExecuteUpdatedAsync(); | ||||
|     } | ||||
|     #endif | ||||
|  | ||||
|     private IUpdate<TEntity> BuildUpdate(TEntity dto, IEnumerable<string> includeFields, string[] excludeFields = null) | ||||
|     { | ||||
|         var ret = includeFields == null | ||||
|             ? Rpo.UpdateDiy.SetSource(dto) | ||||
|             : Rpo.UpdateDiy.SetDto(includeFields!.ToDictionary( | ||||
|                                        x => x | ||||
|                                      , x => typeof(TEntity).GetProperty(x, BindingFlags.Public | BindingFlags.Instance)! | ||||
|                                                            .GetValue(dto))); | ||||
|         if (excludeFields != null) { | ||||
|             ret = ret.IgnoreColumns(excludeFields); | ||||
|         } | ||||
|  | ||||
|         if (dto is IFieldVersion version) { | ||||
|             ret = ret.Where($"{nameof(IFieldVersion.Version)} = @version", new { version = version.Version }); | ||||
|         } | ||||
|  | ||||
|         return ret; | ||||
|     } | ||||
| } | ||||
| @@ -3,4 +3,11 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <summary> | ||||
| ///     数据库实体基类 | ||||
| /// </summary> | ||||
| public abstract record EntityBase : DataAbstraction; | ||||
| public abstract record EntityBase<T> : DataAbstraction | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     唯一编码 | ||||
|     /// </summary> | ||||
|     public virtual T Id { get; init; } | ||||
| } | ||||
| @@ -1,12 +0,0 @@ | ||||
| namespace NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| /// <summary> | ||||
| ///     主键字段接口 | ||||
| /// </summary> | ||||
| public interface IFieldPrimary<T> | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     唯一编码 | ||||
|     /// </summary> | ||||
|     T Id { get; init; } | ||||
| } | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record ImmutableEntity : ImmutableEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -17,6 +17,7 @@ public abstract record ImmutableEntity : ImmutableEntity<long> | ||||
| /// </summary> | ||||
| /// <typeparam name="T">主键类型</typeparam> | ||||
| public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreatedUser | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" /> | ||||
|     [Column(CanUpdate = false, Position = -1)] | ||||
| @@ -28,7 +29,7 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     public override T Id { get; init; } | ||||
| } | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record LiteImmutableEntity : LiteImmutableEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -16,15 +16,16 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long> | ||||
| ///     轻型不可变实体 | ||||
| /// </summary> | ||||
| /// <typeparam name="T">主键类型</typeparam> | ||||
| public abstract record LiteImmutableEntity<T> : EntityBase, IFieldPrimary<T>, IFieldCreatedTime | ||||
| public abstract record LiteImmutableEntity<T> : EntityBase<T>, IFieldCreatedTime | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldCreatedTime.CreatedTime" /> | ||||
|     [Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)] | ||||
|     [JsonIgnore] | ||||
|     public virtual DateTime CreatedTime { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [JsonIgnore] | ||||
|     public virtual T Id { get; init; } | ||||
|     public override T Id { get; init; } | ||||
| } | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record LiteMutableEntity : LiteMutableEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -16,8 +16,9 @@ public abstract record LiteMutableEntity : LiteMutableEntity<long> | ||||
| ///     轻型可变实体 | ||||
| /// </summary> | ||||
| public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModifiedTime | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     public override T Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record LiteVersionEntity : LiteVersionEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -16,8 +16,9 @@ public abstract record LiteVersionEntity : LiteVersionEntity<long> | ||||
| ///     乐观锁轻型可变实体 | ||||
| /// </summary> | ||||
| public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersion | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     public override T Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record MutableEntity : MutableEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -16,8 +16,9 @@ public abstract record MutableEntity : MutableEntity<long> | ||||
| ///     可变实体 | ||||
| /// </summary> | ||||
| public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUser | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     public override T Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -3,4 +3,5 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <summary> | ||||
| ///     简单实体 | ||||
| /// </summary> | ||||
| public abstract record SimpleEntity : EntityBase; | ||||
| public abstract record SimpleEntity<T> : EntityBase<T> | ||||
|     where T : IEquatable<T>; | ||||
| @@ -6,7 +6,7 @@ namespace NetAdmin.Domain.DbMaps.Dependency; | ||||
| /// <inheritdoc /> | ||||
| public abstract record VersionEntity : VersionEntity<long> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [Snowflake] | ||||
|     public override long Id { get; init; } | ||||
| @@ -16,6 +16,7 @@ public abstract record VersionEntity : VersionEntity<long> | ||||
| ///     乐观锁可变实体 | ||||
| /// </summary> | ||||
| public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUser, IFieldCreatedUser | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     [Column(CanUpdate = false, Position = -1)] | ||||
| @@ -27,7 +28,7 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserName { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     public override T Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -16,7 +16,7 @@ public record Sys_Api : ImmutableEntity<string>, IFieldSummary | ||||
|     [Navigate(nameof(ParentId))] | ||||
|     public IEnumerable<Sys_Api> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127, IsIdentity = false, IsPrimary = true, Position = 1)] | ||||
|     [JsonIgnore] | ||||
|     public override string Id { get; init; } | ||||
|   | ||||
| @@ -61,11 +61,7 @@ public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort | ||||
|     /// <summary> | ||||
|     ///     部门描述 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
| } | ||||
| @@ -75,10 +75,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     请求体 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
| @@ -86,10 +86,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     请求头 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeader { get; init; } | ||||
| @@ -97,10 +97,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     请求的网络地址 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestUrl { get; init; } | ||||
| @@ -113,10 +113,10 @@ public record Sys_Job : VersionEntity, IFieldEnabled, IFieldSummary | ||||
|     public virtual JobStatues Status { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldSummary.Summary" /> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|   | ||||
| @@ -48,10 +48,10 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     /// <summary> | ||||
|     ///     请求体 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
| @@ -59,10 +59,10 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     /// <summary> | ||||
|     ///     请求头 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeader { get; init; } | ||||
| @@ -77,10 +77,10 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     /// <summary> | ||||
|     ///     响应体 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseBody { get; init; } | ||||
| @@ -88,10 +88,10 @@ public record Sys_JobRecord : LiteImmutableEntity | ||||
|     /// <summary> | ||||
|     ///     响应头 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseHeader { get; init; } | ||||
|   | ||||
| @@ -35,21 +35,17 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     创建者来源地址 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public string CreatedReferer { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     创建者客户端用户代理 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_1022)] | ||||
|     #else | ||||
|     [Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string CreatedUserAgent { get; init; } | ||||
| @@ -71,10 +67,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     异常信息 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Exception { get; init; } | ||||
| @@ -82,10 +78,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     附加数据 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ExtraData { get; init; } | ||||
| @@ -107,21 +103,17 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     来源地址 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ReferUrl { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     请求内容 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestBody { get; init; } | ||||
| @@ -136,10 +128,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     请求头信息 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string RequestHeaders { get; init; } | ||||
| @@ -154,10 +146,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     响应内容 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseBody { get; init; } | ||||
| @@ -172,10 +164,10 @@ public record Sys_RequestLog : ImmutableEntity, IFieldCreatedClient | ||||
|     /// <summary> | ||||
|     ///     响应头 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string ResponseHeaders { get; init; } | ||||
|   | ||||
| @@ -85,11 +85,7 @@ public record Sys_Role : VersionEntity, IFieldSort, IFieldEnabled, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     备注 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -14,10 +14,10 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     消息内容 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     #if DBTYPE_SQLSERVER | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Content { get; init; } | ||||
| @@ -59,22 +59,14 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary | ||||
|     /// <summary> | ||||
|     ///     消息摘要 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     消息主题 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Title { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -85,11 +85,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|     /// <summary> | ||||
|     ///     描述 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public virtual string Summary { get; init; } | ||||
|  | ||||
| @@ -119,7 +115,7 @@ public record Sys_User : VersionEntity, IFieldSummary, IFieldEnabled, IRegister | ||||
|                           ? Array.Empty<Sys_Role>() | ||||
|                           : s.RoleIds.Select(x => new Sys_Role { Id = x })); | ||||
|  | ||||
|         _ = config.ForType<UpdateUserReq, Sys_User>() | ||||
|         _ = config.ForType<EditSingleUserReq, Sys_User>() | ||||
|                   .Map( // | ||||
|                       d => d.Password, s => s.PasswordText.NullOrEmpty() ? Guid.Empty : s.PasswordText.Pwd().Guid()) | ||||
|                   .Map( // | ||||
|   | ||||
| @@ -33,11 +33,7 @@ public record Sys_VerifyCode : VersionEntity | ||||
|     /// <summary> | ||||
|     ///     发送报告 | ||||
|     /// </summary> | ||||
|     #if DBTYPE_SQLITE | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] | ||||
|     #else | ||||
|     [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_MAX)] | ||||
|     #endif | ||||
|     [JsonIgnore] | ||||
|     public string Report { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Dependency; | ||||
|  | ||||
| @@ -8,8 +8,9 @@ public sealed record DelReq : DelReq<long>; | ||||
| /// <summary> | ||||
| ///     请求:通过编号删除 | ||||
| /// </summary> | ||||
| public record DelReq<T> : DataAbstraction, IFieldPrimary<T> | ||||
| public record DelReq<T> : EntityBase<T> | ||||
|     where T : IEquatable<T> | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     public T Id { get; init; } | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     public override T Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -11,7 +12,7 @@ public sealed record QueryApiRsp : Sys_Api | ||||
|     /// <inheritdoc cref="Sys_Api.Children" /> | ||||
|     public new IEnumerable<QueryApiRsp> Children { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     public override string Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_Api.Method" /> | ||||
|   | ||||
| @@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| namespace NetAdmin.Domain.Dto.Sys.Config; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新配置 | ||||
| ///     请求:编辑配置 | ||||
| /// </summary> | ||||
| public sealed record UpdateConfigReq : CreateConfigReq | ||||
| public sealed record EditConfigReq : CreateConfigReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -12,7 +13,7 @@ public sealed record QueryConfigReq : Sys_Config | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public new bool? Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| @@ -18,7 +19,7 @@ public sealed record QueryConfigRsp : Sys_Config | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,13 +1,14 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| 
 | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新部门 | ||||
| ///     请求:编辑部门 | ||||
| /// </summary> | ||||
| public sealed record UpdateDeptReq : CreateDeptReq | ||||
| public sealed record EditDeptReq : CreateDeptReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| 
 | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Dept; | ||||
| /// </summary> | ||||
| public sealed record QueryDeptReq : Sys_Dept | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -19,7 +20,7 @@ public sealed record QueryDeptRsp : Sys_Dept | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Catalog; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新字典目录 | ||||
| ///     请求:编辑字典目录 | ||||
| /// </summary> | ||||
| public sealed record UpdateDicCatalogReq : CreateDicCatalogReq | ||||
| public sealed record EditDicCatalogReq : CreateDicCatalogReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -15,7 +16,7 @@ public sealed record QueryDicCatalogRsp : Sys_DicCatalog | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string Code { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| namespace NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新字典内容 | ||||
| ///     请求:编辑字典内容 | ||||
| /// </summary> | ||||
| public sealed record UpdateDicContentReq : CreateDicContentReq | ||||
| public sealed record EditDicContentReq : CreateDicContentReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
							
								
								
									
										11
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/EditJobReq.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/EditJobReq.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:编辑计划作业 | ||||
| /// </summary> | ||||
| public sealed record EditJobReq : CreateJobReq | ||||
| { | ||||
|     /// <inheritdoc cref="System.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
							
								
								
									
										8
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/FinishJobReq.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/FinishJobReq.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:完成计划作业 | ||||
| /// </summary> | ||||
| public sealed record FinishJobReq : Sys_Job; | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
| /// </summary> | ||||
| public sealed record QueryJobReq : Sys_Job | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.User; | ||||
| @@ -35,7 +36,7 @@ public sealed record QueryJobRsp : Sys_Job | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override HttpMethods HttpMethod { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
							
								
								
									
										18
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/SetJobEnabledReq.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								src/backend/NetAdmin.Domain/Dto/Sys/Job/SetJobEnabledReq.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:设置计划作业启用状态 | ||||
| /// </summary> | ||||
| public sealed record SetJobEnabledReq : Sys_Job | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldEnabled.Enabled" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
| /// </summary> | ||||
| public sealed record QueryJobRecordReq : Sys_JobRecord | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using HttpMethods = NetAdmin.Domain.Enums.HttpMethods; | ||||
| @@ -25,7 +26,7 @@ public sealed record QueryJobRecordRsp : Sys_JobRecord | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override HttpMethods HttpMethod { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,6 +0,0 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.JobRecord; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新计划作业执行记录 | ||||
| /// </summary> | ||||
| public sealed record UpdateJobRecordReq : CreateJobRecordReq; | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| 
 | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
| @@ -5,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
| /// <summary> | ||||
| ///     请求:更新菜单 | ||||
| /// </summary> | ||||
| public sealed record UpdateMenuReq : CreateMenuReq | ||||
| public sealed record EditMenuReq : CreateMenuReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| 
 | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Menu; | ||||
| /// </summary> | ||||
| public sealed record QueryMenuReq : Sys_Menu | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -36,7 +37,7 @@ public sealed record QueryMenuRsp : Sys_Menu, IRegister | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool HiddenBreadCrumb { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,13 +1,14 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| 
 | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:修改角色 | ||||
| ///     请求:编辑角色 | ||||
| /// </summary> | ||||
| public sealed record UpdateRoleReq : CreateRoleReq | ||||
| public sealed record EditRoleReq : CreateRoleReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.唯一编码不能为空))] | ||||
|     public override long Id { get; init; } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.Role; | ||||
| /// </summary> | ||||
| public sealed record QueryRoleReq : Sys_Role | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
| @@ -37,7 +38,7 @@ public sealed record QueryRoleRsp : Sys_Role, IRegister | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgReq : Sys_SiteMsg | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| @@ -29,7 +30,7 @@ public sealed record QuerySiteMsgRsp : Sys_SiteMsg | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public new IEnumerable<QueryDeptRsp> Depts { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,13 +0,0 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新站内信 | ||||
| /// </summary> | ||||
| public sealed record UpdateSiteMsgReq : CreateSiteMsgReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgDeptReq : Sys_SiteMsgDept | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgDeptRsp : Sys_SiteMsgDept | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,6 +0,0 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新站内信-部门映射 | ||||
| /// </summary> | ||||
| public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq; | ||||
| @@ -1,11 +1,12 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.Dto.Sys.SiteMsg; | ||||
| 
 | ||||
| namespace NetAdmin.Domain.Dto.Sys.Job; | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新计划作业 | ||||
| ///     请求:编辑站内信 | ||||
| /// </summary> | ||||
| public sealed record UpdateJobReq : CreateJobReq | ||||
| public sealed record EditSiteMsgReq : CreateSiteMsgReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgFlagReq : Sys_SiteMsgFlag | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Enums.Sys; | ||||
|  | ||||
| @@ -9,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgFlagRsp : Sys_SiteMsgFlag | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -0,0 +1,6 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:设置用户站内信状态 | ||||
| /// </summary> | ||||
| public sealed record SetUserSiteMsgStatusReq : CreateSiteMsgFlagReq; | ||||
| @@ -1,6 +0,0 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新站内信标记 | ||||
| /// </summary> | ||||
| public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq; | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgRoleReq : Sys_SiteMsgRole | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgRoleRsp : Sys_SiteMsgRole | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,6 +0,0 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新站内信-角色映射 | ||||
| /// </summary> | ||||
| public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq; | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgUserReq : Sys_SiteMsgUser | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser; | ||||
| /// </summary> | ||||
| public sealed record QuerySiteMsgUserRsp : Sys_SiteMsgUser | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,6 +0,0 @@ | ||||
| namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新站内信-用户映射 | ||||
| /// </summary> | ||||
| public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq; | ||||
| @@ -5,9 +5,9 @@ using NetAdmin.Domain.DbMaps.Sys; | ||||
| namespace NetAdmin.Domain.Dto.Sys.User; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:创建更新用户 | ||||
| ///     请求:创建编辑用户 | ||||
| /// </summary> | ||||
| public abstract record CreateUpdateUserReq : Sys_User | ||||
| public abstract record CreateEditUserReq : Sys_User | ||||
| { | ||||
|     /// <inheritdoc cref="Sys_User.Avatar" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
| @@ -6,9 +6,9 @@ namespace NetAdmin.Domain.Dto.Sys.User; | ||||
| /// <summary> | ||||
| ///     请求:创建用户 | ||||
| /// </summary> | ||||
| public sealed record CreateUserReq : CreateUpdateUserReq, IRegister | ||||
| public sealed record CreateUserReq : CreateEditUserReq, IRegister | ||||
| { | ||||
|     /// <inheritdoc cref="CreateUpdateUserReq.PasswordText" /> | ||||
|     /// <inheritdoc cref="CreateEditUserReq.PasswordText" /> | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.密码不能为空))] | ||||
|     public override string PasswordText { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -0,0 +1,23 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.User; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:编辑用户单体 | ||||
| /// </summary> | ||||
| public sealed record EditSingleUserReq : CreateEditUserReq | ||||
| { | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="Sys_User.Profile" /> | ||||
|     public new EditUserProfileReq Profile { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
| @@ -5,16 +6,16 @@ using NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
| namespace NetAdmin.Domain.Dto.Sys.User; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新用户 | ||||
| ///     请求:编辑用户 | ||||
| /// </summary> | ||||
| public sealed record UpdateUserReq : CreateUpdateUserReq | ||||
| public sealed record EditUserReq : CreateEditUserReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| 
 | ||||
|     /// <inheritdoc cref="Sys_User.Profile" /> | ||||
|     public new UpdateUserProfileReq Profile { get; init; } | ||||
|     public new EditUserProfileReq Profile { get; init; } | ||||
| 
 | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.User; | ||||
| @@ -12,7 +12,7 @@ public sealed record QueryUserReq : Sys_User | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long DeptId { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dept; | ||||
| @@ -29,7 +30,7 @@ public record QueryUserRsp : Sys_User | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ using NetAdmin.Domain.DbMaps.Sys; | ||||
| namespace NetAdmin.Domain.Dto.Sys.User; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新用户头像 | ||||
| ///     请求:设置用户头像 | ||||
| /// </summary> | ||||
| public sealed record SetAvatarReq : Sys_User | ||||
| { | ||||
| @@ -12,4 +12,8 @@ public sealed record SetAvatarReq : Sys_User | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户头像不能为空))] | ||||
|     [Url(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.网络地址不正确))] | ||||
|     public override string Avatar { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="System.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -12,8 +13,12 @@ public sealed record SetUserEnabledReq : Sys_User | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override bool Enabled { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     [Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户编号不能为空))] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| namespace NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新用户档案 | ||||
| ///     请求:编辑用户档案 | ||||
| /// </summary> | ||||
| public sealed record UpdateUserProfileReq : CreateUserProfileReq | ||||
| public sealed record EditUserProfileReq : CreateUserProfileReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.UserProfile; | ||||
| /// </summary> | ||||
| public sealed record QueryUserProfileReq : Sys_UserProfile | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
| using NetAdmin.Domain.Dto.Sys.Dic.Content; | ||||
| @@ -74,7 +75,7 @@ public sealed record QueryUserProfileRsp : Sys_UserProfile | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||||
|     public override string HomeTelephone { get; init; } | ||||
|  | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Sys.VerifyCode; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode; | ||||
| /// </summary> | ||||
| public sealed record QueryVerifyCodeReq : Sys_VerifyCode | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Sys; | ||||
|  | ||||
| @@ -8,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Sys.VerifyCode; | ||||
| /// </summary> | ||||
| public sealed record QueryVerifyCodeRsp : Sys_VerifyCode | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -3,9 +3,9 @@ using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| namespace NetAdmin.Domain.Dto.Sys.VerifyCode; | ||||
| 
 | ||||
| /// <summary> | ||||
| ///     请求:更新验证码 | ||||
| ///     请求:设置验证码状态 | ||||
| /// </summary> | ||||
| public sealed record UpdateVerifyCodeReq : CreateVerifyCodeReq | ||||
| public sealed record SetVerifyCodeStatusReq : CreateVerifyCodeReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
| @@ -1,4 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Tpl; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Tpl.Example; | ||||
| @@ -8,7 +8,7 @@ namespace NetAdmin.Domain.Dto.Tpl.Example; | ||||
| /// </summary> | ||||
| public sealed record QueryExampleReq : Tpl_Example | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency; | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
| using NetAdmin.Domain.DbMaps.Tpl; | ||||
|  | ||||
| @@ -8,7 +9,7 @@ namespace NetAdmin.Domain.Dto.Tpl.Example; | ||||
| /// </summary> | ||||
| public sealed record QueryExampleRsp : Tpl_Example | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldPrimary{T}.Id" /> | ||||
|     /// <inheritdoc cref="EntityBase{T}.Id" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Id { get; init; } | ||||
|  | ||||
|   | ||||
| @@ -1,13 +0,0 @@ | ||||
| using NetAdmin.Domain.DbMaps.Dependency.Fields; | ||||
|  | ||||
| namespace NetAdmin.Domain.Dto.Tpl.Example; | ||||
|  | ||||
| /// <summary> | ||||
| ///     请求:更新示例 | ||||
| /// </summary> | ||||
| public sealed record UpdateExampleReq : CreateExampleReq | ||||
| { | ||||
|     /// <inheritdoc cref="IFieldVersion.Version" /> | ||||
|     [JsonIgnore(Condition = JsonIgnoreCondition.Never)] | ||||
|     public override long Version { get; init; } | ||||
| } | ||||
| @@ -47,7 +47,7 @@ public sealed class SqlAuditor : ISingleton | ||||
|                 SetOwner(e, user); | ||||
|                 break; | ||||
|             case AuditValueType.Update: | ||||
|                 SetUpdater(e, user); | ||||
|                 SetModificator(e, user); | ||||
|                 break; | ||||
|             case AuditValueType.InsertOrUpdate: | ||||
|                 break; | ||||
| @@ -127,6 +127,31 @@ public sealed class SqlAuditor : ISingleton | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     设置更新人 | ||||
|     /// </summary> | ||||
|     private static void SetModificator(AuditValueEventArgs e, ContextUserInfo userInfo) | ||||
|     { | ||||
|         switch (e.Property.Name) { | ||||
|             // case nameof(IFieldModifiedTime.ModifiedTime): | ||||
|             //     e.Value = DateTime.Now; | ||||
|             //     break; | ||||
|             case nameof(IFieldModifiedUser.ModifiedUserId): | ||||
|                 if (userInfo != null && e.Value is null or (long and 0)) { | ||||
|                     e.Value = userInfo.Id; | ||||
|                 } | ||||
|  | ||||
|                 break; | ||||
|  | ||||
|             case nameof(IFieldModifiedUser.ModifiedUserName): | ||||
|                 if (userInfo != null && e.Value is null or "") { | ||||
|                     e.Value = userInfo.UserName; | ||||
|                 } | ||||
|  | ||||
|                 break; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     设置拥有者 | ||||
|     /// </summary> | ||||
| @@ -163,31 +188,6 @@ public sealed class SqlAuditor : ISingleton | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     设置更新人 | ||||
|     /// </summary> | ||||
|     private static void SetUpdater(AuditValueEventArgs e, ContextUserInfo userInfo) | ||||
|     { | ||||
|         switch (e.Property.Name) { | ||||
|             // case nameof(IFieldModifiedTime.ModifiedTime): | ||||
|             //     e.Value = DateTime.Now; | ||||
|             //     break; | ||||
|             case nameof(IFieldModifiedUser.ModifiedUserId): | ||||
|                 if (userInfo != null && e.Value is null or (long and 0)) { | ||||
|                     e.Value = userInfo.Id; | ||||
|                 } | ||||
|  | ||||
|                 break; | ||||
|  | ||||
|             case nameof(IFieldModifiedUser.ModifiedUserName): | ||||
|                 if (userInfo != null && e.Value is null or "") { | ||||
|                     e.Value = userInfo.UserName; | ||||
|                 } | ||||
|  | ||||
|                 break; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // /// <summary> | ||||
|     // ///     设置服务器时间字段 | ||||
|     // /// </summary> | ||||
|   | ||||
| @@ -25,7 +25,7 @@ public static class Numbers | ||||
|  | ||||
|     public const int SECS_CACHE_CHART     = 300; // 秒:缓存时间-仪表 | ||||
|     public const int SECS_CACHE_DEFAULT   = 60;  // 秒:缓存时间-默认 | ||||
|     public const int SECS_RED_LOCK_EXPIRY = 30;  // 秒:RedLock-锁过期时间,锁区域内的逻辑执行如果超过过期时间,锁将被释放 | ||||
|     public const int SECS_RED_LOCK_EXPIRY = 30;  // 秒:RedLock-锁过期时间,假如持有锁的进程挂掉,最多在此时间内锁将被释放(如持有锁的进程正常,此值不会生效) | ||||
|     public const int SECS_RED_LOCK_RETRY  = 1;   // 秒:RedLock-锁等待时间内,多久尝试获取一次 | ||||
|     public const int SECS_RED_LOCK_WAIT   = 10;  // 秒:RedLock-锁等待时间,相同的 resource 如果当前的锁被其他线程占用,最多等待时间 | ||||
|     public const int SECS_TIMEOUT_JOB     = 600; // 秒:超时时间-作业 | ||||
|   | ||||
| @@ -33,6 +33,10 @@ public static class HttpResponseMessageExtensions | ||||
|         this HttpResponseMessage me, Func<string, string> bodyHandle = null) | ||||
|     { | ||||
|         var body = me?.Content is null ? null : await me.Content!.ReadAsStringAsync().ConfigureAwait(false); | ||||
|         return new { Header = me?.ToString(), Body = bodyHandle is null ? body : bodyHandle(body) }.ToJson(); | ||||
|         return new { | ||||
|                        Header        = me?.ToString() | ||||
|                      , RequestHeader = me?.RequestMessage?.Headers | ||||
|                      , Body          = bodyHandle is null ? body : bodyHandle(body) | ||||
|                    }.ToJson(); | ||||
|     } | ||||
| } | ||||
| @@ -8,7 +8,6 @@ | ||||
|     <ItemGroup> | ||||
|         <PackageReference Include="Cronos" Version="0.8.4"/> | ||||
|         <PackageReference Include="FreeSql.DbContext.NS" Version="3.2.821-ns1"/> | ||||
|         <PackageReference Include="FreeSql.Provider.SqlServer.NS" Version="3.2.821-ns1"/> | ||||
|         <PackageReference Include="FreeSql.Provider.Sqlite.NS" Version="3.2.821-ns1"/> | ||||
|         <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.3"/> | ||||
|         <PackageReference Include="Furion.Extras.ObjectMapper.Mapster.NS" Version="4.9.3-ns1"/> | ||||
|   | ||||
| @@ -9,7 +9,6 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IApiModule : ICrudModule<CreateApiReq, QueryApiRsp // 创建类型 | ||||
|   , QueryApiReq, QueryApiRsp                                        // 查询类型 | ||||
|   , NopReq, NopReq                                                  // 修改类型 | ||||
|   , DelReq                                                          // 删除类型 | ||||
| > | ||||
| { | ||||
|   | ||||
| @@ -9,10 +9,14 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IConfigModule : ICrudModule<CreateConfigReq, QueryConfigRsp // 创建类型 | ||||
|   , QueryConfigReq, QueryConfigRsp                                           // 查询类型 | ||||
|   , UpdateConfigReq, QueryConfigRsp                                          // 修改类型 | ||||
|   , DelReq                                                                   // 删除类型 | ||||
| > | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     编辑配置 | ||||
|     /// </summary> | ||||
|     Task<QueryConfigRsp> EditAsync(EditConfigReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     获取最新有效配置 | ||||
|     /// </summary> | ||||
|   | ||||
| @@ -9,6 +9,11 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IDeptModule : ICrudModule<CreateDeptReq, QueryDeptRsp // 创建类型 | ||||
|   , QueryDeptReq, QueryDeptRsp                                         // 查询类型 | ||||
|   , UpdateDeptReq, QueryDeptRsp                                        // 修改类型 | ||||
|   , DelReq                                                             // 删除类型 | ||||
| >; | ||||
| > | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     编辑部门 | ||||
|     /// </summary> | ||||
|     Task<QueryDeptRsp> EditAsync(EditDeptReq req); | ||||
| } | ||||
| @@ -9,6 +9,5 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IDicCatalogModule : ICrudModule<CreateDicCatalogReq, QueryDicCatalogRsp // 创建类型 | ||||
|   , QueryDicCatalogReq, QueryDicCatalogRsp                                               // 查询类型 | ||||
|   , UpdateDicCatalogReq, QueryDicCatalogRsp                                              // 修改类型 | ||||
|   , DelReq                                                                               // 删除类型 | ||||
| >; | ||||
| @@ -9,6 +9,5 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IDicContentModule : ICrudModule<CreateDicContentReq, QueryDicContentRsp // 创建类型 | ||||
|   , QueryDicContentReq, QueryDicContentRsp                                               // 查询类型 | ||||
|   , UpdateDicContentReq, QueryDicContentRsp                                              // 修改类型 | ||||
|   , DelReq                                                                               // 删除类型 | ||||
| >; | ||||
| @@ -39,6 +39,16 @@ public interface IDicModule | ||||
|     /// </summary> | ||||
|     Task<int> DeleteContentAsync(DelReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     编辑字典目录 | ||||
|     /// </summary> | ||||
|     Task<int> EditCatalogAsync(EditDicCatalogReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     编辑字典内容 | ||||
|     /// </summary> | ||||
|     Task<QueryDicContentRsp> EditContentAsync(EditDicContentReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     获取单个字典目录 | ||||
|     /// </summary> | ||||
| @@ -73,14 +83,4 @@ public interface IDicModule | ||||
|     ///     查询字典内容 | ||||
|     /// </summary> | ||||
|     Task<IEnumerable<QueryDicContentRsp>> QueryContentAsync(QueryReq<QueryDicContentReq> req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     更新字典目录 | ||||
|     /// </summary> | ||||
|     Task<QueryDicCatalogRsp> UpdateCatalogAsync(UpdateDicCatalogReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     更新字典内容 | ||||
|     /// </summary> | ||||
|     Task<QueryDicContentRsp> UpdateContentAsync(UpdateDicContentReq req); | ||||
| } | ||||
| @@ -11,14 +11,13 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IJobModule : ICrudModule<CreateJobReq, QueryJobRsp // 创建类型 | ||||
|   , QueryJobReq, QueryJobRsp                                        // 查询类型 | ||||
|   , UpdateJobReq, QueryJobRsp                                       // 修改类型 | ||||
|   , DelReq                                                          // 删除类型 | ||||
| > | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     编辑作业 | ||||
|     /// </summary> | ||||
|     Task<QueryJobRsp> EditAsync(UpdateJobReq req); | ||||
|     Task<QueryJobRsp> EditAsync(EditJobReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     执行作业 | ||||
| @@ -51,7 +50,7 @@ public interface IJobModule : ICrudModule<CreateJobReq, QueryJobRsp // 创建类 | ||||
|     Task<PagedQueryRsp<QueryJobRecordRsp>> RecordPagedQueryAsync(PagedQueryReq<QueryJobRecordReq> req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     启用/禁用作业 | ||||
|     ///     设置计划作业启用状态 | ||||
|     /// </summary> | ||||
|     Task SetEnabledAsync(UpdateJobReq req); | ||||
|     Task SetEnabledAsync(SetJobEnabledReq req); | ||||
| } | ||||
| @@ -9,6 +9,5 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IJobRecordModule : ICrudModule<CreateJobRecordReq, QueryJobRecordRsp // 创建类型 | ||||
|   , QueryJobRecordReq, QueryJobRecordRsp                                              // 查询类型 | ||||
|   , UpdateJobRecordReq, QueryJobRecordRsp                                             // 修改类型 | ||||
|   , DelReq                                                                            // 删除类型 | ||||
| >; | ||||
| @@ -9,10 +9,14 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IMenuModule : ICrudModule<CreateMenuReq, QueryMenuRsp // 创建类型 | ||||
|   , QueryMenuReq, QueryMenuRsp                                         // 查询类型 | ||||
|   , UpdateMenuReq, QueryMenuRsp                                        // 修改类型 | ||||
|   , DelReq                                                             // 删除类型 | ||||
| > | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     编辑菜单 | ||||
|     /// </summary> | ||||
|     Task<QueryMenuRsp> EditAsync(EditMenuReq req); | ||||
|  | ||||
|     /// <summary> | ||||
|     ///     当前用户菜单 | ||||
|     /// </summary> | ||||
|   | ||||
| @@ -10,7 +10,6 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IRequestLogModule : ICrudModule<CreateRequestLogReq, QueryRequestLogRsp // 创建类型 | ||||
|   , QueryRequestLogReq, QueryRequestLogRsp                                               // 查询类型 | ||||
|   , NopReq, NopReq                                                                       // 修改类型 | ||||
|   , DelReq                                                                               // 删除类型 | ||||
| > | ||||
| { | ||||
|   | ||||
| @@ -9,6 +9,11 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface IRoleModule : ICrudModule<CreateRoleReq, QueryRoleRsp // 创建类型 | ||||
|   , QueryRoleReq, QueryRoleRsp                                         // 查询类型 | ||||
|   , UpdateRoleReq, QueryRoleRsp                                        // 修改类型 | ||||
|   , DelReq                                                             // 删除类型 | ||||
| >; | ||||
| > | ||||
| { | ||||
|     /// <summary> | ||||
|     ///     编辑角色 | ||||
|     /// </summary> | ||||
|     Task<QueryRoleRsp> EditAsync(EditRoleReq req); | ||||
| } | ||||
| @@ -9,6 +9,5 @@ namespace NetAdmin.SysComponent.Application.Modules.Sys; | ||||
| /// </summary> | ||||
| public interface ISiteMsgDeptModule : ICrudModule<CreateSiteMsgDeptReq, QuerySiteMsgDeptRsp // 创建类型 | ||||
|   , QuerySiteMsgDeptReq, QuerySiteMsgDeptRsp                                                // 查询类型 | ||||
|   , UpdateSiteMsgDeptReq, QuerySiteMsgDeptRsp                                               // 修改类型 | ||||
|   , DelReq                                                                                  // 删除类型 | ||||
| >; | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub