代码格式整理

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> /// </summary>
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="Keywords"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("GetSelect/{type}")] [HttpPost, Route("GetSelect/{type}")]
public async Task<ServiceResult<CommonSelect>> GetSelectAsync(string type, string Keywords) public async Task<ServiceResult<CommonSelect>> GetSelectAsync(string type, string Keywords)

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

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

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

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

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

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

@ -1,21 +1,20 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Tiobon.Core.Model.Models; 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<Ghra_Grade> Ghra_Grade { get; set; }
public virtual DbSet<Ghre_Attachment> Ghre_Attachment { get; set; } public virtual DbSet<Ghre_Attachment> Ghre_Attachment { get; set; }
public virtual DbSet<Ghre_ExamRecordDetail> Ghre_ExamRecordDetail { get; set; } public virtual DbSet<Ghre_ExamRecordDetail> Ghre_ExamRecordDetail { get; set; }
public virtual DbSet<Ghre_ExamRecordAnswer> Ghre_ExamRecordAnswer { 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.Linq.Expressions;
using System.Threading.Tasks; 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); TModel GetById(object id);
Task<TModel> GetByIdAsync(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 DoUpdateAsync(TModel model);
Task<TModel> GetAsync(Expression<Func<TModel, bool>> express); Task<TModel> GetAsync(Expression<Func<TModel, bool>> express);
}
} }

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

