65 lines
2.2 KiB
C#
65 lines
2.2 KiB
C#
////--------------------------------------------------------------------
|
|
//// 此代码由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);
|
|
// }
|
|
|
|
|
|
// }
|
|
//}
|