Initial_commit_SecMPS_v2
This commit is contained in:
82
api_sqlsugar/VolPro.Core/Generic/IGenericDbProvider.cs
Normal file
82
api_sqlsugar/VolPro.Core/Generic/IGenericDbProvider.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VolPro.Core.EFDbContext;
|
||||
using VolPro.Core.Enums;
|
||||
using VolPro.Core.Filters;
|
||||
using VolPro.Core.Middleware;
|
||||
using VolPro.Core.UserManager;
|
||||
using VolPro.Core.Utilities;
|
||||
using VolPro.Entity.DomainModels;
|
||||
|
||||
namespace VolPro.Core.Generic
|
||||
{
|
||||
/// <summary>
|
||||
/// 不同数据库类型的通用 CRUD 提供接口
|
||||
/// </summary>
|
||||
public interface IGenericDbProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="options"></param>
|
||||
/// <param name="isDetail"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageGridData<object>> GetPageDataAsync(PageDataOptions options, bool isDetail = false);
|
||||
/// <summary>
|
||||
/// 明细查询
|
||||
/// </summary>
|
||||
/// <param name="options"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageGridData<object>> GetDetailPageAsync(PageDataOptions options);
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="saveModel"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
Task<WebResponseContent> AddAsync(SaveModel saveModel);
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="saveModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebResponseContent> UpdateAsync(SaveModel saveModel);
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="keys"></param>
|
||||
/// <param name="delDetail"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebResponseContent> DelAsync(List<object> keys, bool delDetail = true);
|
||||
/// <summary>
|
||||
/// 上传
|
||||
/// </summary>
|
||||
/// <param name="files"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebResponseContent> UploadAsync(List<IFormFile> files);
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入Excel模板
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
byte[] DownLoadTemplateAsync();
|
||||
/// <summary>
|
||||
/// 导入表数据Excel
|
||||
/// </summary>
|
||||
/// <param name="fileInput"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebResponseContent> ImportAsync(List<IFormFile> fileInput);
|
||||
|
||||
/// <summary>
|
||||
/// 导出文件
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
Task<byte[]> ExportAsync(PageDataOptions loadData);
|
||||
|
||||
Task<WebResponseContent> AuditAsync(object[] id, int? auditStatus, string auditReason);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user