代码格式整理

master
xiaochanghai 7 months ago
parent 8ba4aaacba
commit 0f68c647aa
  1. 1
      Tiobon.Core.Api/Controllers/CommonController.cs
  2. 1
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs
  3. 1
      Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamPaperController.cs
  4. 4
      Tiobon.Core.Api/Controllers/Ghre/Ghre_RequestController.cs
  5. 1
      Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs
  6. 2
      Tiobon.Core.Api/GlobalUsings.cs
  7. 4
      Tiobon.Core.Api/Tiobon.Core.xml
  8. 27
      Tiobon.Core.DataAccess/ContextFactory.cs
  9. 21
      Tiobon.Core.DataAccess/DataContext.cs
  10. 33
      Tiobon.Core.DataAccess/Domain/IBaseCRUDVM.cs
  11. 187
      Tiobon.Core.DataAccess/Domain/Repositories/BaseCRUDVM.cs
  12. 124
      Tiobon.Core.Extensions/AOP/BlogCacheAOP.cs
  13. 468
      Tiobon.Core.Extensions/AOP/BlogLogAOP.cs
  14. 205
      Tiobon.Core.Extensions/AOP/BlogTranAOP.cs
  15. 91
      Tiobon.Core.Extensions/AOP/BlogUserAuditAOP.cs
  16. 300
      Tiobon.Core.Extensions/AOP/CacheAOPbase.cs
  17. 39
      Tiobon.Core.Extensions/Apollo/ApolloOptions.cs
  18. 124
      Tiobon.Core.Extensions/Apollo/ConfigurationBuilderExtensions.cs
  19. 15
      Tiobon.Core.IServices/Ghra/IGhra_JobServices.cs
  20. 15
      Tiobon.Core.IServices/Ghra/IGhra_StaffLicenceServices.cs
  21. 17
      Tiobon.Core.IServices/Ghra/IGhra_StaffServices.cs
  22. 15
      Tiobon.Core.IServices/Ghra/IGhra_StaffTrainingServices.cs
  23. 15
      Tiobon.Core.IServices/Ghra/IGhra_TitleServices.cs
  24. 15
      Tiobon.Core.IServices/Ghra/IGhra_ZoneServices.cs
  25. 15
      Tiobon.Core.IServices/Ghre/IGhre_AttachmentServices.cs
  26. 15
      Tiobon.Core.IServices/Ghre/IGhre_CertificateRuleServices.cs
  27. 15
      Tiobon.Core.IServices/Ghre/IGhre_CertificateServices.cs
  28. 17
      Tiobon.Core.IServices/Ghre/IGhre_ConfigServices.cs
  29. 15
      Tiobon.Core.IServices/Ghre/IGhre_CourseClassServices.cs
  30. 15
      Tiobon.Core.IServices/Ghre/IGhre_CourseSceneServices.cs
  31. 29
      Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs
  32. 15
      Tiobon.Core.IServices/Ghre/IGhre_CourseSnapServices.cs
  33. 15
      Tiobon.Core.IServices/Ghre/IGhre_CourseWareAttachmentServices.cs
  34. 17
      Tiobon.Core.IServices/Ghre/IGhre_CourseWareServices.cs
  35. 15
      Tiobon.Core.IServices/Ghre/IGhre_ExamMessageLogServices.cs
  36. 15
      Tiobon.Core.IServices/Ghre/IGhre_ExamPaperConfigServices.cs
  37. 15
      Tiobon.Core.IServices/Ghre/IGhre_ExamPaperQuestionServices.cs
  38. 15
      Tiobon.Core.IServices/Ghre/IGhre_ExamRecordDetailServices.cs
  39. 31
      Tiobon.Core.IServices/Ghre/IGhre_ExamRecordServices.cs
  40. 41
      Tiobon.Core.IServices/Ghre/IGhre_ExamServices.cs
  41. 15
      Tiobon.Core.IServices/Ghre/IGhre_ExamStaffServices.cs
  42. 15
      Tiobon.Core.IServices/Ghre/IGhre_QuestionAnswerServices.cs
  43. 22
      Tiobon.Core.IServices/Ghre/IGhre_QuestionServices.cs
  44. 13
      Tiobon.Core.IServices/Ghre/IGhre_RequiredCourseServices.cs
  45. 27
      Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs
  46. 15
      Tiobon.Core.IServices/Ghre/IGhre_StudyRuleResultServices.cs
  47. 17
      Tiobon.Core.IServices/Ghre/IGhre_StudyRuleServices.cs
  48. 15
      Tiobon.Core.IServices/Ghre/IGhre_StudyRuleStaffServices.cs
  49. 15
      Tiobon.Core.IServices/Ghre/IGhre_TeacherAttachmentServices.cs
  50. 15
      Tiobon.Core.IServices/Ghre/IGhre_TeacherChangeAttachmentServices.cs
  51. 13
      Tiobon.Core.IServices/Ghre/IGhre_TeacherChangeServices.cs
  52. 17
      Tiobon.Core.IServices/Ghre/IGhre_TeacherServices.cs
  53. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_HumanRequestServices.cs
  54. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeEduBGServices.cs
  55. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeHomeServices.cs
  56. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeInfoColumnServices.cs
  57. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeInfoGroupServices.cs
  58. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeLicenceServices.cs
  59. 35
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  60. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeStatementServices.cs
  61. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeTagServices.cs
  62. 31
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeTemplateServices.cs
  63. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeTrainingServices.cs
  64. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeWorkExpServices.cs
  65. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_StatementServices.cs
  66. 15
      Tiobon.Core.IServices/Ghrh/IGhrh_YearHumanSettingsServices.cs
  67. 15
      Tiobon.Core.IServices/Ghro/IGhro_DeptServices.cs
  68. 15
      Tiobon.Core.IServices/Ghrs/IGhrs_AttachmentServices.cs
  69. 15
      Tiobon.Core.IServices/Ghrs/IGhrs_DataRoleDetailServices.cs
  70. 15
      Tiobon.Core.IServices/Ghrs/IGhrs_MenuServices.cs
  71. 15
      Tiobon.Core.IServices/Ghrs/IGhrs_ParaDetailServices.cs
  72. 15
      Tiobon.Core.IServices/Ghrs/IGhrs_UserServices.cs
  73. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_Grade.Dto.EditInput.cs
  74. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_Job.Dto.EditInput.cs
  75. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_Staff.Dto.EditInput.cs
  76. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_StaffLicence.Dto.EditInput.cs
  77. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_StaffTraining.Dto.EditInput.cs
  78. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_Title.Dto.EditInput.cs
  79. 15
      Tiobon.Core.Model/Edit/Ghra/Ghra_Zone.Dto.EditInput.cs
  80. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_Attachment.Dto.EditInput.cs
  81. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_Certificate.Dto.EditInput.cs
  82. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CertificateRule.Dto.EditInput.cs
  83. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_Config.Dto.EditInput.cs
  84. 23
      Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs
  85. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CourseClass.Dto.EditInput.cs
  86. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CourseScene.Dto.EditInput.cs
  87. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CourseSnap.Dto.EditInput.cs
  88. 19
      Tiobon.Core.Model/Edit/Ghre/Ghre_CourseWare.Dto.EditInput.cs
  89. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CourseWareAttachment.Dto.EditInput.cs
  90. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_CreditPoint.Dto.EditInput.cs
  91. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_Exam.Dto.EditInput.cs
  92. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamMessageLog.Dto.EditInput.cs
  93. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamPaper.Dto.EditInput.cs
  94. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamPaperConfig.Dto.EditInput.cs
  95. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamPaperQuestion.Dto.EditInput.cs
  96. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamRecord.Dto.EditInput.cs
  97. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamRecordAnswer.Dto.EditInput.cs
  98. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamRecordDetail.Dto.EditInput.cs
  99. 15
      Tiobon.Core.Model/Edit/Ghre/Ghre_ExamStaff.Dto.EditInput.cs
  100. 21
      Tiobon.Core.Model/Edit/Ghre/Ghre_Question.Dto.EditInput.cs
  101. Some files were not shown because too many files have changed in this diff Show More

@ -71,6 +71,7 @@ public class CommonController : BaseApiController
/// 获取模块信息接口
/// </summary>
/// <param name="type"></param>
/// <param name="Keywords"></param>
/// <returns></returns>
[HttpPost, Route("GetSelect/{type}")]
public async Task<ServiceResult<CommonSelect>> GetSelectAsync(string type, string Keywords)

@ -54,6 +54,7 @@ public class Ghre_CourseController : BaseController<IGhre_CourseServices, Ghre_C
/// 获取通用列表下拉
/// </summary>
/// <param name="linkId"></param>
/// <param name="KeyWords"></param>
/// <returns></returns>
[HttpPost, Route("QuerySelect")]
public async Task<ServiceResult<CommonSelect>> QuerySelectAsync(long? linkId, string KeyWords)

@ -98,6 +98,7 @@ public class Ghre_ExamPaperController : BaseController<IGhre_ExamPaperServices,
/// 获取通用列表下拉
/// </summary>
/// <param name="linkId"></param>
/// <param name="KeyWords"></param>
/// <returns></returns>
[HttpPost, Route("GetSelect")]
public async Task<ServiceResult<CommonSelect>> GetSelectAsync(long? linkId, string KeyWords)

@ -1,6 +1,4 @@
using Consul.Filtering;
namespace Tiobon.Core.Api.Controllers;
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// 培训需求(Controller)

@ -86,6 +86,7 @@ public class Ghre_StudyRecordController : BaseController<IGhre_StudyRecordServic
/// <summary>
/// 记录学习时长
/// </summary>
/// <param name="insert"></param>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost, Route("RecordDuration/{id}")]

@ -1,14 +1,12 @@
global using System.Linq.Expressions;
global using System.Text;
global using System.Text.RegularExpressions;
global using AutoMapper;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Mvc;
global using Newtonsoft.Json;
global using Tiobon.Core.Api.Filter;
global using Tiobon.Core.Common;
global using Tiobon.Core.Common.Helper;
global using Tiobon.Core.Common.HttpContextUser;
global using Tiobon.Core.Common.LogHelper;
global using Tiobon.Core.Controllers;
global using Tiobon.Core.IServices;

@ -271,6 +271,7 @@
获取模块信息接口
</summary>
<param name="type"></param>
<param name="Keywords"></param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Controllers.CommonController.ExportExcelAsync(Tiobon.Core.Common.QueryExport)">
@ -757,6 +758,7 @@
获取通用列表下拉
</summary>
<param name="linkId"></param>
<param name="KeyWords"></param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_CourseSceneController">
@ -955,6 +957,7 @@
获取通用列表下拉
</summary>
<param name="linkId"></param>
<param name="KeyWords"></param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_ExamPaperQuestionController">
@ -1154,6 +1157,7 @@
<summary>
记录学习时长
</summary>
<param name="insert"></param>
<param name="id"></param>
<returns></returns>
</member>

@ -1,24 +1,23 @@
using Microsoft.EntityFrameworkCore;
using Tiobon.Core.Common.DB;
namespace Tiobon.Core.DataAccess
namespace Tiobon.Core.DataAccess;
/// <summary>
/// 直接创建 Context
/// </summary>
public class ContextFactory
{
/// <summary>
/// 直接创建 Context
/// 创建DbContext
/// </summary>
public class ContextFactory
/// <returns></returns>
public static DataContext CreateContext()
{
/// <summary>
/// 创建DbContext
/// </summary>
/// <returns></returns>
public static DataContext CreateContext()
{
var builder = new DbContextOptionsBuilder<DataContext>();
var builder = new DbContextOptionsBuilder<DataContext>();
var mainConnetctDb = BaseDBConfig.MutiConnectionString.allDbs.Find(x => x.ConnId == MainDb.CurrentDbConnId);
builder.UseSqlServer(mainConnetctDb.Connection);
return new DataContext(builder.Options);
}
var mainConnetctDb = BaseDBConfig.MutiConnectionString.allDbs.Find(x => x.ConnId == MainDb.CurrentDbConnId);
builder.UseSqlServer(mainConnetctDb.Connection);
return new DataContext(builder.Options);
}
}

