You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.4 KiB
C#

3 years ago
using System;
using System.Collections.Generic;
using Common;
using System.Linq.Expressions;
3 years ago
using Common.Entity;
using Common.DJYModel;
3 years ago
2 years ago
namespace djy.IService.Djy
3 years ago
{
/// <summary>
/// 接口基类
/// </summary>
public interface IsBase{
}
/// <summary>
/// 接口基类
/// </summary>
/// <typeparam name="T">表模型</typeparam>
/// <typeparam name="D">表Dto模型</typeparam>
public interface IsBase<T,D>
{
/// <summary>
///LIst查询
/// </summary>
/// <param name="Dto"></param>
/// <returns></returns>
ReturnPagedResult<D> GetList(D Dto, ApiFromDto Page);
/// <summary>
/// List数据条件查询
/// </summary>
/// <param name="Where"></param>
/// <param name="Page"></param>
/// <returns></returns>
ReturnPagedResult<D> GetList(Expression<Func<T, bool>> Where, ApiFromDto Page);
/// <summary>
///根据主键获取详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
ReturnResult<T> GetId(long Id);
/// <summary>
/// 根据Gid主键获取详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
ReturnResult<T> GetId(Guid? gId);
/// <summary>
/// 条件查询获取第一条数据实体
/// </summary>
/// <param name="Where"></param>
/// <returns></returns>
ReturnResult<T> GetId(Expression<Func<T, bool>> Where);
ReturnResult<object> Add(T Dto);
/// <summary>
///
/// </summary>
/// <param name="Dto"></param>
/// <param name="UpColumns">要更新的字段列表</param>
/// <param name="Notcolumns">排他不更新的列表</param>
/// <returns></returns>
ReturnResult<object> Up(T Dto, Expression<Func<T, bool>> Where = null, List<string> UpColumns = null, List<string> Notcolumns = null);
/// <summary>
/// 批量删除
/// </summary>
/// <param name="gidlist"></param>
/// <returns></returns>
ReturnResult<object> Del(Guid?[] gidlist);
/// <summary>
/// 条件删除
/// </summary>
/// <param name="Where"></param>
/// <returns></returns>
ReturnResult<object> Del(Expression<Func<T, bool>> Where);
}
}