审计添加
parent
e4590c3bdf
commit
5b422f575e
|
@ -509,6 +509,24 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationAddOrEdit">
|
||||
<summary> SystemAnonymizationAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||
<summary> SystemNoticeView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery">
|
||||
<summary>SystemNoticeQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.NoticeContent">
|
||||
<summary> NoticeContent</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.FileName">
|
||||
<summary> FileName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.Path">
|
||||
<summary> Path</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeAddOrEdit">
|
||||
<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.TrialExternalUserView">
|
||||
<summary> TrialExternalUserView 列表视图模型 </summary>
|
||||
</member>
|
||||
|
@ -1002,6 +1020,11 @@
|
|||
ISystemAnonymizationService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Interfaces.ISystemNoticeService">
|
||||
<summary>
|
||||
ISystemNoticeService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Interfaces.ITrialExternalUserService">
|
||||
<summary>
|
||||
ITrialExternalUserService
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:34
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> SystemNoticeView 列表视图模型 </summary>
|
||||
public class SystemNoticeView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
public string NoticeContent { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
public int NoticeMode { get; set; }
|
||||
public int NoticeStateEnum { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string Path { get; set; }
|
||||
}
|
||||
|
||||
///<summary>SystemNoticeQuery 列表查询参数模型</summary>
|
||||
public class SystemNoticeQuery
|
||||
{
|
||||
///<summary> NoticeContent</summary>
|
||||
public string NoticeContent { get; set; }
|
||||
|
||||
///<summary> FileName</summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
///<summary> Path</summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||
public class SystemNoticeAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
public string NoticeContent { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
public int NoticeMode { get; set; }
|
||||
public int NoticeStateEnum { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string Path { get; set; }
|
||||
}
|
||||
|
||||
public class SystemNoticeUserTypeView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid SystemNoticeId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public Guid UserTypeId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:39
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// ISystemNoticeService
|
||||
/// </summary>
|
||||
public interface ISystemNoticeService
|
||||
{
|
||||
|
||||
|
||||
Task<List<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateSystemNotice(SystemNoticeAddOrEdit addOrEditSystemNotice);
|
||||
|
||||
Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId);
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
////--------------------------------------------------------------------
|
||||
//// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
//// 生成时间 2022-04-25 09:46:43
|
||||
//// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
////--------------------------------------------------------------------
|
||||
|
||||
//using IRaCIS.Core.Domain.Models;
|
||||
//using Microsoft.AspNetCore.Mvc;
|
||||
//using IRaCIS.Core.Application.Interfaces;
|
||||
//using IRaCIS.Core.Application.ViewModel;
|
||||
//namespace IRaCIS.Core.Application.Service
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// SystemNoticeService
|
||||
// /// </summary>
|
||||
// [ ApiExplorerSettings(GroupName = "Test")]
|
||||
// public class SystemNoticeService: BaseService, ISystemNoticeService
|
||||
// {
|
||||
|
||||
// private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
||||
|
||||
// public SystemNoticeService(IRepository<SystemNotice> systemNoticeRepository)
|
||||
// {
|
||||
// _systemNoticeRepository = systemNoticeRepository;
|
||||
// }
|
||||
|
||||
|
||||
// public async Task<List<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||
// {
|
||||
|
||||
|
||||
// var systemNoticeQueryable = _repository.GetQueryable<SystemNotice>()
|
||||
// .ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
// return await systemNoticeQueryable.ToListAsync();
|
||||
// }
|
||||
|
||||
|
||||
// public async Task<IResponseOutput> AddOrUpdateSystemNotice(SystemNoticeAddOrEdit addOrEditSystemNotice)
|
||||
// {
|
||||
// // 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
// //CreateMap<SystemNotice, SystemNoticeView>();
|
||||
// // CreateMap< SystemNotice,SystemNoticeAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
// var entity = await _repository.InsertOrUpdateAsync<SystemNotice, SystemNoticeAddOrEdit>(addOrEditSystemNotice, true);
|
||||
|
||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// [HttpDelete("{systemNoticeId:guid}")]
|
||||
// public async Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId)
|
||||
// {
|
||||
// var success = await _repository.BatchDeleteAsync<SystemNotice>()(t => t.Id == systemNoticeId);
|
||||
// return ResponseOutput.Result(success);
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
//}
|
|
@ -15,4 +15,8 @@
|
|||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Management\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:09
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///SystemNotice
|
||||
///</summary>
|
||||
[Table("SystemNotice")]
|
||||
public class SystemNotice : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NoticeLevelEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NoticeContent
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string NoticeContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ApplicableProjectEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NoticeMode
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NoticeStateEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeStateEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StartDate
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// EndDate
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Path { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:09
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///SystemNoticeUserRead
|
||||
///</summary>
|
||||
[Table("SystemNoticeUserRead")]
|
||||
public class SystemNoticeUserRead : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SystemNoticeId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid SystemNoticeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:09
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///SystemNoticeUserType
|
||||
///</summary>
|
||||
[Table("SystemNoticeUserType")]
|
||||
public class SystemNoticeUserType : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SystemNoticeId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid SystemNoticeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UserTypeId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UserTypeId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -314,6 +314,13 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
public virtual DbSet<CommonDocument> CommonDocument { get; set; }
|
||||
|
||||
public virtual DbSet<SystemNotice> SystemNotice { get; set; }
|
||||
|
||||
public virtual DbSet<SystemNoticeUserRead> SystemNoticeUserRead { get; set; }
|
||||
|
||||
public virtual DbSet<SystemNoticeUserType> SystemNoticeUserType { get; set; }
|
||||
|
||||
|
||||
|
||||
#region 废弃
|
||||
|
||||
|
|
|
@ -21,7 +21,12 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
if (context.ChangeType == ChangeType.Added)
|
||||
{
|
||||
context.Entity.CreateUserId = _userInfo.Id;
|
||||
context.Entity.CreateTime = DateTime.UtcNow.AddHours(8);
|
||||
|
||||
if (context.Entity.CreateTime == default(DateTime))
|
||||
{
|
||||
context.Entity.CreateTime = DateTime.UtcNow.AddHours(8);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
public static readonly string ConnectionString = "Server=123.56.181.144,14333\\MSSQLExpress14;Database=IRaCIS_New;User ID=sa;Password=dev123456DEV;";
|
||||
public static readonly string DbDatabase = "IRaCIS_New";
|
||||
//表名称用字符串,拼接
|
||||
public static readonly string TableName = "CommonDocument";
|
||||
public static readonly string TableName = "SystemNotice,SystemNoticeUserRead,SystemNoticeUserType";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
|
Loading…
Reference in New Issue