@ -1,21 +1,20 @@
using Microsoft.EntityFrameworkCore;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.DataAccess
namespace Tiobon.Core.DataAccess;
public class DataContext : DbContext
{
public class DataContext : DbContext
{
//public virtual DbSet<Ghra_Grade> Ghra_Grade { get; set; }
public virtual DbSet<Ghre_Attachment> Ghre_Attachment { get; set; }
public virtual DbSet<Ghre_ExamRecordDetail> Ghre_ExamRecordDetail { get; set; }
public virtual DbSet<Ghre_ExamRecordAnswer> Ghre_ExamRecordAnswer { get; set; }
//public virtual DbSet<Ghra_Grade> Ghra_Grade { get; set; }
public virtual DbSet<Ghre_Attachment> Ghre_Attachment { get; set; }
public virtual DbSet<Ghre_ExamRecordDetail> Ghre_ExamRecordDetail { get; set; }
public virtual DbSet<Ghre_ExamRecordAnswer> Ghre_ExamRecordAnswer { get; set; }
//占位符
//占位符
public DataContext(DbContextOptions<DataContext> options) : base(options)
{
}
public DataContext(DbContextOptions<DataContext> options) : base(options)
{
}
}

@ -3,31 +3,30 @@ using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Tiobon.Core.Domain
namespace Tiobon.Core.Domain;
public interface IBaseCRUDVM<TModel> where TModel : class
{
public interface IBaseCRUDVM<TModel> where TModel : class
{
IEnumerable<TModel> Get();
TModel Get(Expression<Func<TModel, bool>> express = null);
IEnumerable<TModel> Get();
TModel Get(Expression<Func<TModel, bool>> express = null);
TModel GetById(object id);
Task<TModel> GetByIdAsync(object id);
TModel GetById(object id);
Task<TModel> GetByIdAsync(object id);
void DoAdd(TModel model);
void DoAdd(TModel model);
Task DoAddAsync(TModel model);
Task DoAddAsync(TModel model);
void DoDelete(object id);
void DoDelete(object id);
Task DoDeleteAsync(Guid id, Guid? updateById = null);
Task DoDeleteAsync(Guid id, Guid? updateById = null);
void DoRealDelete(object id);
void DoRealDelete(object id);
Task DoRealDeleteAsync(object id);
Task DoRealDeleteAsync(object id);
void DoUpdate(TModel model);
void DoUpdate(TModel model);
Task DoUpdateAsync(TModel model);
Task<TModel> GetAsync(Expression<Func<TModel, bool>> express);
}
Task DoUpdateAsync(TModel model);
Task<TModel> GetAsync(Expression<Func<TModel, bool>> express);
}

@ -6,103 +6,102 @@ using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Tiobon.Core.Domain
namespace Tiobon.Core.Domain;
public class BaseCRUDVM<TModel> : IBaseCRUDVM<TModel> where TModel : class
{
public class BaseCRUDVM<TModel> : IBaseCRUDVM<TModel> where TModel : class
private readonly DataContext _context;
internal DbSet<TModel> dbSet;
public BaseCRUDVM(DataContext context)
{
_context = context;
this.dbSet = _context.Set<TModel>();
}
IEnumerable<TModel> IBaseCRUDVM<TModel>.Get()
{
private readonly DataContext _context;
internal DbSet<TModel> dbSet;
public BaseCRUDVM(DataContext context)
{
_context = context;
this.dbSet = _context.Set<TModel>();
}
IEnumerable<TModel> IBaseCRUDVM<TModel>.Get()
{
return dbSet.ToList();
}
TModel IBaseCRUDVM<TModel>.Get(Expression<Func<TModel, bool>> express)
{
return dbSet.Where(express).FirstOrDefault();
}
async Task<TModel> IBaseCRUDVM<TModel>.GetAsync(Expression<Func<TModel, bool>> express)
{
return await dbSet.Where(express).FirstOrDefaultAsync();
}
public TModel GetById(object id)
{
return dbSet.Find(id);
}
public async Task<TModel> GetByIdAsync(object id)
{
return await dbSet.FindAsync(id);
}
public void DoAdd(TModel model)
{
_context.Entry(model).CurrentValues["IsDeleted"] = false;
_context.Entry(model).CurrentValues["AuditStatus"] = "Add";
_context.Add(model);
_context.SaveChanges();
}
public async Task DoAddAsync(TModel model)
{
_context.Entry(model).CurrentValues["IsDeleted"] = false;
_context.Entry(model).CurrentValues["AuditStatus"] = "Add";
await _context.AddAsync(model);
await _context.SaveChangesAsync();
}
public void DoDelete(object id)
{
var query = dbSet.Find(id);
_context.Entry(query).CurrentValues["IsDeleted"] = true;
_context.Update(query);
_context.SaveChanges();
}
public async Task DoDeleteAsync(Guid id, Guid? updateById = null)
{
var query = await dbSet.FindAsync(id);
_context.Entry(query).CurrentValues["IsDeleted"] = true;
_context.Entry(query).CurrentValues["UpdateBy"] = updateById ?? null;
_context.Entry(query).CurrentValues["UpdateTime"] = DateTime.Now;
await _context.SaveChangesAsync();
}
public void DoRealDelete(object id)
{
var query = dbSet.Find(id);
_context.Remove(query);
_context.SaveChanges();
}
public async Task DoRealDeleteAsync(object id)
{
var query = await dbSet.FindAsync(id);
_context.Remove(query);
await _context.SaveChangesAsync();
}
public void DoUpdate(TModel model)
{
_context.Update(model);
_context.SaveChanges();
}
public async Task DoUpdateAsync(TModel model)
{
_context.Update(model);
await _context.SaveChangesAsync();
}
return dbSet.ToList();
}
TModel IBaseCRUDVM<TModel>.Get(Expression<Func<TModel, bool>> express)
{
return dbSet.Where(express).FirstOrDefault();
}
async Task<TModel> IBaseCRUDVM<TModel>.GetAsync(Expression<Func<TModel, bool>> express)
{
return await dbSet.Where(express).FirstOrDefaultAsync();
}
public TModel GetById(object id)
{
return dbSet.Find(id);
}
public async Task<TModel> GetByIdAsync(object id)
{
return await dbSet.FindAsync(id);
}
public void DoAdd(TModel model)
{
_context.Entry(model).CurrentValues["IsDeleted"] = false;
_context.Entry(model).CurrentValues["AuditStatus"] = "Add";
_context.Add(model);
_context.SaveChanges();
}
public async Task DoAddAsync(TModel model)
{
_context.Entry(model).CurrentValues["IsDeleted"] = false;
_context.Entry(model).CurrentValues["AuditStatus"] = "Add";
await _context.AddAsync(model);
await _context.SaveChangesAsync();
}
public void DoDelete(object id)
{
var query = dbSet.Find(id);
_context.Entry(query).CurrentValues["IsDeleted"] = true;
_context.Update(query);
_context.SaveChanges();
}
public async Task DoDeleteAsync(Guid id, Guid? updateById = null)
{
var query = await dbSet.FindAsync(id);
_context.Entry(query).CurrentValues["IsDeleted"] = true;
_context.Entry(query).CurrentValues["UpdateBy"] = updateById ?? null;
_context.Entry(query).CurrentValues["UpdateTime"] = DateTime.Now;
await _context.SaveChangesAsync();
}
public void DoRealDelete(object id)
{
var query = dbSet.Find(id);
_context.Remove(query);
_context.SaveChanges();
}
public async Task DoRealDeleteAsync(object id)
{
var query = await dbSet.FindAsync(id);
_context.Remove(query);
await _context.SaveChangesAsync();
}
public void DoUpdate(TModel model)
{
_context.Update(model);
_context.SaveChanges();
}
public async Task DoUpdateAsync(TModel model)
{
_context.Update(model);
await _context.SaveChangesAsync();
}
}

@ -1,83 +1,79 @@
using System;
using Castle.DynamicProxy;
using Tiobon.Core.Common;
using Castle.DynamicProxy;
using System.Linq;
using System.Threading.Tasks;
using Tiobon.Core.Common.Caches;
namespace Tiobon.Core.AOP
namespace Tiobon.Core.AOP;
/// <summary>
/// 面向切面的缓存使用
/// </summary>
public class TiobonCacheAOP : CacheAOPbase
{
/// <summary>
/// 面向切面的缓存使用
/// </summary>
public class TiobonCacheAOP : CacheAOPbase
{
//通过注入的方式,把缓存操作接口通过构造函数注入
private readonly ICaching _cache;
//通过注入的方式,把缓存操作接口通过构造函数注入
private readonly ICaching _cache;
public TiobonCacheAOP(ICaching cache)
{
_cache = cache;
}
public TiobonCacheAOP(ICaching cache)
{
_cache = cache;
}
//Intercept方法是拦截的关键所在,也是IInterceptor接口中的唯一定义
public override void Intercept(IInvocation invocation)
//Intercept方法是拦截的关键所在,也是IInterceptor接口中的唯一定义
public override void Intercept(IInvocation invocation)
{
var method = invocation.MethodInvocationTarget ?? invocation.Method;
//对当前方法的特性验证
//如果需要验证
var CachingAttribute = method.GetCustomAttributes(true).FirstOrDefault(x => x.GetType() == typeof(CachingAttribute));
if (CachingAttribute is CachingAttribute qCachingAttribute)
{
var method = invocation.MethodInvocationTarget ?? invocation.Method;
//对当前方法的特性验证
//如果需要验证
var CachingAttribute = method.GetCustomAttributes(true).FirstOrDefault(x => x.GetType() == typeof(CachingAttribute));
if (CachingAttribute is CachingAttribute qCachingAttribute)
//获取自定义缓存键
var cacheKey = CustomCacheKey(invocation);
if (_cache.Exists(cacheKey))
{
//获取自定义缓存键
var cacheKey = CustomCacheKey(invocation);
if (_cache.Exists(cacheKey))
//将当前获取到的缓存值,赋值给当前执行方法
Type returnType;
if (typeof(Task).IsAssignableFrom(method.ReturnType))
{
//将当前获取到的缓存值,赋值给当前执行方法
Type returnType;
if (typeof(Task).IsAssignableFrom(method.ReturnType))
{
returnType = method.ReturnType.GenericTypeArguments.FirstOrDefault();
}
else
{
returnType = method.ReturnType;
}
//根据key获取相应的缓存值
dynamic cacheValue = _cache.Get(returnType, cacheKey);
invocation.ReturnValue = (typeof(Task).IsAssignableFrom(method.ReturnType)) ? Task.FromResult(cacheValue) : cacheValue;
return;
returnType = method.ReturnType.GenericTypeArguments.FirstOrDefault();
}
//去执行当前的方法
invocation.Proceed();
//存入缓存
if (!string.IsNullOrWhiteSpace(cacheKey))
else
{
object response;
returnType = method.ReturnType;
}
//Type type = invocation.ReturnValue?.GetType();
var type = invocation.Method.ReturnType;
if (typeof(Task).IsAssignableFrom(type))
{
dynamic result = invocation.ReturnValue;
response = result.Result;
}
else
{
response = invocation.ReturnValue;
}
//根据key获取相应的缓存值
dynamic cacheValue = _cache.Get(returnType, cacheKey);
invocation.ReturnValue = (typeof(Task).IsAssignableFrom(method.ReturnType)) ? Task.FromResult(cacheValue) : cacheValue;
return;
}
if (response == null) response = string.Empty;
//去执行当前的方法
invocation.Proceed();
//存入缓存
if (!string.IsNullOrWhiteSpace(cacheKey))
{
object response;
_cache.Set(cacheKey, response, TimeSpan.FromMinutes(qCachingAttribute.AbsoluteExpiration));
//Type type = invocation.ReturnValue?.GetType();
var type = invocation.Method.ReturnType;
if (typeof(Task).IsAssignableFrom(type))
{
dynamic result = invocation.ReturnValue;
response = result.Result;
}
else
{
response = invocation.ReturnValue;
}
if (response == null) response = string.Empty;
_cache.Set(cacheKey, response, TimeSpan.FromMinutes(qCachingAttribute.AbsoluteExpiration));
}
else
{
invocation.Proceed(); //直接执行被拦截方法
}
}
else
{
invocation.Proceed(); //直接执行被拦截方法
}
}
}

@ -1,291 +1,287 @@
using Tiobon.Core.Common;
using Tiobon.Core.Common.LogHelper;
using Tiobon.Core.Hubs;
using Castle.DynamicProxy;
using Castle.DynamicProxy;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SignalR;
using Newtonsoft.Json;
using StackExchange.Profiling;
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Tiobon.Core.Common;
using Tiobon.Core.Common.LogHelper;
using Tiobon.Core.Hubs;
namespace Tiobon.Core.AOP;
namespace Tiobon.Core.AOP
/// <summary>
/// 拦截器TiobonLogAOP 继承IInterceptor接口
/// </summary>
public class TiobonLogAOP : IInterceptor
{
private readonly IHubContext<ChatHub> _hubContext;
private readonly IHttpContextAccessor _accessor;
public TiobonLogAOP(IHubContext<ChatHub> hubContext, IHttpContextAccessor accessor)
{
_hubContext = hubContext;
_accessor = accessor;
}
/// <summary>
/// 拦截器TiobonLogAOP 继承IInterceptor接口
/// 实例化IInterceptor唯一方法
/// </summary>
public class TiobonLogAOP : IInterceptor
/// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{
private readonly IHubContext<ChatHub> _hubContext;
private readonly IHttpContextAccessor _accessor;
public TiobonLogAOP(IHubContext<ChatHub> hubContext, IHttpContextAccessor accessor)
string UserName = _accessor.HttpContext?.User?.Identity?.Name;
string json;
try
{
_hubContext = hubContext;
_accessor = accessor;
json = JsonConvert.SerializeObject(invocation.Arguments);
}
catch (Exception ex)
{
json = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
}
/// <summary>
/// 实例化IInterceptor唯一方法
/// </summary>
/// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
DateTime startTime = DateTime.Now;
AOPLogInfo apiLogAopInfo = new AOPLogInfo
{
string UserName = _accessor.HttpContext?.User?.Identity?.Name;
string json;
try
{
json = JsonConvert.SerializeObject(invocation.Arguments);
}
catch (Exception ex)
{
json = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
}
RequestTime = startTime.ToString("yyyy-MM-dd hh:mm:ss fff"),
OpUserName = UserName,
RequestMethodName = invocation.Method.Name,
RequestParamsName = string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray()),
ResponseJsonData = json
};
DateTime startTime = DateTime.Now;
AOPLogInfo apiLogAopInfo = new AOPLogInfo
{
RequestTime = startTime.ToString("yyyy-MM-dd hh:mm:ss fff"),
OpUserName = UserName,
RequestMethodName = invocation.Method.Name,
RequestParamsName = string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray()),
ResponseJsonData = json
};
//测试异常记录
//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
//记录被拦截方法信息的日志信息
//var dataIntercept = "" +
// $"【当前操作用户】:{ UserName} \r\n" +
// $"【当前执行方法】:{ invocation.Method.Name} \r\n" +
// $"【携带的参数有】: {string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray())} \r\n";
//测试异常记录
//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
try
{
MiniProfiler.Current.Step($"执行Service方法:{invocation.Method.Name}() -> ");
//在被拦截的方法执行完毕后 继续执行当前方法,注意是被拦截的是异步的
invocation.Proceed();
//记录被拦截方法信息的日志信息
//var dataIntercept = "" +
// $"【当前操作用户】:{ UserName} \r\n" +
// $"【当前执行方法】:{ invocation.Method.Name} \r\n" +
// $"【携带的参数有】: {string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray())} \r\n";
try
// 异步获取异常,先执行
if (IsAsyncMethod(invocation.Method))
{
MiniProfiler.Current.Step($"执行Service方法:{invocation.Method.Name}() -> ");
//在被拦截的方法执行完毕后 继续执行当前方法,注意是被拦截的是异步的
invocation.Proceed();
#region 方案一
// 异步获取异常,先执行
if (IsAsyncMethod(invocation.Method))
//Wait task execution and modify return value
if (invocation.Method.ReturnType == typeof(Task))
{
#region 方案一
//Wait task execution and modify return value
if (invocation.Method.ReturnType == typeof(Task))
{
invocation.ReturnValue = InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(
(Task) invocation.ReturnValue,
async () => await SuccessAction(invocation, apiLogAopInfo, startTime), /*成功时执行*/
ex =>
{
LogEx(ex, apiLogAopInfo);
});
}
//Task<TResult>
else
{
invocation.ReturnValue = InternalAsyncHelper.CallAwaitTaskWithPostActionAndFinallyAndGetResult(
invocation.Method.ReturnType.GenericTypeArguments[0],
invocation.ReturnValue,
//async () => await SuccessAction(invocation, dataIntercept),/*成功时执行*/
async (o) => await SuccessAction(invocation, apiLogAopInfo, startTime, o), /*成功时执行*/
ex =>
{
LogEx(ex, apiLogAopInfo);
});
}
#endregion
// 如果方案一不行,试试这个方案
//#region 方案二
//var type = invocation.Method.ReturnType;
//var resultProperty = type.GetProperty("Result");
//DateTime endTime = DateTime.Now;
//string ResponseTime = (endTime - startTime).Milliseconds.ToString();
//apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
//apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
//apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue));
////dataIntercept += ($"【响应时间】:{ResponseTime}ms\r\n");
////dataIntercept += ($"【执行完成时间】:{endTime.ToString("yyyy-MM-dd hh:mm:ss fff")}\r\n");
////dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue))}\r\n");
//Parallel.For(0, 1, e =>
//{
// //LogLock.OutLogAOP("AOPLog", new string[] { dataIntercept });
// LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString() + " - ResponseJsonDataType:" + type, JsonConvert.SerializeObject(apiLogAopInfo) });
//});
//#endregion
invocation.ReturnValue = InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(
(Task) invocation.ReturnValue,
async () => await SuccessAction(invocation, apiLogAopInfo, startTime), /*成功时执行*/
ex =>
{
LogEx(ex, apiLogAopInfo);
});
}
//Task<TResult>
else
{
// 同步1
string jsonResult;
try
{
jsonResult = JsonConvert.SerializeObject(invocation.ReturnValue);
}
catch (Exception ex)
{
jsonResult = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
}
var type = invocation.Method.ReturnType;
var resultProperty = type.GetProperty("Result");
DateTime endTime = DateTime.Now;
string ResponseTime = (endTime - startTime).Milliseconds.ToString();
apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
//apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue));
apiLogAopInfo.ResponseJsonData = jsonResult;
//dataIntercept += ($"【执行完成结果】:{jsonResult}");
Parallel.For(0, 1, e =>
{
//LogLock.OutLogAOP("AOPLog", new string[] { dataIntercept });
LogLock.OutLogAOP("AOPLog", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)});
});
invocation.ReturnValue = InternalAsyncHelper.CallAwaitTaskWithPostActionAndFinallyAndGetResult(
invocation.Method.ReturnType.GenericTypeArguments[0],
invocation.ReturnValue,
//async () => await SuccessAction(invocation, dataIntercept),/*成功时执行*/
async (o) => await SuccessAction(invocation, apiLogAopInfo, startTime, o), /*成功时执行*/
ex =>
{
LogEx(ex, apiLogAopInfo);
});
}
}
catch (Exception ex) // 同步2
{
LogEx(ex, apiLogAopInfo);
throw;
}
if (AppSettings.app(new string[] {"Middleware", "SignalRSendLog", "Enabled"}).ObjToBool())
{
_hubContext.Clients.All.SendAsync("ReceiveUpdate", LogLock.GetLogData()).Wait();
}
}
#endregion
private async Task SuccessAction(IInvocation invocation, AOPLogInfo apiLogAopInfo, DateTime startTime, object o = null)
{
//invocation.ReturnValue = o;
//var type = invocation.Method.ReturnType;
//if (typeof(Task).IsAssignableFrom(type))
//{
// //var resultProperty = type.GetProperty("Result");
// //类型错误 都可以不要invocation参数,直接将o系列化保存到日记中
// dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(invocation.ReturnValue)}");
//}
//else
//{
// dataIntercept += ($"【执行完成结果】:{invocation.ReturnValue}");
//}
DateTime endTime = DateTime.Now;
string ResponseTime = (endTime - startTime).Milliseconds.ToString();
apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(o);
await Task.Run(() =>
// 如果方案一不行,试试这个方案
//#region 方案二
//var type = invocation.Method.ReturnType;
//var resultProperty = type.GetProperty("Result");
//DateTime endTime = DateTime.Now;
//string ResponseTime = (endTime - startTime).Milliseconds.ToString();
//apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
//apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
//apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue));
////dataIntercept += ($"【响应时间】:{ResponseTime}ms\r\n");
////dataIntercept += ($"【执行完成时间】:{endTime.ToString("yyyy-MM-dd hh:mm:ss fff")}\r\n");
////dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue))}\r\n");
//Parallel.For(0, 1, e =>
//{
// //LogLock.OutLogAOP("AOPLog", new string[] { dataIntercept });
// LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString() + " - ResponseJsonDataType:" + type, JsonConvert.SerializeObject(apiLogAopInfo) });
//});
//#endregion
}
else
{
// 同步1
string jsonResult;
try
{
jsonResult = JsonConvert.SerializeObject(invocation.ReturnValue);
}
catch (Exception ex)
{
jsonResult = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
}
var type = invocation.Method.ReturnType;
var resultProperty = type.GetProperty("Result");
DateTime endTime = DateTime.Now;
string ResponseTime = (endTime - startTime).Milliseconds.ToString();
apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
//apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue));
apiLogAopInfo.ResponseJsonData = jsonResult;
//dataIntercept += ($"【执行完成结果】:{jsonResult}");
Parallel.For(0, 1, e =>
{
//LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) });
//LogLock.OutLogAOP("AOPLog", new string[] { dataIntercept });
LogLock.OutLogAOP("AOPLog", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)});
});
});
}
}
private void LogEx(Exception ex, AOPLogInfo dataIntercept)
catch (Exception ex) // 同步2
{
if (ex != null)
{
//执行的 service 中,收录异常
MiniProfiler.Current.CustomTiming("Errors:", ex.Message);
//执行的 service 中,捕获异常
//dataIntercept += ($"【执行完成结果】:方法中出现异常:{ex.Message + ex.InnerException}\r\n");
AOPLogExInfo apiLogAopExInfo = new AOPLogExInfo
{
ExMessage = ex.Message,
InnerException = "InnerException-内部异常:\r\n" + (ex.InnerException == null ? "" : ex.InnerException.InnerException.ToString()) +
("\r\nStackTrace-堆栈跟踪:\r\n") + (ex.StackTrace == null ? "" : ex.StackTrace.ToString()),
ApiLogAopInfo = dataIntercept
};
// 异常日志里有详细的堆栈信息
Parallel.For(0, 1, e =>
{
//LogLock.OutLogAOP("AOPLogEx", new string[] { dataIntercept });
LogLock.OutLogAOP("AOPLogEx", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo)});
});
}
LogEx(ex, apiLogAopInfo);
throw;
}
public static bool IsAsyncMethod(MethodInfo method)
if (AppSettings.app(new string[] {"Middleware", "SignalRSendLog", "Enabled"}).ObjToBool())
{
return (
method.ReturnType == typeof(Task) ||
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
);
_hubContext.Clients.All.SendAsync("ReceiveUpdate", LogLock.GetLogData()).Wait();
}
}
internal static class InternalAsyncHelper
private async Task SuccessAction(IInvocation invocation, AOPLogInfo apiLogAopInfo, DateTime startTime, object o = null)
{
public static async Task AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func<Task> postAction, Action<Exception> finalAction)
{
Exception exception = null;
//invocation.ReturnValue = o;
//var type = invocation.Method.ReturnType;
//if (typeof(Task).IsAssignableFrom(type))
//{
// //var resultProperty = type.GetProperty("Result");
// //类型错误 都可以不要invocation参数,直接将o系列化保存到日记中
// dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(invocation.ReturnValue)}");
//}
//else
//{
// dataIntercept += ($"【执行完成结果】:{invocation.ReturnValue}");
//}
DateTime endTime = DateTime.Now;
string ResponseTime = (endTime - startTime).Milliseconds.ToString();
apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(o);
try
await Task.Run(() =>
{
Parallel.For(0, 1, e =>
{
await actualReturnValue;
await postAction();
}
catch (Exception ex)
//LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) });
LogLock.OutLogAOP("AOPLog", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)});
});
});
}
private void LogEx(Exception ex, AOPLogInfo dataIntercept)
{
if (ex != null)
{
//执行的 service 中,收录异常
MiniProfiler.Current.CustomTiming("Errors:", ex.Message);
//执行的 service 中,捕获异常
//dataIntercept += ($"【执行完成结果】:方法中出现异常:{ex.Message + ex.InnerException}\r\n");
AOPLogExInfo apiLogAopExInfo = new AOPLogExInfo
{
exception = ex;
}
finally
ExMessage = ex.Message,
InnerException = "InnerException-内部异常:\r\n" + (ex.InnerException == null ? "" : ex.InnerException.InnerException.ToString()) +
("\r\nStackTrace-堆栈跟踪:\r\n") + (ex.StackTrace == null ? "" : ex.StackTrace.ToString()),
ApiLogAopInfo = dataIntercept
};
// 异常日志里有详细的堆栈信息
Parallel.For(0, 1, e =>
{
finalAction(exception);
}
//LogLock.OutLogAOP("AOPLogEx", new string[] { dataIntercept });
LogLock.OutLogAOP("AOPLogEx", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo)});
});
}
}
public static bool IsAsyncMethod(MethodInfo method)
{
return (
method.ReturnType == typeof(Task) ||
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
);
}
}
public static async Task<T> AwaitTaskWithPostActionAndFinallyAndGetResult<T>(Task<T> actualReturnValue, Func<object, Task> postAction,
Action<Exception> finalAction)
internal static class InternalAsyncHelper
{
public static async Task AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func<Task> postAction, Action<Exception> finalAction)
{
Exception exception = null;
try
{
Exception exception = null;
try
{
var result = await actualReturnValue;
await postAction(result);
return result;
}
catch (Exception ex)
{
exception = ex;
throw;
}
finally
{
finalAction(exception);
}
await actualReturnValue;
await postAction();
}
catch (Exception ex)
{
exception = ex;
}
finally
{
finalAction(exception);
}
}
public static object CallAwaitTaskWithPostActionAndFinallyAndGetResult(Type taskReturnType, object actualReturnValue,
Func<object, Task> action, Action<Exception> finalAction)
public static async Task<T> AwaitTaskWithPostActionAndFinallyAndGetResult<T>(Task<T> actualReturnValue, Func<object, Task> postAction,
Action<Exception> finalAction)
{
Exception exception = null;
try
{
var result = await actualReturnValue;
await postAction(result);
return result;
}
catch (Exception ex)
{
return typeof(InternalAsyncHelper)
.GetMethod("AwaitTaskWithPostActionAndFinallyAndGetResult", BindingFlags.Public | BindingFlags.Static)
.MakeGenericMethod(taskReturnType)
.Invoke(null, new object[] {actualReturnValue, action, finalAction});
exception = ex;
throw;
}
finally
{
finalAction(exception);
}
}
public static object CallAwaitTaskWithPostActionAndFinallyAndGetResult(Type taskReturnType, object actualReturnValue,
Func<object, Task> action, Action<Exception> finalAction)
{
return typeof(InternalAsyncHelper)
.GetMethod("AwaitTaskWithPostActionAndFinallyAndGetResult", BindingFlags.Public | BindingFlags.Static)
.MakeGenericMethod(taskReturnType)
.Invoke(null, new object[] {actualReturnValue, action, finalAction});
}
}