@ -1,291 +1,287 @@
using Tiobon.Core.Common; using Castle.DynamicProxy;
using Tiobon.Core.Common.LogHelper;
using Tiobon.Core.Hubs;
using Castle.DynamicProxy;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using Newtonsoft.Json; using Newtonsoft.Json;
using StackExchange.Profiling; using StackExchange.Profiling;
using System;
using System.Linq;
using System.Reflection; 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> /// <summary>
/// 拦截器TiobonLogAOP 继承IInterceptor接口 /// 实例化IInterceptor唯一方法
/// </summary> /// </summary>
public class TiobonLogAOP : IInterceptor /// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{ {
private readonly IHubContext<ChatHub> _hubContext; string UserName = _accessor.HttpContext?.User?.Identity?.Name;
private readonly IHttpContextAccessor _accessor; string json;
try
public TiobonLogAOP(IHubContext<ChatHub> hubContext, IHttpContextAccessor accessor)
{ {
_hubContext = hubContext; json = JsonConvert.SerializeObject(invocation.Arguments);
_accessor = accessor; }
catch (Exception ex)
{
json = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
} }
DateTime startTime = DateTime.Now;
/// <summary> AOPLogInfo apiLogAopInfo = new AOPLogInfo
/// 实例化IInterceptor唯一方法
/// </summary>
/// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{ {
string UserName = _accessor.HttpContext?.User?.Identity?.Name; RequestTime = startTime.ToString("yyyy-MM-dd hh:mm:ss fff"),
string json; OpUserName = UserName,
try RequestMethodName = invocation.Method.Name,
{ RequestParamsName = string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray()),
json = JsonConvert.SerializeObject(invocation.Arguments); ResponseJsonData = json
} };
catch (Exception ex)
{
json = "无法序列化,可能是兰姆达表达式等原因造成,按照框架优化代码" + ex.ToString();
}
DateTime startTime = DateTime.Now; //测试异常记录
AOPLogInfo apiLogAopInfo = new AOPLogInfo //Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff"));
{
RequestTime = startTime.ToString("yyyy-MM-dd hh:mm:ss fff"), //记录被拦截方法信息的日志信息
OpUserName = UserName, //var dataIntercept = "" +
RequestMethodName = invocation.Method.Name, // $"【当前操作用户】:{ UserName} \r\n" +
RequestParamsName = string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray()), // $"【当前执行方法】:{ invocation.Method.Name} \r\n" +
ResponseJsonData = json // $"【携带的参数有】: {string.Join(", ", invocation.Arguments.Select(a => (a ?? "").ToString()).ToArray())} \r\n";
};
//测试异常记录 try
//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff")); {
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}() -> "); #region 方案一
//在被拦截的方法执行完毕后 继续执行当前方法,注意是被拦截的是异步的
invocation.Proceed();
// 异步获取异常,先执行 //Wait task execution and modify return value
if (IsAsyncMethod(invocation.Method)) if (invocation.Method.ReturnType == typeof(Task))
{ {
#region 方案一 invocation.ReturnValue = InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(
(Task) invocation.ReturnValue,
//Wait task execution and modify return value async () => await SuccessAction(invocation, apiLogAopInfo, startTime), /*成功时执行*/
if (invocation.Method.ReturnType == typeof(Task)) ex =>
{ {
invocation.ReturnValue = InternalAsyncHelper.AwaitTaskWithPostActionAndFinally( LogEx(ex, apiLogAopInfo);
(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
} }
//Task<TResult>
else else
{ {
// 同步1 invocation.ReturnValue = InternalAsyncHelper.CallAwaitTaskWithPostActionAndFinallyAndGetResult(
string jsonResult; invocation.Method.ReturnType.GenericTypeArguments[0],
try invocation.ReturnValue,
{ //async () => await SuccessAction(invocation, dataIntercept),/*成功时执行*/
jsonResult = JsonConvert.SerializeObject(invocation.ReturnValue); async (o) => await SuccessAction(invocation, apiLogAopInfo, startTime, o), /*成功时执行*/
} ex =>
catch (Exception ex) {
{ LogEx(ex, apiLogAopInfo);
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)});
});
} }
}
catch (Exception ex) // 同步2
{
LogEx(ex, apiLogAopInfo);
throw;
}
if (AppSettings.app(new string[] {"Middleware", "SignalRSendLog", "Enabled"}).ObjToBool()) #endregion
{
_hubContext.Clients.All.SendAsync("ReceiveUpdate", LogLock.GetLogData()).Wait();
}
}
private async Task SuccessAction(IInvocation invocation, AOPLogInfo apiLogAopInfo, DateTime startTime, object o = null)
{ // 如果方案一不行,试试这个方案
//invocation.ReturnValue = o; //#region 方案二
//var type = invocation.Method.ReturnType;
//if (typeof(Task).IsAssignableFrom(type)) //var type = invocation.Method.ReturnType;
//{ //var resultProperty = type.GetProperty("Result");
// //var resultProperty = type.GetProperty("Result"); //DateTime endTime = DateTime.Now;
// //类型错误 都可以不要invocation参数,直接将o系列化保存到日记中 //string ResponseTime = (endTime - startTime).Milliseconds.ToString();
// dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(invocation.ReturnValue)}"); //apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff");
//} //apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms";
//else //apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue));
//{
// dataIntercept += ($"【执行完成结果】:{invocation.ReturnValue}"); ////dataIntercept += ($"【响应时间】:{ResponseTime}ms\r\n");
//} ////dataIntercept += ($"【执行完成时间】:{endTime.ToString("yyyy-MM-dd hh:mm:ss fff")}\r\n");
DateTime endTime = DateTime.Now; ////dataIntercept += ($"【执行完成结果】:{JsonConvert.SerializeObject(resultProperty.GetValue(invocation.ReturnValue))}\r\n");
string ResponseTime = (endTime - startTime).Milliseconds.ToString();
apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff"); //Parallel.For(0, 1, e =>
apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms"; //{
apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(o); // //LogLock.OutLogAOP("AOPLog", new string[] { dataIntercept });
// LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString() + " - ResponseJsonDataType:" + type, JsonConvert.SerializeObject(apiLogAopInfo) });
//});
await Task.Run(() =>
//#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 => 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, LogLock.OutLogAOP("AOPLog", _accessor.HttpContext?.TraceIdentifier,
new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)}); new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)});
}); });
}); }
} }
catch (Exception ex) // 同步2
private void LogEx(Exception ex, AOPLogInfo dataIntercept)
{ {
if (ex != null) LogEx(ex, apiLogAopInfo);
{ throw;
//执行的 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)});
});
}
} }
if (AppSettings.app(new string[] {"Middleware", "SignalRSendLog", "Enabled"}).ObjToBool())
public static bool IsAsyncMethod(MethodInfo method)
{ {
return ( _hubContext.Clients.All.SendAsync("ReceiveUpdate", LogLock.GetLogData()).Wait();
method.ReturnType == typeof(Task) ||
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>))
);
} }
} }
private async Task SuccessAction(IInvocation invocation, AOPLogInfo apiLogAopInfo, DateTime startTime, object o = null)
internal static class InternalAsyncHelper
{ {
public static async Task AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func<Task> postAction, Action<Exception> finalAction) //invocation.ReturnValue = o;
{ //var type = invocation.Method.ReturnType;
Exception exception = null; //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; //LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) });
await postAction(); LogLock.OutLogAOP("AOPLog", _accessor.HttpContext?.TraceIdentifier,
} new string[] {apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo)});
catch (Exception ex) });
});
}
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; ExMessage = ex.Message,
} InnerException = "InnerException-内部异常:\r\n" + (ex.InnerException == null ? "" : ex.InnerException.InnerException.ToString()) +
finally ("\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; await actualReturnValue;
try await postAction();
{ }
var result = await actualReturnValue; catch (Exception ex)
await postAction(result); {
return result; exception = ex;
}
catch (Exception ex)
{
exception = ex;
throw;
}
finally
{
finalAction(exception);
}
} }
finally
{
finalAction(exception);
}
}
public static object CallAwaitTaskWithPostActionAndFinallyAndGetResult(Type taskReturnType, object actualReturnValue, public static async Task<T> AwaitTaskWithPostActionAndFinallyAndGetResult<T>(Task<T> actualReturnValue, Func<object, Task> postAction,
Func<object, Task> action, Action<Exception> finalAction) Action<Exception> finalAction)
{
Exception exception = null;
try
{
var result = await actualReturnValue;
await postAction(result);
return result;
}
catch (Exception ex)
{ {
return typeof(InternalAsyncHelper) exception = ex;
.GetMethod("AwaitTaskWithPostActionAndFinallyAndGetResult", BindingFlags.Public | BindingFlags.Static) throw;
.MakeGenericMethod(taskReturnType)
.Invoke(null, new object[] {actualReturnValue, action, finalAction});
} }
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 Microsoft.Extensions.Logging;
using System;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using Tiobon.Core.Common;
using Tiobon.Core.Common.DB; using Tiobon.Core.Common.DB;
using Tiobon.Core.Repository.UnitOfWorks; 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> /// <summary>
/// 事务拦截器TiobonTranAOP 继承IInterceptor接口 /// 实例化IInterceptor唯一方法
/// </summary> /// </summary>
public class TiobonTranAOP : IInterceptor /// <param name="invocation">包含被拦截方法的信息</param>
public void Intercept(IInvocation invocation)
{ {
private readonly ILogger<TiobonTranAOP> _logger; var method = invocation.MethodInvocationTarget ?? invocation.Method;
private readonly IUnitOfWorkManage _unitOfWorkManage; //对当前方法的特性验证
//如果需要验证
public TiobonTranAOP(IUnitOfWorkManage unitOfWorkManage, ILogger<TiobonTranAOP> logger) if (method.GetCustomAttribute<UseTranAttribute>(true) is { } uta)
{ {
_unitOfWorkManage = unitOfWorkManage; try
_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 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; Task.WaitAll(result as Task);
if (result is 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;
} }
} }
else
private void Before(MethodInfo method, Propagation propagation)
{ {
switch (propagation) invocation.Proceed(); //直接执行被拦截方法
{ }
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],当前不存在事务");
}
break; private void Before(MethodInfo method, Propagation propagation)
case Propagation.Nested: {
switch (propagation)
{
case Propagation.Required:
if (_unitOfWorkManage.TranCount <= 0)
{
_logger.LogDebug($"Begin Transaction"); _logger.LogDebug($"Begin Transaction");
Console.WriteLine($"Begin Transaction"); Console.WriteLine($"Begin Transaction");
_unitOfWorkManage.BeginTran(method); _unitOfWorkManage.BeginTran(method);
break; }
default:
throw new ArgumentOutOfRangeException(nameof(propagation), propagation, null);
}
}
private void After(MethodInfo method) break;
{ case Propagation.Mandatory:
_unitOfWorkManage.CommitTran(method); if (_unitOfWorkManage.TranCount <= 0)
} {
throw new Exception("事务传播机制为:[Mandatory],当前不存在事务");
}
private void AfterException(MethodInfo method) break;
{ case Propagation.Nested:
_unitOfWorkManage.RollbackTran(method); _logger.LogDebug($"Begin Transaction");
Console.WriteLine($"Begin Transaction");
_unitOfWorkManage.BeginTran(method);
break;
default:
throw new ArgumentOutOfRangeException(nameof(propagation), propagation, null);
} }
}
/// <summary> private void After(MethodInfo method)
/// 获取变量的默认值 {
/// </summary> _unitOfWorkManage.CommitTran(method);
/// <param name="type"></param> }
/// <returns></returns>
public object GetDefaultValue(Type type)
{
return type.IsValueType ? Activator.CreateInstance(type) : null;
}
private async Task SuccessAction(IInvocation invocation) private void AfterException(MethodInfo method)
{ {
await Task.Run(() => _unitOfWorkManage.RollbackTran(method);
{ }
//...
});
}
public static bool IsAsyncMethod(MethodInfo method) /// <summary>
{ /// 获取变量的默认值
return ( /// </summary>
method.ReturnType == typeof(Task) || /// <param name="type"></param>
(method.ReturnType.IsGenericType && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>)) /// <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 Castle.DynamicProxy;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using System;
namespace Tiobon.Core.AOP namespace Tiobon.Core.AOP;
/// <summary>
/// 面向切面的缓存使用
/// </summary>
public class TiobonUserAuditAOP : CacheAOPbase
{ {
/// <summary> private readonly IHttpContextAccessor _accessor;
/// 面向切面的缓存使用
/// </summary> public TiobonUserAuditAOP(IHttpContextAccessor accessor)
public class TiobonUserAuditAOP : CacheAOPbase
{ {
private readonly IHttpContextAccessor _accessor; _accessor = accessor;
}
public TiobonUserAuditAOP(IHttpContextAccessor accessor) public override void Intercept(IInvocation invocation)
{ {
_accessor = accessor; 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.Arguments.Length == 1)
if (invocation.Method.Name?.ToLower() == "add" || invocation.Method.Name?.ToLower() == "update")
{ {
if (invocation.Arguments[0].GetType().IsClass)
if (invocation.Arguments.Length == 1)
{ {
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]; if (getType.GetProperty("CreateBy") != null)
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)
{ {
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 Newtonsoft.Json;
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions; 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> var typeName = invocation.TargetType.Name;
/// AOP的拦截方法 var methodName = invocation.Method.Name;
/// </summary> var methodArguments = invocation.Arguments.Select(GetArgumentValue).Take(3).ToList();//获取参数列表,最多三个
/// <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(':');
}
/// <summary> string key = $"{typeName}:{methodName}:";
/// object 转 string foreach (var param in methodArguments)
/// </summary>
/// <param name="arg"></param>
/// <returns></returns>
protected static string GetArgumentValue(object arg)
{ {
if (arg is DateTime) key = $"{key}{param}:";
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;
} }
private static string Resolve(Expression expression) return key.TrimEnd(':');
{ }
ExpressionContext expContext = new ExpressionContext();
expContext.Resolve(expression, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
pars.ForEach(s => /// <summary>
{ /// object 转 string
value = value.Replace(s.ParameterName, s.Value.ObjToString()); /// </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 MD5Helper.MD5Encrypt16(JsonConvert.SerializeObject(arg));
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 $"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; value = value.Replace(s.ParameterName, s.Value.ObjToString());
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) return value;
}
private static string GetOperator(ExpressionType expressiontype)
{
switch (expressiontype)
{ {
var MethodCall = expression as MethodCallExpression; case ExpressionType.And:
var MethodName = MethodCall.Method.Name; return "and";
switch (MethodName) case ExpressionType.AndAlso:
{ return "and";
case "Contains": case ExpressionType.Or:
if (MethodCall.Object != null) return "or";
return Like(MethodCall); case ExpressionType.OrElse:
return In(MethodCall, value); return "or";
case "Count": case ExpressionType.Equal:
return Len(MethodCall, value, expressiontype.Value); return "=";
case "LongCount": case ExpressionType.NotEqual:
return Len(MethodCall, value, expressiontype.Value); return "<>";
default: case ExpressionType.LessThan:
throw new Exception($"不支持{MethodName}方法的查找!"); 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; case "Contains":
var Argument2 = expression.Arguments[1] as MemberExpression; if (MethodCall.Object != null)
var Field_Array = Argument1.Value.GetType().GetFields().First(); return Like(MethodCall);
object[] Array = Field_Array.GetValue(Argument1.Value) as object[]; return In(MethodCall, value);
List<string> SetInPara = new List<string>(); case "Count":
for (int i = 0; i < Array.Length; i++) return Len(MethodCall, value, expressiontype.Value);
{ case "LongCount":
string Name_para = "InParameter" + i; return Len(MethodCall, value, expressiontype.Value);
string Value = Array[i].ToString(); default:
SetInPara.Add(Value); throw new Exception($"不支持{MethodName}方法的查找!");
}
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]; private static string In(MethodCallExpression expression, object isTrue)
LambdaExpression lambda = Expression.Lambda(Temp); {
Delegate fn = lambda.Compile(); var Argument1 = (expression.Arguments[0] as MemberExpression).Expression as ConstantExpression;
var tempValue = Expression.Constant(fn.DynamicInvoke(null), Temp.Type); var Argument2 = expression.Arguments[1] as MemberExpression;
string Value = $"%{tempValue}%"; var Field_Array = Argument1.Value.GetType().GetFields().First();
string Name = (expression.Object as MemberExpression).Member.Name; object[] Array = Field_Array.GetValue(Argument1.Value) as object[];
string Result = $"{Name} like {Value}"; List<string> SetInPara = new List<string>();
return Result; 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 @@
 namespace Tiobon.Core.Extensions.Apollo;
using System.Collections.Generic;
/// <summary>
namespace Tiobon.Core.Extensions.Apollo /// Apollo配置项
/// </summary>
public class ApolloOptions
{ {
/// <summary> public bool Enable { get; set; }
/// Apollo配置项 public List<ChildNamespace> Namespaces { get; set; }
/// </summary>
public class ApolloOptions
{
public bool Enable { get; set; }
public List<ChildNamespace> Namespaces { get; set; }
public class ChildNamespace public class ChildNamespace
{ {
/// <summary> /// <summary>
/// 命名空间名字 /// 命名空间名字
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// 数据格式 Json/Yml/Yaml等 /// 数据格式 Json/Yml/Yaml等
/// </summary> /// </summary>
public string Format { get; set; } public string Format { get; set; }
}
} }
} }

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

@ -1,12 +1,11 @@
using Tiobon.Core.IServices.BASE; using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghra_Job(自定义服务接口) /// Ghra_Job(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_JobServices :IBaseServices<Ghra_Job, Ghra_JobDto, InsertGhra_JobInput, EditGhra_JobInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghra_StaffLicence(自定义服务接口) /// Ghra_StaffLicence(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_StaffLicenceServices :IBaseServices<Ghra_StaffLicence, Ghra_StaffLicenceDto, InsertGhra_StaffLicenceInput, EditGhra_StaffLicenceInput> 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;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghra_Staff(自定义服务接口) /// Ghra_Staff(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_StaffServices :IBaseServices<Ghra_Staff, Ghra_StaffDto, InsertGhra_StaffInput, EditGhra_StaffInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghra_StaffTraining(自定义服务接口) /// Ghra_StaffTraining(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_StaffTrainingServices :IBaseServices<Ghra_StaffTraining, Ghra_StaffTrainingDto, InsertGhra_StaffTrainingInput, EditGhra_StaffTrainingInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghra_Title(自定义服务接口) /// Ghra_Title(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_TitleServices :IBaseServices<Ghra_Title, Ghra_TitleDto, InsertGhra_TitleInput, EditGhra_TitleInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 厂区(自定义服务接口) /// 厂区(自定义服务接口)
/// </summary> /// </summary>
public interface IGhra_ZoneServices :IBaseServices<Ghra_Zone, Ghra_ZoneDto, InsertGhra_ZoneInput, EditGhra_ZoneInput> 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.Models;
using Tiobon.Core.Model.ViewModels; using Tiobon.Core.Model.ViewModels;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 附件(自定义服务接口) /// 附件(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_AttachmentServices :IBaseServices<Ghre_Attachment, Ghre_AttachmentDto, InsertGhre_AttachmentInput, EditGhre_AttachmentInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 培训证书规则(自定义服务接口) /// 培训证书规则(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CertificateRuleServices :IBaseServices<Ghre_CertificateRule, Ghre_CertificateRuleDto, InsertGhre_CertificateRuleInput, EditGhre_CertificateRuleInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 培训记录(自定义服务接口) /// 培训记录(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CertificateServices :IBaseServices<Ghre_Certificate, Ghre_CertificateDto, InsertGhre_CertificateInput, EditGhre_CertificateInput> 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;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 参数配置(自定义服务接口) /// 参数配置(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ConfigServices :IBaseServices<Ghre_Config, Ghre_ConfigDto, InsertGhre_ConfigInput, EditGhre_ConfigInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 课程分类(自定义服务接口) /// 课程分类(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CourseClassServices :IBaseServices<Ghre_CourseClass, Ghre_CourseClassDto, InsertGhre_CourseClassInput, EditGhre_CourseClassInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 课程场景(自定义服务接口) /// 课程场景(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CourseSceneServices :IBaseServices<Ghre_CourseScene, Ghre_CourseSceneDto, InsertGhre_CourseSceneInput, EditGhre_CourseSceneInput> 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;
using Tiobon.Core.Model.Models; 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<int>> QueryDeptID(int StaffID);
Task<ServiceResult<CommonSelect>> QueryTeacher(long? linkId); Task<ServiceResult<CommonSelect>> QueryTeacher(long? linkId);
Task<ServiceResult> UpdateStatus(long[] ids, string status); Task<ServiceResult> UpdateStatus(long[] ids, string status);
Task<ServiceResult<CommonSelect>> GetSelectAsync(long? linkId, string keyWords); 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghre_CourseSnap(自定义服务接口) /// Ghre_CourseSnap(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CourseSnapServices :IBaseServices<Ghre_CourseSnap, Ghre_CourseSnapDto, InsertGhre_CourseSnapInput, EditGhre_CourseSnapInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 课件附件(自定义服务接口) /// 课件附件(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CourseWareAttachmentServices :IBaseServices<Ghre_CourseWareAttachment, Ghre_CourseWareAttachmentDto, InsertGhre_CourseWareAttachmentInput, EditGhre_CourseWareAttachmentInput> 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;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 课件(自定义服务接口) /// 课件(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_CourseWareServices :IBaseServices<Ghre_CourseWare, Ghre_CourseWareDto, InsertGhre_CourseWareInput, EditGhre_CourseWareInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 考试通知记录(自定义服务接口) /// 考试通知记录(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ExamMessageLogServices :IBaseServices<Ghre_ExamMessageLog, Ghre_ExamMessageLogDto, InsertGhre_ExamMessageLogInput, EditGhre_ExamMessageLogInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 试卷配置(自定义服务接口) /// 试卷配置(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ExamPaperConfigServices :IBaseServices<Ghre_ExamPaperConfig, Ghre_ExamPaperConfigDto, InsertGhre_ExamPaperConfigInput, EditGhre_ExamPaperConfigInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 试卷题目(自定义服务接口) /// 试卷题目(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ExamPaperQuestionServices :IBaseServices<Ghre_ExamPaperQuestion, Ghre_ExamPaperQuestionDto, InsertGhre_ExamPaperQuestionInput, EditGhre_ExamPaperQuestionInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghre_ExamRecordDetail(自定义服务接口) /// Ghre_ExamRecordDetail(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ExamRecordDetailServices :IBaseServices<Ghre_ExamRecordDetail, Ghre_ExamRecordDetailDto, InsertGhre_ExamRecordDetailInput, EditGhre_ExamRecordDetailInput> 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;
using Tiobon.Core.Model.Models; 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> Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body);
/// 考试记录(自定义服务接口)
/// </summary>
public interface IGhre_ExamRecordServices : IBaseServices<Ghre_ExamRecord, Ghre_ExamRecordDto, InsertGhre_ExamRecordInput, EditGhre_ExamRecordInput>
{
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;
using Tiobon.Core.Model.Models; 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> Task<dynamic> GetModuleInfo(ModuleParam param);
/// 考试(自定义服务接口) Task<dynamic> QueryList(QueryBody body, string status);
/// </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<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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghre_ExamStaff(自定义服务接口) /// Ghre_ExamStaff(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_ExamStaffServices :IBaseServices<Ghre_ExamStaff, Ghre_ExamStaffDto, InsertGhre_ExamStaffInput, EditGhre_ExamStaffInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 题目答案(自定义服务接口) /// 题目答案(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_QuestionAnswerServices :IBaseServices<Ghre_QuestionAnswer, Ghre_QuestionAnswerDto, InsertGhre_QuestionAnswerInput, EditGhre_QuestionAnswerInput> 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;
using Tiobon.Core.Model.Models; 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> Task<ServiceResult<FromGhre_QuestionInput>> QueryFrom(long Id);
/// 题目(自定义服务接口) Task<ServiceResult> InsertFrom(FromGhre_QuestionPageData insertModel);
/// </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> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 必选修查询(自定义服务接口) /// 必选修查询(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_RequiredCourseServices :IBaseServices<Ghre_RequiredCourse, Ghre_RequiredCourseDto, InsertGhre_RequiredCourseInput, EditGhre_RequiredCourseInput> 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.Models;
using Tiobon.Core.Model.ViewModels.Extend; using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 培训记录(自定义服务接口) /// 培训记录(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_StudyRecordServices :IBaseServices<Ghre_StudyRecord, Ghre_StudyRecordDto, InsertGhre_StudyRecordInput, EditGhre_StudyRecordInput> public interface IGhre_StudyRecordServices :IBaseServices<Ghre_StudyRecord, Ghre_StudyRecordDto, InsertGhre_StudyRecordInput, EditGhre_StudyRecordInput>
{ {
Task<ServiceResult<CoursePublicSearch>> QueryESSSearchFields(QueryBody body); Task<ServiceResult<CoursePublicSearch>> QueryESSSearchFields(QueryBody body);
Task<ServicePageResult<Ghre_StudyRecordESS>> QueryESS(QueryBody filter, string condition, bool? IsEnable = true); 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 必选修规则结果(自定义服务接口) /// 必选修规则结果(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_StudyRuleResultServices :IBaseServices<Ghre_StudyRuleResult, Ghre_StudyRuleResultDto, InsertGhre_StudyRuleResultInput, EditGhre_StudyRuleResultInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 必选修规则(自定义服务接口) /// 必选修规则(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_StudyRuleServices :IBaseServices<Ghre_StudyRule, Ghre_StudyRuleDto, InsertGhre_StudyRuleInput, EditGhre_StudyRuleInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 必选修规则人员(自定义服务接口) /// 必选修规则人员(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_StudyRuleStaffServices :IBaseServices<Ghre_StudyRuleStaff, Ghre_StudyRuleStaffDto, InsertGhre_StudyRuleStaffInput, EditGhre_StudyRuleStaffInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghre_TeacherAttachment(自定义服务接口) /// Ghre_TeacherAttachment(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_TeacherAttachmentServices :IBaseServices<Ghre_TeacherAttachment, Ghre_TeacherAttachmentDto, InsertGhre_TeacherAttachmentInput, EditGhre_TeacherAttachmentInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 培训讲师异动附件(自定义服务接口) /// 培训讲师异动附件(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_TeacherChangeAttachmentServices :IBaseServices<Ghre_TeacherChangeAttachment, Ghre_TeacherChangeAttachmentDto, InsertGhre_TeacherChangeAttachmentInput, EditGhre_TeacherChangeAttachmentInput> 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;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 培训讲师异动(自定义服务接口) /// 培训讲师异动(自定义服务接口)
/// </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;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghre_Teacher(自定义服务接口) /// Ghre_Teacher(自定义服务接口)
/// </summary> /// </summary>
public interface IGhre_TeacherServices :IBaseServices<Ghre_Teacher, Ghre_TeacherDto, InsertGhre_TeacherInput, EditGhre_TeacherInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 人力需求维护(自定义服务接口) /// 人力需求维护(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_HumanRequestServices :IBaseServices<Ghrh_HumanRequest, Ghrh_HumanRequestDto, InsertGhrh_HumanRequestInput, EditGhrh_HumanRequestInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 教育背景(自定义服务接口) /// 教育背景(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeEduBGServices :IBaseServices<Ghrh_ResumeEduBG, Ghrh_ResumeEduBGDto, InsertGhrh_ResumeEduBGInput, EditGhrh_ResumeEduBGInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 家庭关系(自定义服务接口) /// 家庭关系(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeHomeServices :IBaseServices<Ghrh_ResumeHome, Ghrh_ResumeHomeDto, InsertGhrh_ResumeHomeInput, EditGhrh_ResumeHomeInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历信息栏位(自定义服务接口) /// 简历信息栏位(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeInfoColumnServices :IBaseServices<Ghrh_ResumeInfoColumn, Ghrh_ResumeInfoColumnDto, InsertGhrh_ResumeInfoColumnInput, EditGhrh_ResumeInfoColumnInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历组别(自定义服务接口) /// 简历组别(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeInfoGroupServices :IBaseServices<Ghrh_ResumeInfoGroup, Ghrh_ResumeInfoGroupDto, InsertGhrh_ResumeInfoGroupInput, EditGhrh_ResumeInfoGroupInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 证件(自定义服务接口) /// 证件(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeLicenceServices :IBaseServices<Ghrh_ResumeLicence, Ghrh_ResumeLicenceDto, InsertGhrh_ResumeLicenceInput, EditGhrh_ResumeLicenceInput> 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.Models;
using Tiobon.Core.Model.ViewModels.Extend; 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> ServiceResult<List<ResumeViewTab>> QueryViewTab();
/// 个人简历(自定义服务接口)
/// </summary>
public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
{
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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历声明(自定义服务接口) /// 简历声明(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeStatementServices :IBaseServices<Ghrh_ResumeStatement, Ghrh_ResumeStatementDto, InsertGhrh_ResumeStatementInput, EditGhrh_ResumeStatementInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历标签(自定义服务接口) /// 简历标签(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeTagServices :IBaseServices<Ghrh_ResumeTag, Ghrh_ResumeTagDto, InsertGhrh_ResumeTagInput, EditGhrh_ResumeTagInput> 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.Models;
using Tiobon.Core.Model.ViewModels.Extend; using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历模板(自定义服务接口) /// 简历模板(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeTemplateServices :IBaseServices<Ghrh_ResumeTemplate, Ghrh_ResumeTemplateDto, InsertGhrh_ResumeTemplateInput, EditGhrh_ResumeTemplateInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 简历培训记录(自定义服务接口) /// 简历培训记录(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeTrainingServices :IBaseServices<Ghrh_ResumeTraining, Ghrh_ResumeTrainingDto, InsertGhrh_ResumeTrainingInput, EditGhrh_ResumeTrainingInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 工作经历(自定义服务接口) /// 工作经历(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_ResumeWorkExpServices :IBaseServices<Ghrh_ResumeWorkExp, Ghrh_ResumeWorkExpDto, InsertGhrh_ResumeWorkExpInput, EditGhrh_ResumeWorkExpInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 声明(自定义服务接口) /// 声明(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_StatementServices :IBaseServices<Ghrh_Statement, Ghrh_StatementDto, InsertGhrh_StatementInput, EditGhrh_StatementInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 年度人力配置(自定义服务接口) /// 年度人力配置(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrh_YearHumanSettingsServices :IBaseServices<Ghrh_YearHumanSettings, Ghrh_YearHumanSettingsDto, InsertGhrh_YearHumanSettingsInput, EditGhrh_YearHumanSettingsInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghro_Dept(自定义服务接口) /// Ghro_Dept(自定义服务接口)
/// </summary> /// </summary>
public interface IGhro_DeptServices :IBaseServices<Ghro_Dept, Ghro_DeptDto, InsertGhro_DeptInput, EditGhro_DeptInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghrs_Attachment(自定义服务接口) /// Ghrs_Attachment(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrs_AttachmentServices :IBaseServices<Ghrs_Attachment, Ghrs_AttachmentDto, InsertGhrs_AttachmentInput, EditGhrs_AttachmentInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghrs_DataRoleDetail(自定义服务接口) /// Ghrs_DataRoleDetail(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrs_DataRoleDetailServices :IBaseServices<Ghrs_DataRoleDetail, Ghrs_DataRoleDetailDto, InsertGhrs_DataRoleDetailInput, EditGhrs_DataRoleDetailInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghrs_Menu(自定义服务接口) /// Ghrs_Menu(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrs_MenuServices :IBaseServices<Ghrs_Menu, Ghrs_MenuDto, InsertGhrs_MenuInput, EditGhrs_MenuInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// Ghrs_ParaDetail(自定义服务接口) /// Ghrs_ParaDetail(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrs_ParaDetailServices :IBaseServices<Ghrs_ParaDetail, Ghrs_ParaDetailDto, InsertGhrs_ParaDetailInput, EditGhrs_ParaDetailInput> 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.IServices.BASE;
using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices namespace Tiobon.Core.IServices;
{
/// <summary> /// <summary>
/// 系统用户(自定义服务接口) /// 系统用户(自定义服务接口)
/// </summary> /// </summary>
public interface IGhrs_UserServices :IBaseServices<Ghrs_User, Ghrs_UserDto, InsertGhrs_UserInput, EditGhrs_UserInput> 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> /// <summary>
/// 年级 (Dto.EditInput) /// 年级 (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhra_GradeInput : Ghra_GradeBase public class EditGhra_GradeInput : Ghra_GradeBase
{ {
}
} }

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

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

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

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

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

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

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

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

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

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

@ -15,19 +15,18 @@
* *
*/ */
namespace Tiobon.Core.Model.Models namespace Tiobon.Core.Model.Models;
{
/// <summary> /// <summary>
/// 课程 (Dto.EditInput) /// 课程 (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhre_CourseInput : Ghre_CourseBase public class EditGhre_CourseInput : Ghre_CourseBase
{ {
public List<long> ExamPaperIds { get; set; } public List<long> ExamPaperIds { get; set; }
public List<long> CourseClassIds { 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> /// <summary>
/// 课程分类 (Dto.EditInput) /// 课程分类 (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhre_CourseClassInput : Ghre_CourseClassBase public class EditGhre_CourseClassInput : Ghre_CourseClassBase
{ {
}
} }

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

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

@ -15,16 +15,15 @@
* *
*/ */
namespace Tiobon.Core.Model.Models namespace Tiobon.Core.Model.Models;
{
/// <summary> /// <summary>
/// 课件 (Dto.EditInput) /// 课件 (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhre_CourseWareInput : Ghre_CourseWareBase public class EditGhre_CourseWareInput : Ghre_CourseWareBase
{ {
public List<long> CourseIds2 { get; set; } 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> /// <summary>
/// 课件附件 (Dto.EditInput) /// 课件附件 (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhre_CourseWareAttachmentInput : Ghre_CourseWareAttachmentBase public class EditGhre_CourseWareAttachmentInput : Ghre_CourseWareAttachmentBase
{ {
}
} }

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

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

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

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

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

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

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

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

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

@ -15,13 +15,12 @@
* *
*/ */
namespace Tiobon.Core.Model.Models namespace Tiobon.Core.Model.Models;
{
/// <summary> /// <summary>
/// Ghre_ExamStaff (Dto.EditInput) /// Ghre_ExamStaff (Dto.EditInput)
/// </summary> /// </summary>
public class EditGhre_ExamStaffInput : Ghre_ExamStaffBase 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> /// <summary>
/// 题目 (Dto.EditInput) /// 答案
/// </summary> /// </summary>
public class EditGhre_QuestionInput : Ghre_QuestionBase public List<InsertGhre_QuestionAnswerInput> Answers { get; set; }
{
/// <summary>
/// 答案
/// </summary>
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