@ -1,139 +1,136 @@
using Tiobon.Core.Common;
using Castle.DynamicProxy;
using Castle.DynamicProxy;
using Microsoft.Extensions.Logging;
using System;
using System.Reflection;
using System.Threading.Tasks;
using Tiobon.Core.Common;
using Tiobon.Core.Common.DB;
using Tiobon.Core.Repository.UnitOfWorks;
namespace Tiobon.Core.AOP
namespace Tiobon.Core.AOP;
/// <summary>
/// 事务拦截器TiobonTranAOP 继承IInterceptor接口
/// </summary>
public class TiobonTranAOP : IInterceptor
{
private readonly ILogger<TiobonTranAOP> _logger;
private readonly IUnitOfWorkManage _unitOfWorkManage;
public TiobonTranAOP(IUnitOfWorkManage unitOfWorkManage, ILogger<TiobonTranAOP> logger)
{
_unitOfWorkManage = unitOfWorkManage;
_logger = logger;
}
/// <summary>
/// 事务拦截器TiobonTranAOP 继承IInterceptor接口
/// 实例化IInterceptor唯一方法
/// </summary>
public class TiobonTranAOP : IInterceptor
/// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{
private readonly ILogger<TiobonTranAOP> _logger;
private readonly IUnitOfWorkManage _unitOfWorkManage;
public TiobonTranAOP(IUnitOfWorkManage unitOfWorkManage, ILogger<TiobonTranAOP> logger)
var method = invocation.MethodInvocationTarget ?? invocation.Method;
//对当前方法的特性验证
//如果需要验证
if (method.GetCustomAttribute<UseTranAttribute>(true) is { } uta)
{
_unitOfWorkManage = unitOfWorkManage;
_logger = logger;
}
/// <summary>
/// 实例化IInterceptor唯一方法
/// </summary>
/// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{
var method = invocation.MethodInvocationTarget ?? invocation.Method;
//对当前方法的特性验证
//如果需要验证
if (method.GetCustomAttribute<UseTranAttribute>(true) is { } uta)
try
{
try
{
Before(method, uta.Propagation);
Before(method, uta.Propagation);
invocation.Proceed();
invocation.Proceed();
// 异步获取异常,先执行
if (IsAsyncMethod(invocation.Method))
// 异步获取异常,先执行
if (IsAsyncMethod(invocation.Method))
{
var result = invocation.ReturnValue;
if (result is Task)
{
var result = invocation.ReturnValue;
if (result is Task)
{
Task.WaitAll(result as Task);
}
Task.WaitAll(result as Task);
}
After(method);
}
catch (Exception ex)
{
_logger.LogError(ex.ToString());
AfterException(method);
throw;
}
After(method);
}
else
catch (Exception ex)
{
invocation.Proceed(); //直接执行被拦截方法
_logger.LogError(ex.ToString());
AfterException(method);
throw;
}
}
private void Before(MethodInfo method, Propagation propagation)
else
{
switch (propagation)
{
case Propagation.Required:
if (_unitOfWorkManage.TranCount <= 0)
{
_logger.LogDebug($"Begin Transaction");
Console.WriteLine($"Begin Transaction");
_unitOfWorkManage.BeginTran(method);
}
break;
case Propagation.Mandatory:
if (_unitOfWorkManage.TranCount <= 0)
{
throw new Exception("事务传播机制为:[Mandatory],当前不存在事务");
}
invocation.Proceed(); //直接执行被拦截方法
}
}
break;
case Propagation.Nested:
private void Before(MethodInfo method, Propagation propagation)
{
switch (propagation)
{
case Propagation.Required:
if (_unitOfWorkManage.TranCount <= 0)
{
_logger.LogDebug($"Begin Transaction");
Console.WriteLine($"Begin Transaction");
_unitOfWorkManage.BeginTran(method);
break;
default:
throw new ArgumentOutOfRangeException(nameof(propagation), propagation, null);
}
}
}
private void After(MethodInfo method)
{
_unitOfWorkManage.CommitTran(method);
}
break;
case Propagation.Mandatory:
if (_unitOfWorkManage.TranCount <= 0)
{
throw new Exception("事务传播机制为:[Mandatory],当前不存在事务");
}
private void AfterException(MethodInfo method)
{
_unitOfWorkManage.RollbackTran(method);
break;
case Propagation.Nested:
_logger.LogDebug($"Begin Transaction");
Console.WriteLine($"Begin Transaction");
_unitOfWorkManage.BeginTran(method);
break;
default:
throw new ArgumentOutOfRangeException(nameof(propagation), propagation, null);
}
}
/// <summary>
/// 获取变量的默认值
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public object GetDefaultValue(Type type)
{
return type.IsValueType ? Activator.CreateInstance(type) : null;
}
private void After(MethodInfo method)
{
_unitOfWorkManage.CommitTran(method);
}
private async Task SuccessAction(IInvocation invocation)
{
await Task.Run(() =>
{
//...
});
}
private void AfterException(MethodInfo method)
{
_unitOfWorkManage.RollbackTran(method);
}
public static bool IsAsyncMethod(MethodInfo method)
{
return (
method.ReturnType == typeof(Task) ||
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
);
}
/// <summary>
/// 获取变量的默认值
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public object GetDefaultValue(Type type)
{
return type.IsValueType ? Activator.CreateInstance(type) : null;
}
private async Task TestActionAsync(IInvocation invocation)
private async Task SuccessAction(IInvocation invocation)
{
await Task.Run(() =>
{
await Task.Run(null);
}
//...
});
}
public static bool IsAsyncMethod(MethodInfo method)
{
return (
method.ReturnType == typeof(Task) ||
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
);
}
private async Task TestActionAsync(IInvocation invocation)
{
await Task.Run(null);
}
}

@ -1,69 +1,66 @@
using Castle.DynamicProxy;
using Microsoft.AspNetCore.Http;
using System;
namespace Tiobon.Core.AOP
namespace Tiobon.Core.AOP;
/// <summary>
/// 面向切面的缓存使用
/// </summary>
public class TiobonUserAuditAOP : CacheAOPbase
{
/// <summary>
/// 面向切面的缓存使用
/// </summary>
public class TiobonUserAuditAOP : CacheAOPbase
private readonly IHttpContextAccessor _accessor;
public TiobonUserAuditAOP(IHttpContextAccessor accessor)
{
private readonly IHttpContextAccessor _accessor;
_accessor = accessor;
}
public TiobonUserAuditAOP(IHttpContextAccessor accessor)
{
_accessor = accessor;
}
public override void Intercept(IInvocation invocation)
{
string UserName = _accessor.HttpContext?.User?.Identity?.Name;
public override void Intercept(IInvocation invocation)
//对当前方法的特性验证
if (invocation.Method.Name?.ToLower() == "add" || invocation.Method.Name?.ToLower() == "update")
{
string UserName = _accessor.HttpContext?.User?.Identity?.Name;
//对当前方法的特性验证
if (invocation.Method.Name?.ToLower() == "add" || invocation.Method.Name?.ToLower() == "update")
if (invocation.Arguments.Length == 1)
{
if (invocation.Arguments.Length == 1)
if (invocation.Arguments[0].GetType().IsClass)
{
if (invocation.Arguments[0].GetType().IsClass)
dynamic argModel = invocation.Arguments[0];
var getType = argModel.GetType();
if (invocation.Method.Name?.ToLower() == "add")
{
dynamic argModel = invocation.Arguments[0];
var getType = argModel.GetType();
if (invocation.Method.Name?.ToLower() == "add")
{
if (getType.GetProperty("CreateBy") != null)
{
argModel.CreateBy = UserName;
}
if (getType.GetProperty("bCreateTime") != null)
{
argModel.bCreateTime = DateTime.Now;
}
}
if (getType.GetProperty("bUpdateTime") != null)
if (getType.GetProperty("CreateBy") != null)
{
argModel.bUpdateTime = DateTime.Now;
argModel.CreateBy = UserName;
}
if (getType.GetProperty("ModifyBy") != null)
if (getType.GetProperty("bCreateTime") != null)
{
argModel.ModifyBy = UserName;
argModel.bCreateTime = DateTime.Now;
}
if (getType.GetProperty("bsubmitter") != null)
{
argModel.bsubmitter = UserName;
}
invocation.Arguments[0] = argModel;
}
if (getType.GetProperty("bUpdateTime") != null)
{
argModel.bUpdateTime = DateTime.Now;
}
if (getType.GetProperty("ModifyBy") != null)
{
argModel.ModifyBy = UserName;
}
if (getType.GetProperty("bsubmitter") != null)
{
argModel.bsubmitter = UserName;
}
invocation.Arguments[0] = argModel;
}
invocation.Proceed();
}
else
{
invocation.Proceed();
}
invocation.Proceed();
}
else
{
invocation.Proceed();
}
}
}

@ -1,184 +1,180 @@
using Tiobon.Core.Common.Helper;
using Castle.DynamicProxy;
using Castle.DynamicProxy;
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Tiobon.Core.Common.Helper;
namespace Tiobon.Core.AOP
namespace Tiobon.Core.AOP;
public abstract class CacheAOPbase : IInterceptor
{
public abstract class CacheAOPbase : IInterceptor
/// <summary>
/// AOP的拦截方法
/// </summary>
/// <param name="invocation"></param>
public abstract void Intercept(IInvocation invocation);
/// <summary>
/// 自定义缓存的key
/// </summary>
/// <param name="invocation"></param>
/// <returns></returns>
protected string CustomCacheKey(IInvocation invocation)
{
/// <summary>
/// AOP的拦截方法
/// </summary>
/// <param name="invocation"></param>
public abstract void Intercept(IInvocation invocation);
/// <summary>
/// 自定义缓存的key
/// </summary>
/// <param name="invocation"></param>
/// <returns></returns>
protected string CustomCacheKey(IInvocation invocation)
{
var typeName = invocation.TargetType.Name;
var methodName = invocation.Method.Name;
var methodArguments = invocation.Arguments.Select(GetArgumentValue).Take(3).ToList();//获取参数列表,最多三个
string key = $"{typeName}:{methodName}:";
foreach (var param in methodArguments)
{
key = $"{key}{param}:";
}
return key.TrimEnd(':');
}
var typeName = invocation.TargetType.Name;
var methodName = invocation.Method.Name;
var methodArguments = invocation.Arguments.Select(GetArgumentValue).Take(3).ToList();//获取参数列表,最多三个
/// <summary>
/// object 转 string
/// </summary>
/// <param name="arg"></param>
/// <returns></returns>
protected static string GetArgumentValue(object arg)
string key = $"{typeName}:{methodName}:";
foreach (var param in methodArguments)
{
if (arg is DateTime)
return ((DateTime)arg).ToString("yyyyMMddHHmmss");
if (!arg.IsNotEmptyOrNull())
return arg.ObjToString();
if (arg != null)
{
if (arg is Expression)
{
var obj = arg as Expression;
var result = Resolve(obj);
return MD5Helper.MD5Encrypt16(result);
}
else if (arg.GetType().IsClass)
{
return MD5Helper.MD5Encrypt16(JsonConvert.SerializeObject(arg));
}
return $"value:{arg.ObjToString()}";
}
return string.Empty;
key = $"{key}{param}:";
}
private static string Resolve(Expression expression)
{
ExpressionContext expContext = new ExpressionContext();
expContext.Resolve(expression, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
return key.TrimEnd(':');
}
pars.ForEach(s =>
{
value = value.Replace(s.ParameterName, s.Value.ObjToString());
});
/// <summary>
/// object 转 string
/// </summary>
/// <param name="arg"></param>
/// <returns></returns>
protected static string GetArgumentValue(object arg)
{
if (arg is DateTime)
return ((DateTime)arg).ToString("yyyyMMddHHmmss");
return value;
}
if (!arg.IsNotEmptyOrNull())
return arg.ObjToString();
private static string GetOperator(ExpressionType expressiontype)
if (arg != null)
{
switch (expressiontype)
if (arg is Expression)
{
var obj = arg as Expression;
var result = Resolve(obj);
return MD5Helper.MD5Encrypt16(result);
}
else if (arg.GetType().IsClass)
{
case ExpressionType.And:
return "and";
case ExpressionType.AndAlso:
return "and";
case ExpressionType.Or:
return "or";
case ExpressionType.OrElse:
return "or";
case ExpressionType.Equal:
return "=";
case ExpressionType.NotEqual:
return "<>";
case ExpressionType.LessThan:
return "<";
case ExpressionType.LessThanOrEqual:
return "<=";
case ExpressionType.GreaterThan:
return ">";
case ExpressionType.GreaterThanOrEqual:
return ">=";
default:
throw new Exception($"不支持{expressiontype}此种运算符查找!");
return MD5Helper.MD5Encrypt16(JsonConvert.SerializeObject(arg));
}
return $"value:{arg.ObjToString()}";
}
return string.Empty;
}
private static string ResolveFunc(Expression left, Expression right, ExpressionType expressiontype)
private static string Resolve(Expression expression)
{
ExpressionContext expContext = new ExpressionContext();
expContext.Resolve(expression, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
pars.ForEach(s =>
{
var Name = (left as MemberExpression).Member.Name;
var Value = (right as ConstantExpression).Value;
var Operator = GetOperator(expressiontype);
return Name + Operator + Value ?? "null";
}
value = value.Replace(s.ParameterName, s.Value.ObjToString());
});
private static string ResolveLinqToObject(Expression expression, object value, ExpressionType? expressiontype = null)
return value;
}
private static string GetOperator(ExpressionType expressiontype)
{
switch (expressiontype)
{
var MethodCall = expression as MethodCallExpression;
var MethodName = MethodCall.Method.Name;
switch (MethodName)
{
case "Contains":
if (MethodCall.Object != null)
return Like(MethodCall);
return In(MethodCall, value);
case "Count":
return Len(MethodCall, value, expressiontype.Value);
case "LongCount":
return Len(MethodCall, value, expressiontype.Value);
default:
throw new Exception($"不支持{MethodName}方法的查找!");
}
case ExpressionType.And:
return "and";
case ExpressionType.AndAlso:
return "and";
case ExpressionType.Or:
return "or";
case ExpressionType.OrElse:
return "or";
case ExpressionType.Equal:
return "=";
case ExpressionType.NotEqual:
return "<>";
case ExpressionType.LessThan:
return "<";
case ExpressionType.LessThanOrEqual:
return "<=";
case ExpressionType.GreaterThan:
return ">";
case ExpressionType.GreaterThanOrEqual:
return ">=";
default:
throw new Exception($"不支持{expressiontype}此种运算符查找!");
}
}
private static string In(MethodCallExpression expression, object isTrue)
private static string ResolveFunc(Expression left, Expression right, ExpressionType expressiontype)
{
var Name = (left as MemberExpression).Member.Name;
var Value = (right as ConstantExpression).Value;
var Operator = GetOperator(expressiontype);
return Name + Operator + Value ?? "null";
}
private static string ResolveLinqToObject(Expression expression, object value, ExpressionType? expressiontype = null)
{
var MethodCall = expression as MethodCallExpression;
var MethodName = MethodCall.Method.Name;
switch (MethodName)
{
var Argument1 = (expression.Arguments[0] as MemberExpression).Expression as ConstantExpression;
var Argument2 = expression.Arguments[1] as MemberExpression;
var Field_Array = Argument1.Value.GetType().GetFields().First();
object[] Array = Field_Array.GetValue(Argument1.Value) as object[];
List<string> SetInPara = new List<string>();
for (int i = 0; i < Array.Length; i++)
{
string Name_para = "InParameter" + i;
string Value = Array[i].ToString();
SetInPara.Add(Value);
}
string Name = Argument2.Member.Name;
string Operator = Convert.ToBoolean(isTrue) ? "in" : " not in";
string CompName = string.Join(",", SetInPara);
string Result = $"{Name} {Operator} ({CompName})";
return Result;
case "Contains":
if (MethodCall.Object != null)
return Like(MethodCall);
return In(MethodCall, value);
case "Count":
return Len(MethodCall, value, expressiontype.Value);
case "LongCount":
return Len(MethodCall, value, expressiontype.Value);
default:
throw new Exception($"不支持{MethodName}方法的查找!");
}
private static string Like(MethodCallExpression expression)
{
}
var Temp = expression.Arguments[0];
LambdaExpression lambda = Expression.Lambda(Temp);
Delegate fn = lambda.Compile();
var tempValue = Expression.Constant(fn.DynamicInvoke(null), Temp.Type);
string Value = $"%{tempValue}%";
string Name = (expression.Object as MemberExpression).Member.Name;
string Result = $"{Name} like {Value}";
return Result;
private static string In(MethodCallExpression expression, object isTrue)
{
var Argument1 = (expression.Arguments[0] as MemberExpression).Expression as ConstantExpression;
var Argument2 = expression.Arguments[1] as MemberExpression;
var Field_Array = Argument1.Value.GetType().GetFields().First();
object[] Array = Field_Array.GetValue(Argument1.Value) as object[];
List<string> SetInPara = new List<string>();
for (int i = 0; i < Array.Length; i++)
{
string Name_para = "InParameter" + i;
string Value = Array[i].ToString();
SetInPara.Add(Value);
}
string Name = Argument2.Member.Name;
string Operator = Convert.ToBoolean(isTrue) ? "in" : " not in";
string CompName = string.Join(",", SetInPara);
string Result = $"{Name} {Operator} ({CompName})";
return Result;
}
private static string Like(MethodCallExpression expression)
{
var Temp = expression.Arguments[0];
LambdaExpression lambda = Expression.Lambda(Temp);
Delegate fn = lambda.Compile();
var tempValue = Expression.Constant(fn.DynamicInvoke(null), Temp.Type);
string Value = $"%{tempValue}%";
string Name = (expression.Object as MemberExpression).Member.Name;
string Result = $"{Name} like {Value}";
return Result;
}
private static string Len(MethodCallExpression expression, object value, ExpressionType expressiontype)
{
object Name = (expression.Arguments[0] as MemberExpression).Member.Name;
string Operator = GetOperator(expressiontype);
string Result = $"len({Name}){Operator}{value.ToString()}";
return Result;
}
private static string Len(MethodCallExpression expression, object value, ExpressionType expressiontype)
{
object Name = (expression.Arguments[0] as MemberExpression).Member.Name;
string Operator = GetOperator(expressiontype);
string Result = $"len({Name}){Operator}{value.ToString()}";
return Result;
}
}

@ -1,27 +1,22 @@

using System.Collections.Generic;
namespace Tiobon.Core.Extensions.Apollo;
namespace Tiobon.Core.Extensions.Apollo
/// <summary>
/// Apollo配置项
/// </summary>
public class ApolloOptions
{
/// <summary>
/// Apollo配置项
/// </summary>
public class ApolloOptions
{
public bool Enable { get; set; }
public List<ChildNamespace> Namespaces { get; set; }
public bool Enable { get; set; }
public List<ChildNamespace> Namespaces { get; set; }
public class ChildNamespace
{
/// <summary>
/// 命名空间名字
/// </summary>
public string Name { get; set; }
/// <summary>
/// 数据格式 Json/Yml/Yaml等
/// </summary>
public string Format { get; set; }
}
public class ChildNamespace
{
/// <summary>
/// 命名空间名字
/// </summary>
public string Name { get; set; }
/// <summary>
/// 数据格式 Json/Yml/Yaml等
/// </summary>
public string Format { get; set; }
}
}

@ -1,84 +1,80 @@
using Com.Ctrip.Framework.Apollo;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using Com.Ctrip.Framework.Apollo.Enums;
using Com.Ctrip.Framework.Apollo.Logging;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Primitives;
using System.Reflection;
namespace Tiobon.Core.Extensions.Apollo
namespace Tiobon.Core.Extensions.Apollo;
public static class ConfigurationBuilderExtensions
{
public static class ConfigurationBuilderExtensions
/// <summary>
/// 接入Apollo
/// </summary>
/// <param name="builder"></param>
/// <param name="jsonPath">apollo配置文件路径 如果写入appsettings.json中 则jsonPath传null即可</param>
public static void AddConfigurationApollo(this IConfigurationBuilder builder,string jsonPath)
{
/// <summary>
/// 接入Apollo
/// </summary>
/// <param name="builder"></param>
/// <param name="jsonPath">apollo配置文件路径 如果写入appsettings.json中 则jsonPath传null即可</param>
public static void AddConfigurationApollo(this IConfigurationBuilder builder,string jsonPath)
if (!string.IsNullOrEmpty(jsonPath))
{
if (!string.IsNullOrEmpty(jsonPath))
builder.AddJsonFile(jsonPath, true, false);
}
//阿波罗的日志级别调整
LogManager.UseConsoleLogging(LogLevel.Warn);
var options = new ApolloOptions();
var root = builder.Build();
root.Bind("Apollo", options);
if (options.Enable)
{
var apolloBuilder = builder.AddApollo(root.GetSection("Apollo:Config"));
foreach (var item in options.Namespaces)
{
builder.AddJsonFile(jsonPath, true, false);
apolloBuilder.AddNamespace(item.Name, MatchConfigFileFormat(item.Format));
}
//阿波罗的日志级别调整
LogManager.UseConsoleLogging(LogLevel.Warn);
var options = new ApolloOptions();
var root = builder.Build();
root.Bind("Apollo", options);
if (options.Enable)
{
var apolloBuilder = builder.AddApollo(root.GetSection("Apollo:Config"));
//监听apollo配置
Monitor(builder.Build());
}
foreach (var item in options.Namespaces)
{
apolloBuilder.AddNamespace(item.Name, MatchConfigFileFormat(item.Format));
}
//监听apollo配置
Monitor(builder.Build());
}
}
#region private
/// <summary>
/// 监听配置
/// </summary>
private static void Monitor(IConfigurationRoot root)
{
//TODO 需要根据改变执行特定的操作 如 mq redis 等其他跟配置相关的中间件
//TODO 初步思路:将需要执行特定的操作key和value放入内存字典中,在赋值操作时通过标准事件来执行特定的操作。
}
#region private
/// <summary>
/// 监听配置
/// </summary>
private static void Monitor(IConfigurationRoot root)
//要重新Build 此时才将Apollo provider加入到ConfigurationBuilder中
ChangeToken.OnChange(() => root.GetReloadToken(), () =>
{
//TODO 需要根据改变执行特定的操作 如 mq redis 等其他跟配置相关的中间件
//TODO 初步思路:将需要执行特定的操作key和value放入内存字典中,在赋值操作时通过标准事件来执行特定的操作。
//要重新Build 此时才将Apollo provider加入到ConfigurationBuilder中
ChangeToken.OnChange(() => root.GetReloadToken(), () =>
foreach (var apolloProvider in root.Providers.Where(p => p is ApolloConfigurationProvider))
{
foreach (var apolloProvider in root.Providers.Where(p => p is ApolloConfigurationProvider))
var property = apolloProvider.GetType().BaseType.GetProperty("Data", BindingFlags.Instance | BindingFlags.NonPublic);
var data = property.GetValue(apolloProvider) as IDictionary<string, string>;
foreach (var item in data)
{
var property = apolloProvider.GetType().BaseType.GetProperty("Data", BindingFlags.Instance | BindingFlags.NonPublic);
var data = property.GetValue(apolloProvider) as IDictionary<string, string>;
foreach (var item in data)
{
Console.WriteLine($"key {item.Key} value {item.Value}");
}
Console.WriteLine($"key {item.Key} value {item.Value}");
}
});
}
}
});
}
//匹配格式
private static ConfigFileFormat MatchConfigFileFormat(string value) => value switch
{
"json" => ConfigFileFormat.Json,
"properties" => ConfigFileFormat.Properties,
"xml" => ConfigFileFormat.Xml,
"yml" => ConfigFileFormat.Yml,
"yaml" => ConfigFileFormat.Yaml,
"txt" => ConfigFileFormat.Txt,
_ => throw new FormatException($"与apollo命名空间的所允许的类型不匹配:{string.Join(",", GetConfigFileFormat())}"),
};
//获取数据格式对应的枚举
private static IEnumerable<string> GetConfigFileFormat() => Enum.GetValues<ConfigFileFormat>().Select(u => u.ToString().ToLower());
#endregion
//匹配格式
private static ConfigFileFormat MatchConfigFileFormat(string value) => value switch
{
"json" => ConfigFileFormat.Json,
"properties" => ConfigFileFormat.Properties,
"xml" => ConfigFileFormat.Xml,
"yml" => ConfigFileFormat.Yml,
"yaml" => ConfigFileFormat.Yaml,
"txt" => ConfigFileFormat.Txt,
_ => throw new FormatException($"与apollo命名空间的所允许的类型不匹配:{string.Join(",", GetConfigFileFormat())}"),
};
//获取数据格式对应的枚举
private static IEnumerable<string> GetConfigFileFormat() => Enum.GetValues<ConfigFileFormat>().Select(u => u.ToString().ToLower());
#endregion
}
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghra_Job(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghra_Job(自定义服务接口)
/// </summary>
public interface IGhra_JobServices :IBaseServices<Ghra_Job, Ghra_JobDto, InsertGhra_JobInput, EditGhra_JobInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghra_StaffLicence(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghra_StaffLicence(自定义服务接口)
/// </summary>
public interface IGhra_StaffLicenceServices :IBaseServices<Ghra_StaffLicence, Ghra_StaffLicenceDto, InsertGhra_StaffLicenceInput, EditGhra_StaffLicenceInput>
{
}
}
{
}

@ -2,13 +2,12 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghra_Staff(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghra_Staff(自定义服务接口)
/// </summary>
public interface IGhra_StaffServices :IBaseServices<Ghra_Staff, Ghra_StaffDto, InsertGhra_StaffInput, EditGhra_StaffInput>
{
Task<ServiceResult<Ghra_StaffDto>> QuerySimple(int id);
}
}
{
Task<ServiceResult<Ghra_StaffDto>> QuerySimple(int id);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghra_StaffTraining(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghra_StaffTraining(自定义服务接口)
/// </summary>
public interface IGhra_StaffTrainingServices :IBaseServices<Ghra_StaffTraining, Ghra_StaffTrainingDto, InsertGhra_StaffTrainingInput, EditGhra_StaffTrainingInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghra_Title(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghra_Title(自定义服务接口)
/// </summary>
public interface IGhra_TitleServices :IBaseServices<Ghra_Title, Ghra_TitleDto, InsertGhra_TitleInput, EditGhra_TitleInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 厂区(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 厂区(自定义服务接口)
/// </summary>
public interface IGhra_ZoneServices :IBaseServices<Ghra_Zone, Ghra_ZoneDto, InsertGhra_ZoneInput, EditGhra_ZoneInput>
{
}
}
{
}

@ -3,14 +3,13 @@ using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 附件(自定义服务接口)
/// </summary>
public interface IGhre_AttachmentServices :IBaseServices<Ghre_Attachment, Ghre_AttachmentDto, InsertGhre_AttachmentInput, EditGhre_AttachmentInput>
namespace Tiobon.Core.IServices;
/// <summary>
/// 附件(自定义服务接口)
/// </summary>
public interface IGhre_AttachmentServices :IBaseServices<Ghre_Attachment, Ghre_AttachmentDto, InsertGhre_AttachmentInput, EditGhre_AttachmentInput>
{
Task<ServiceResult<FileUploadResult>> UploadVideoAsync(ChunkUpload upload);
Task<ServiceResult<FileUploadResult>> UploadVideoAsync(ChunkUpload upload);
}
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 培训证书规则(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 培训证书规则(自定义服务接口)
/// </summary>
public interface IGhre_CertificateRuleServices :IBaseServices<Ghre_CertificateRule, Ghre_CertificateRuleDto, InsertGhre_CertificateRuleInput, EditGhre_CertificateRuleInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 培训记录(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 培训记录(自定义服务接口)
/// </summary>
public interface IGhre_CertificateServices :IBaseServices<Ghre_Certificate, Ghre_CertificateDto, InsertGhre_CertificateInput, EditGhre_CertificateInput>
{
}
}
{
}

@ -2,13 +2,12 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 参数配置(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 参数配置(自定义服务接口)
/// </summary>
public interface IGhre_ConfigServices :IBaseServices<Ghre_Config, Ghre_ConfigDto, InsertGhre_ConfigInput, EditGhre_ConfigInput>
{
Task<ServiceResult> BulkUpdateValue(List<Ghre_ConfigDto> entitys);
}
}
{
Task<ServiceResult> BulkUpdateValue(List<Ghre_ConfigDto> entitys);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 课程分类(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 课程分类(自定义服务接口)
/// </summary>
public interface IGhre_CourseClassServices :IBaseServices<Ghre_CourseClass, Ghre_CourseClassDto, InsertGhre_CourseClassInput, EditGhre_CourseClassInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 课程场景(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 课程场景(自定义服务接口)
/// </summary>
public interface IGhre_CourseSceneServices :IBaseServices<Ghre_CourseScene, Ghre_CourseSceneDto, InsertGhre_CourseSceneInput, EditGhre_CourseSceneInput>
{
}
}
{
}

@ -3,26 +3,25 @@ using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
namespace Tiobon.Core.IServices;
/// <summary>
/// 课程(自定义服务接口)
/// </summary>
public interface IGhre_CourseServices : IBaseServices<Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>
{
/// <summary>
/// 课程(自定义服务接口)
/// </summary>
public interface IGhre_CourseServices : IBaseServices<Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>
{
Task<ServicePageResult<Ghre_CourseDto>> QueryList(QueryBody filter, string status, List<long> ids);
Task<ServicePageResult<Ghre_CourseDto>> QueryList(QueryBody filter, string status, List<long> ids);
Task<ServiceResult<int>> QueryDeptID(int StaffID);
Task<ServiceResult<CommonSelect>> QueryTeacher(long? linkId);
Task<ServiceResult> UpdateStatus(long[] ids, string status);
Task<ServiceResult<CommonSelect>> GetSelectAsync(long? linkId, string keyWords);
Task<ServiceResult<int>> QueryDeptID(int StaffID);
Task<ServiceResult<CommonSelect>> QueryTeacher(long? linkId);
Task<ServiceResult> UpdateStatus(long[] ids, string status);
Task<ServiceResult<CommonSelect>> GetSelectAsync(long? linkId, string keyWords);
Task<ServiceResult<ExcelData>> ExportExcel(QueryExport body, string status);
Task<ServiceResult<ExcelData>> ExportExcel(QueryExport body, string status);
Task<ServiceResult<CoursePublicSearch>> QueryPublicSearchFields(QueryBody body);
Task<ServiceResult<CoursePublicSearch>> QueryPublicSearchFields(QueryBody body);
Task<ServicePageResult<CoursePublic>> QueryPublic(QueryBody filter);
Task<ServicePageResult<CoursePublic>> QueryPublic(QueryBody filter);
}
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghre_CourseSnap(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_CourseSnap(自定义服务接口)
/// </summary>
public interface IGhre_CourseSnapServices :IBaseServices<Ghre_CourseSnap, Ghre_CourseSnapDto, InsertGhre_CourseSnapInput, EditGhre_CourseSnapInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 课件附件(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 课件附件(自定义服务接口)
/// </summary>
public interface IGhre_CourseWareAttachmentServices :IBaseServices<Ghre_CourseWareAttachment, Ghre_CourseWareAttachmentDto, InsertGhre_CourseWareAttachmentInput, EditGhre_CourseWareAttachmentInput>
{
}
}
{
}

@ -2,14 +2,13 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 课件(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 课件(自定义服务接口)
/// </summary>
public interface IGhre_CourseWareServices :IBaseServices<Ghre_CourseWare, Ghre_CourseWareDto, InsertGhre_CourseWareInput, EditGhre_CourseWareInput>
{
{
Task<ServiceResult<string>> DownZip(long id);
}
}
Task<ServiceResult<string>> DownZip(long id);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 考试通知记录(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 考试通知记录(自定义服务接口)
/// </summary>
public interface IGhre_ExamMessageLogServices :IBaseServices<Ghre_ExamMessageLog, Ghre_ExamMessageLogDto, InsertGhre_ExamMessageLogInput, EditGhre_ExamMessageLogInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 试卷配置(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 试卷配置(自定义服务接口)
/// </summary>
public interface IGhre_ExamPaperConfigServices :IBaseServices<Ghre_ExamPaperConfig, Ghre_ExamPaperConfigDto, InsertGhre_ExamPaperConfigInput, EditGhre_ExamPaperConfigInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 试卷题目(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 试卷题目(自定义服务接口)
/// </summary>
public interface IGhre_ExamPaperQuestionServices :IBaseServices<Ghre_ExamPaperQuestion, Ghre_ExamPaperQuestionDto, InsertGhre_ExamPaperQuestionInput, EditGhre_ExamPaperQuestionInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghre_ExamRecordDetail(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_ExamRecordDetail(自定义服务接口)
/// </summary>
public interface IGhre_ExamRecordDetailServices :IBaseServices<Ghre_ExamRecordDetail, Ghre_ExamRecordDetailDto, InsertGhre_ExamRecordDetailInput, EditGhre_ExamRecordDetailInput>
{
}
}
{
}

@ -3,29 +3,28 @@ using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
namespace Tiobon.Core.IServices;
/// <summary>
/// 考试记录(自定义服务接口)
/// </summary>
public interface IGhre_ExamRecordServices : IBaseServices<Ghre_ExamRecord, Ghre_ExamRecordDto, InsertGhre_ExamRecordInput, EditGhre_ExamRecordInput>
{
/// <summary>
/// 考试记录(自定义服务接口)
/// </summary>
public interface IGhre_ExamRecordServices : IBaseServices<Ghre_ExamRecord, Ghre_ExamRecordDto, InsertGhre_ExamRecordInput, EditGhre_ExamRecordInput>
{
Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body);
Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body);
Task<ServiceResult> ModifyAdjustScore(string examRecordId, EditGhre_ExamRecordInput edit);
Task<ServiceResult> ModifyAdjustScore(string examRecordId, EditGhre_ExamRecordInput edit);
Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId);
Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId);
Task<ServiceResult> CommentAsync(Ghre_ExamRecordExtend extend, long examRecordId);
Task<ServiceResult> CommentAsync(Ghre_ExamRecordExtend extend, long examRecordId);
Task<ServiceResult<QueryExam>> QueryExamAsync(long id);
Task<ServiceResult<QueryExam>> QueryExamAsync(long id);
Task<ServiceResult> StartExamAsync(long examRecordId);
Task<ServiceResult> StartExamAsync(long examRecordId);
Task<ServiceResult> RetakeExamAsync(long examRecordId);
Task<ServiceResult> RetakeExamAsync(long examRecordId);
Task<ServiceResult> AnswerExamAsync(List<DefaultGhre_ExamPaperPreview> answers, long studyRecordId);
Task<ServiceResult> AnswerExamAsync(List<DefaultGhre_ExamPaperPreview> answers, long studyRecordId);
Task<ServiceResult> ViewExamPaperCallBackAsync(long examRecordId);
}
Task<ServiceResult> ViewExamPaperCallBackAsync(long examRecordId);
}

@ -3,38 +3,37 @@ using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
namespace Tiobon.Core.IServices;
/// <summary>
/// 考试(自定义服务接口)
/// </summary>
public interface IGhre_ExamServices : IBaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhre_ExamInput, EditGhre_ExamInput>
{
/// <summary>
/// 考试(自定义服务接口)
/// </summary>
public interface IGhre_ExamServices : IBaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhre_ExamInput, EditGhre_ExamInput>
{
Task<dynamic> GetModuleInfo(ModuleParam param);
Task<dynamic> QueryList(QueryBody body, string status);
Task<dynamic> GetModuleInfo(ModuleParam param);
Task<dynamic> QueryList(QueryBody body, string status);
Task<ServiceResult<DefaultGhre_ExamInput>> QueryDefault(long Id);
Task<ServiceResult<DefaultGhre_ExamInput>> QueryDefault(long Id);
Task<ServiceResult<List<StaffTableData>>> QueryStaff(List<int> Ids, string type);
Task<ServiceResult<List<StaffTableData>>> QueryStaff(List<int> Ids, string type);
Task<ServiceResult<long>> Insert1(long id, DefaultGhre_ExamPageData pageData);
Task<ServiceResult<long>> Insert1(long id, DefaultGhre_ExamPageData pageData);
Task<ServiceResult> UpdateStatus(long[] ids, string status);
Task<ServiceResult> UpdateStatus(long[] ids, string status);
Task<ServiceResult> GetStatus(long id);
Task<ServiceResult> GetStatus(long id);
Task<ServiceResult> StartExam(long id);
Task<ServiceResult> StartExam(long id);
Task<ServiceResult> Copy(long id);
Task<ServiceResult> Copy(long id);
Task<ServiceResult<Ghre_ExamMessageLogDto>> QueryMessageLog(long id);
Task<ServiceResult<Ghre_ExamMessageLogDto>> QueryMessageLog(long id);
Task<ServiceResult> InsertMessageLog(Ghre_ExamMessageLogDto insert);
Task<ServiceResult> InsertMessageLog(Ghre_ExamMessageLogDto insert);
Task<ServiceResult<List<StaffTableData>>> QueryRuleStaff(long examId);
Task<ServiceResult<List<StaffTableData>>> QueryRuleStaff(long examId);
Task<ServiceResult<string>> ExportExcel(QueryExport body, string status);
Task<ServiceResult<string>> ExportExcel(QueryExport body, string status);
Task<ServiceResult> ExecuteExamOver();
}
Task<ServiceResult> ExecuteExamOver();
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghre_ExamStaff(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_ExamStaff(自定义服务接口)
/// </summary>
public interface IGhre_ExamStaffServices :IBaseServices<Ghre_ExamStaff, Ghre_ExamStaffDto, InsertGhre_ExamStaffInput, EditGhre_ExamStaffInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 题目答案(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 题目答案(自定义服务接口)
/// </summary>
public interface IGhre_QuestionAnswerServices :IBaseServices<Ghre_QuestionAnswer, Ghre_QuestionAnswerDto, InsertGhre_QuestionAnswerInput, EditGhre_QuestionAnswerInput>
{
}
}
{
}

@ -1,18 +1,16 @@
using Microsoft.AspNetCore.Http;
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
namespace Tiobon.Core.IServices;
/// <summary>
/// 题目(自定义服务接口)
/// </summary>
public interface IGhre_QuestionServices : IBaseServices<Ghre_Question, Ghre_QuestionDto, InsertGhre_QuestionInput, EditGhre_QuestionInput>
{
/// <summary>
/// 题目(自定义服务接口)
/// </summary>
public interface IGhre_QuestionServices : IBaseServices<Ghre_Question, Ghre_QuestionDto, InsertGhre_QuestionInput, EditGhre_QuestionInput>
{
Task<ServiceResult<FromGhre_QuestionInput>> QueryFrom(long Id);
Task<ServiceResult> InsertFrom(FromGhre_QuestionPageData insertModel);
Task<ServiceResult<FromGhre_QuestionInput>> QueryFrom(long Id);
Task<ServiceResult> InsertFrom(FromGhre_QuestionPageData insertModel);
Task<ServiceResult> UpdareFrom(long Id, FromGhre_QuestionPageData insertModel);
}
Task<ServiceResult> UpdareFrom(long Id, FromGhre_QuestionPageData insertModel);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 必选修查询(自定义服务接口)
/// </summary>
public interface IGhre_RequiredCourseServices :IBaseServices<Ghre_RequiredCourse, Ghre_RequiredCourseDto, InsertGhre_RequiredCourseInput, EditGhre_RequiredCourseInput>
namespace Tiobon.Core.IServices;
/// <summary>
/// 必选修查询(自定义服务接口)
/// </summary>
public interface IGhre_RequiredCourseServices :IBaseServices<Ghre_RequiredCourse, Ghre_RequiredCourseDto, InsertGhre_RequiredCourseInput, EditGhre_RequiredCourseInput>
{
}
}

@ -4,31 +4,30 @@ using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 培训记录(自定义服务接口)
/// </summary>
public interface IGhre_StudyRecordServices :IBaseServices<Ghre_StudyRecord, Ghre_StudyRecordDto, InsertGhre_StudyRecordInput, EditGhre_StudyRecordInput>
namespace Tiobon.Core.IServices;
/// <summary>
/// 培训记录(自定义服务接口)
/// </summary>
public interface IGhre_StudyRecordServices :IBaseServices<Ghre_StudyRecord, Ghre_StudyRecordDto, InsertGhre_StudyRecordInput, EditGhre_StudyRecordInput>
{
Task<ServiceResult<CoursePublicSearch>> QueryESSSearchFields(QueryBody body);
Task<ServicePageResult<Ghre_StudyRecordESS>> QueryESS(QueryBody filter, string condition, bool? IsEnable = true);
Task<ServicePageResult<Ghre_StudyRecordDto>> QueryStaff(QueryBody filter);
Task<ServicePageResult<Ghre_StudyRecordDto>> QueryStaff(QueryBody filter);
Task<ServiceResult<Ghre_StudyRecordCourse>> QueryCourse(QueryBody body, long id);
Task<ServiceResult<Ghre_StudyRecordCourse>> QueryCourse(QueryBody body, long id);
Task<ServiceResult> Join(long courseId);
Task<ServiceResult> Join(long courseId);
Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration);
Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration);
Task<ServiceResult<ExcelData>> ExportStaffExcel(QueryExport body);
Task<ServiceResult<ExcelData>> ExportStaffExcel(QueryExport body);
Task SyncToESS();
Task SyncToESS();
Task<ServicePageResult<TeacherClassAnalysis>> QueryTeacherClassAnalysis(QueryBody filter);
}
Task<ServicePageResult<TeacherClassAnalysis>> QueryTeacherClassAnalysis(QueryBody filter);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 必选修规则结果(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 必选修规则结果(自定义服务接口)
/// </summary>
public interface IGhre_StudyRuleResultServices :IBaseServices<Ghre_StudyRuleResult, Ghre_StudyRuleResultDto, InsertGhre_StudyRuleResultInput, EditGhre_StudyRuleResultInput>
{
}
}
{
}

@ -1,13 +1,12 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 必选修规则(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 必选修规则(自定义服务接口)
/// </summary>
public interface IGhre_StudyRuleServices :IBaseServices<Ghre_StudyRule, Ghre_StudyRuleDto, InsertGhre_StudyRuleInput, EditGhre_StudyRuleInput>
{
Task StaffIn();
}
}
{
Task StaffIn();
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 必选修规则人员(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 必选修规则人员(自定义服务接口)
/// </summary>
public interface IGhre_StudyRuleStaffServices :IBaseServices<Ghre_StudyRuleStaff, Ghre_StudyRuleStaffDto, InsertGhre_StudyRuleStaffInput, EditGhre_StudyRuleStaffInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghre_TeacherAttachment(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_TeacherAttachment(自定义服务接口)
/// </summary>
public interface IGhre_TeacherAttachmentServices :IBaseServices<Ghre_TeacherAttachment, Ghre_TeacherAttachmentDto, InsertGhre_TeacherAttachmentInput, EditGhre_TeacherAttachmentInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 培训讲师异动附件(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 培训讲师异动附件(自定义服务接口)
/// </summary>
public interface IGhre_TeacherChangeAttachmentServices :IBaseServices<Ghre_TeacherChangeAttachment, Ghre_TeacherChangeAttachmentDto, InsertGhre_TeacherChangeAttachmentInput, EditGhre_TeacherChangeAttachmentInput>
{
}
}
{
}

@ -2,17 +2,16 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
namespace Tiobon.Core.IServices;
/// <summary>
/// 培训讲师异动(自定义服务接口)
/// </summary>
public interface IGhre_TeacherChangeServices :IBaseServices<Ghre_TeacherChange, Ghre_TeacherChangeDto, InsertGhre_TeacherChangeInput, EditGhre_TeacherChangeInput>
public interface IGhre_TeacherChangeServices :IBaseServices<Ghre_TeacherChange, Ghre_TeacherChangeDto, InsertGhre_TeacherChangeInput, EditGhre_TeacherChangeInput>
{
Task<ServiceResult> UpdateStatus(InsertGhre_TeacherChangeInput input, string status);
Task<ServiceResult> UpdateStatus(InsertGhre_TeacherChangeInput input, string status);
Task<ServiceResult<long>> InsertByStatus(InsertGhre_TeacherChangeInput insertModel, string status);
Task<ServiceResult<long>> InsertByStatus(InsertGhre_TeacherChangeInput insertModel, string status);
Task<ServiceResult<Ghre_TeacherChangeDto>> QueryLast(int teacherId);
}
Task<ServiceResult<Ghre_TeacherChangeDto>> QueryLast(int teacherId);
}

@ -2,15 +2,14 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghre_Teacher(自定义服务接口)
/// </summary>
public interface IGhre_TeacherServices :IBaseServices<Ghre_Teacher, Ghre_TeacherDto, InsertGhre_TeacherInput, EditGhre_TeacherInput>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_Teacher(自定义服务接口)
/// </summary>
public interface IGhre_TeacherServices :IBaseServices<Ghre_Teacher, Ghre_TeacherDto, InsertGhre_TeacherInput, EditGhre_TeacherInput>
{
Task<ServiceResult> UpdateStatus(InsertGhre_TeacherInput input, string status);
Task<ServiceResult> UpdateStatus(InsertGhre_TeacherInput input, string status);
Task<ServiceResult<long>> InsertByStatus(InsertGhre_TeacherInput insertModel, string status);
}
Task<ServiceResult<long>> InsertByStatus(InsertGhre_TeacherInput insertModel, string status);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 人力需求维护(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 人力需求维护(自定义服务接口)
/// </summary>
public interface IGhrh_HumanRequestServices :IBaseServices<Ghrh_HumanRequest, Ghrh_HumanRequestDto, InsertGhrh_HumanRequestInput, EditGhrh_HumanRequestInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 教育背景(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 教育背景(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeEduBGServices :IBaseServices<Ghrh_ResumeEduBG, Ghrh_ResumeEduBGDto, InsertGhrh_ResumeEduBGInput, EditGhrh_ResumeEduBGInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 家庭关系(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 家庭关系(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeHomeServices :IBaseServices<Ghrh_ResumeHome, Ghrh_ResumeHomeDto, InsertGhrh_ResumeHomeInput, EditGhrh_ResumeHomeInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历信息栏位(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历信息栏位(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeInfoColumnServices :IBaseServices<Ghrh_ResumeInfoColumn, Ghrh_ResumeInfoColumnDto, InsertGhrh_ResumeInfoColumnInput, EditGhrh_ResumeInfoColumnInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历组别(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历组别(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeInfoGroupServices :IBaseServices<Ghrh_ResumeInfoGroup, Ghrh_ResumeInfoGroupDto, InsertGhrh_ResumeInfoGroupInput, EditGhrh_ResumeInfoGroupInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 证件(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 证件(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeLicenceServices :IBaseServices<Ghrh_ResumeLicence, Ghrh_ResumeLicenceDto, InsertGhrh_ResumeLicenceInput, EditGhrh_ResumeLicenceInput>
{
}
}
{
}

@ -4,33 +4,32 @@ using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.IServices
namespace Tiobon.Core.IServices;
/// <summary>
/// 个人简历(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
{
/// <summary>
/// 个人简历(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
{
ServiceResult<List<ResumeViewTab>> QueryViewTab();
ServiceResult<List<ResumeViewTab>> QueryViewTab();
Task<ServiceResult<List<ResumeCondition>>> QueryConditions();
Task<ServiceResult<List<ResumeCondition>>> QueryConditions();
Task<ServiceResult> SwitchIsRecommend(List<long> ids, bool isRecommend);
Task<ServiceResult> SwitchIsRecommend(List<long> ids, bool isRecommend);
Task<bool> UpdateStatus(List<long> ids, string status);
Task<bool> UpdateStatus(List<long> ids, string status);
Task<bool> MarkTags(List<long> ids, List<long> tags);
Task<bool> MarkTags(List<long> ids, List<long> tags);
Task<ServiceResult<dynamic>> CheckIsExist(EditGhrh_ResumeInput input);
Task<ServiceResult<dynamic>> CheckIsExist(EditGhrh_ResumeInput input);
Task<ServiceResult<Dictionary<string, string>>> QueryCompanyInfo(string companySpecCode);
Task<ServiceResult<Dictionary<string, string>>> QueryCompanyInfo(string companySpecCode);
Task<ServiceResult<dynamic>> Query(long id, int langId);
Task<ServiceResult<dynamic>> Query(long id, int langId);
Task<ServiceResult> Submit(long id, string status, ResumeFormColumnSubmit resume);
Task<ServiceResult> Submit(long id, string status, ResumeFormColumnSubmit resume);
Task<ServiceResult<dynamic>> QueryResult(long id, int langId);
Task<ServiceResult<dynamic>> QueryResult(long id, int langId);
Task<ServiceResult<string>> Export(QueryBody filter, string condition, bool? IsEnable = true);
}
Task<ServiceResult<string>> Export(QueryBody filter, string condition, bool? IsEnable = true);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历声明(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历声明(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeStatementServices :IBaseServices<Ghrh_ResumeStatement, Ghrh_ResumeStatementDto, InsertGhrh_ResumeStatementInput, EditGhrh_ResumeStatementInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历标签(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历标签(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeTagServices :IBaseServices<Ghrh_ResumeTag, Ghrh_ResumeTagDto, InsertGhrh_ResumeTagInput, EditGhrh_ResumeTagInput>
{
}
}
{
}

@ -4,27 +4,26 @@ using Tiobon.Core.Model;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历模板(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历模板(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeTemplateServices :IBaseServices<Ghrh_ResumeTemplate, Ghrh_ResumeTemplateDto, InsertGhrh_ResumeTemplateInput, EditGhrh_ResumeTemplateInput>
{
Task<ServiceResult> SwitchPublish(long id, int? isPublish);
{
Task<ServiceResult> SwitchPublish(long id, int? isPublish);
Task<ServiceResult<List<Ghrh_ResumeInfoGroupDto>>> QueryGroup(QueryForm filter);
Task<ServiceResult<List<Ghrh_ResumeInfoGroupDto>>> QueryGroup(QueryForm filter);
Task<ServiceResult> PhotoSwitch(long id, int? photoType);
Task<ServiceResult> PhotoSwitch(long id, int? photoType);
Task<ServiceResult> ColumnMove(long id, List<ResumeTemplateColumnMove> columns);
Task<ServiceResult> ColumnMove(long id, List<ResumeTemplateColumnMove> columns);
Task<ServiceResult<List<ResumeTemplateGroupColumn>>> QueryTemplateColumn(QueryForm filter);
Task<ServiceResult<List<ResumeTemplateGroupColumn>>> QueryTemplateColumn(QueryForm filter);
Task<ServiceResult> ExceteTemplateColumnChange(QueryForm filter);
Task<ServiceResult> ExceteTemplateColumnChange(QueryForm filter);
Task<ServiceResult<Ghrh_ResumeInfoColumnDto>> QueryTemplateColumnSingle(QueryForm filter);
Task<ServiceResult<Ghrh_ResumeInfoColumnDto>> QueryTemplateColumnSingle(QueryForm filter);
Task<ServiceResult> PT_GHR30_StaffTemplate_IUD(QueryForm1 filter);
}
}
Task<ServiceResult> PT_GHR30_StaffTemplate_IUD(QueryForm1 filter);
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 简历培训记录(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 简历培训记录(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeTrainingServices :IBaseServices<Ghrh_ResumeTraining, Ghrh_ResumeTrainingDto, InsertGhrh_ResumeTrainingInput, EditGhrh_ResumeTrainingInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 工作经历(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 工作经历(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeWorkExpServices :IBaseServices<Ghrh_ResumeWorkExp, Ghrh_ResumeWorkExpDto, InsertGhrh_ResumeWorkExpInput, EditGhrh_ResumeWorkExpInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 声明(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 声明(自定义服务接口)
/// </summary>
public interface IGhrh_StatementServices :IBaseServices<Ghrh_Statement, Ghrh_StatementDto, InsertGhrh_StatementInput, EditGhrh_StatementInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 年度人力配置(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 年度人力配置(自定义服务接口)
/// </summary>
public interface IGhrh_YearHumanSettingsServices :IBaseServices<Ghrh_YearHumanSettings, Ghrh_YearHumanSettingsDto, InsertGhrh_YearHumanSettingsInput, EditGhrh_YearHumanSettingsInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghro_Dept(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghro_Dept(自定义服务接口)
/// </summary>
public interface IGhro_DeptServices :IBaseServices<Ghro_Dept, Ghro_DeptDto, InsertGhro_DeptInput, EditGhro_DeptInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghrs_Attachment(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghrs_Attachment(自定义服务接口)
/// </summary>
public interface IGhrs_AttachmentServices :IBaseServices<Ghrs_Attachment, Ghrs_AttachmentDto, InsertGhrs_AttachmentInput, EditGhrs_AttachmentInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghrs_DataRoleDetail(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghrs_DataRoleDetail(自定义服务接口)
/// </summary>
public interface IGhrs_DataRoleDetailServices :IBaseServices<Ghrs_DataRoleDetail, Ghrs_DataRoleDetailDto, InsertGhrs_DataRoleDetailInput, EditGhrs_DataRoleDetailInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghrs_Menu(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghrs_Menu(自定义服务接口)
/// </summary>
public interface IGhrs_MenuServices :IBaseServices<Ghrs_Menu, Ghrs_MenuDto, InsertGhrs_MenuInput, EditGhrs_MenuInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// Ghrs_ParaDetail(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghrs_ParaDetail(自定义服务接口)
/// </summary>
public interface IGhrs_ParaDetailServices :IBaseServices<Ghrs_ParaDetail, Ghrs_ParaDetailDto, InsertGhrs_ParaDetailInput, EditGhrs_ParaDetailInput>
{
}
}
{
}

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 系统用户(自定义服务接口)
/// </summary>
namespace Tiobon.Core.IServices;
/// <summary>
/// 系统用户(自定义服务接口)
/// </summary>
public interface IGhrs_UserServices :IBaseServices<Ghrs_User, Ghrs_UserDto, InsertGhrs_UserInput, EditGhrs_UserInput>
{
}
}
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 年级 (Dto.EditInput)
/// </summary>
public class EditGhra_GradeInput : Ghra_GradeBase
{
}
/// <summary>
/// 年级 (Dto.EditInput)
/// </summary>
public class EditGhra_GradeInput : Ghra_GradeBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghra_Job (Dto.EditInput)
/// </summary>
public class EditGhra_JobInput : Ghra_JobBase
{
}
/// <summary>
/// Ghra_Job (Dto.EditInput)
/// </summary>
public class EditGhra_JobInput : Ghra_JobBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghra_Staff (Dto.EditInput)
/// </summary>
public class EditGhra_StaffInput : Ghra_StaffBase
{
}
/// <summary>
/// Ghra_Staff (Dto.EditInput)
/// </summary>
public class EditGhra_StaffInput : Ghra_StaffBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghra_StaffLicence (Dto.EditInput)
/// </summary>
public class EditGhra_StaffLicenceInput : Ghra_StaffLicenceBase
{
}
/// <summary>
/// Ghra_StaffLicence (Dto.EditInput)
/// </summary>
public class EditGhra_StaffLicenceInput : Ghra_StaffLicenceBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghra_StaffTraining (Dto.EditInput)
/// </summary>
public class EditGhra_StaffTrainingInput : Ghra_StaffTrainingBase
{
}
/// <summary>
/// Ghra_StaffTraining (Dto.EditInput)
/// </summary>
public class EditGhra_StaffTrainingInput : Ghra_StaffTrainingBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghra_Title (Dto.EditInput)
/// </summary>
public class EditGhra_TitleInput : Ghra_TitleBase
{
}
/// <summary>
/// Ghra_Title (Dto.EditInput)
/// </summary>
public class EditGhra_TitleInput : Ghra_TitleBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 厂区 (Dto.EditInput)
/// </summary>
public class EditGhra_ZoneInput : Ghra_ZoneBase
{
}
/// <summary>
/// 厂区 (Dto.EditInput)
/// </summary>
public class EditGhra_ZoneInput : Ghra_ZoneBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 附件 (Dto.EditInput)
/// </summary>
public class EditGhre_AttachmentInput : Ghre_AttachmentBase
{
}
/// <summary>
/// 附件 (Dto.EditInput)
/// </summary>
public class EditGhre_AttachmentInput : Ghre_AttachmentBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 培训记录 (Dto.EditInput)
/// </summary>
public class EditGhre_CertificateInput : Ghre_CertificateBase
{
}
/// <summary>
/// 培训记录 (Dto.EditInput)
/// </summary>
public class EditGhre_CertificateInput : Ghre_CertificateBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 培训证书规则 (Dto.EditInput)
/// </summary>
public class EditGhre_CertificateRuleInput : Ghre_CertificateRuleBase
{
}
/// <summary>
/// 培训证书规则 (Dto.EditInput)
/// </summary>
public class EditGhre_CertificateRuleInput : Ghre_CertificateRuleBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 参数配置 (Dto.EditInput)
/// </summary>
public class EditGhre_ConfigInput : Ghre_ConfigBase
{
}
/// <summary>
/// 参数配置 (Dto.EditInput)
/// </summary>
public class EditGhre_ConfigInput : Ghre_ConfigBase
{
}

@ -15,19 +15,18 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 课程 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseInput : Ghre_CourseBase
{
public List<long> ExamPaperIds { get; set; }
public List<long> CourseClassIds { get; set; }
/// <summary>
/// 课程 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseInput : Ghre_CourseBase
{
public List<long> ExamPaperIds { get; set; }
public List<long> CourseClassIds { get; set; }
public string IsOPenLabel { get; set; }
}
public string IsOPenLabel { get; set; }
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 课程分类 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseClassInput : Ghre_CourseClassBase
{
}
/// <summary>
/// 课程分类 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseClassInput : Ghre_CourseClassBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 课程场景 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseSceneInput : Ghre_CourseSceneBase
{
}
/// <summary>
/// 课程场景 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseSceneInput : Ghre_CourseSceneBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_CourseSnap (Dto.EditInput)
/// </summary>
public class EditGhre_CourseSnapInput : Ghre_CourseSnapBase
{
}
/// <summary>
/// Ghre_CourseSnap (Dto.EditInput)
/// </summary>
public class EditGhre_CourseSnapInput : Ghre_CourseSnapBase
{
}

@ -15,16 +15,15 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 课件 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseWareInput : Ghre_CourseWareBase
{
public List<long> CourseIds2 { get; set; }
/// <summary>
/// 课件 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseWareInput : Ghre_CourseWareBase
{
public List<long> CourseIds2 { get; set; }
public List<InsertGhre_CourseWareAttachmentInput> Attachments { get; set; }
}
public List<InsertGhre_CourseWareAttachmentInput> Attachments { get; set; }
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 课件附件 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseWareAttachmentInput : Ghre_CourseWareAttachmentBase
{
}
/// <summary>
/// 课件附件 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseWareAttachmentInput : Ghre_CourseWareAttachmentBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 学分记录 (Dto.EditInput)
/// </summary>
public class EditGhre_CreditPointInput : Ghre_CreditPointBase
{
}
/// <summary>
/// 学分记录 (Dto.EditInput)
/// </summary>
public class EditGhre_CreditPointInput : Ghre_CreditPointBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 考试 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamInput : Ghre_ExamBase
{
}
/// <summary>
/// 考试 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamInput : Ghre_ExamBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 考试通知记录 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamMessageLogInput : Ghre_ExamMessageLogBase
{
}
/// <summary>
/// 考试通知记录 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamMessageLogInput : Ghre_ExamMessageLogBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 试卷 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperInput : Ghre_ExamPaperBase
{
}
/// <summary>
/// 试卷 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperInput : Ghre_ExamPaperBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 试卷配置 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperConfigInput : Ghre_ExamPaperConfigBase
{
}
/// <summary>
/// 试卷配置 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperConfigInput : Ghre_ExamPaperConfigBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 试卷题目 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperQuestionInput : Ghre_ExamPaperQuestionBase
{
}
/// <summary>
/// 试卷题目 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamPaperQuestionInput : Ghre_ExamPaperQuestionBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 考试记录 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordInput : Ghre_ExamRecordBase
{
}
/// <summary>
/// 考试记录 (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordInput : Ghre_ExamRecordBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_ExamRecordAnswer (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordAnswerInput : Ghre_ExamRecordAnswerBase
{
}
/// <summary>
/// Ghre_ExamRecordAnswer (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordAnswerInput : Ghre_ExamRecordAnswerBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_ExamRecordDetail (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordDetailInput : Ghre_ExamRecordDetailBase
{
}
/// <summary>
/// Ghre_ExamRecordDetail (Dto.EditInput)
/// </summary>
public class EditGhre_ExamRecordDetailInput : Ghre_ExamRecordDetailBase
{
}

@ -15,13 +15,12 @@
*
*/
namespace Tiobon.Core.Model.Models
{
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_ExamStaff (Dto.EditInput)
/// </summary>
public class EditGhre_ExamStaffInput : Ghre_ExamStaffBase
{
}
/// <summary>
/// Ghre_ExamStaff (Dto.EditInput)
/// </summary>
public class EditGhre_ExamStaffInput : Ghre_ExamStaffBase
{
}

@ -15,19 +15,18 @@
*
*/
namespace Tiobon.Core.Model.Models
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 题目 (Dto.EditInput)
/// </summary>
public class EditGhre_QuestionInput : Ghre_QuestionBase
{
/// <summary>
/// 题目 (Dto.EditInput)
/// 答案
/// </summary>
public class EditGhre_QuestionInput : Ghre_QuestionBase
{
/// <summary>
/// 答案
/// </summary>
public List<InsertGhre_QuestionAnswerInput> Answers { get; set; }
}
public List<InsertGhre_QuestionAnswerInput> Answers { get; set; }
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save