using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; using CoreCms.Net.Model.Entities; using CoreCms.Net.Model.ViewModels.Basics; using CoreCms.Net.Model.ViewModels.UI; using SqlSugar; namespace CoreCms.Net.IRepository { /// /// 优惠券码表 工厂接口 /// public interface ICoreCmsCouponRepository : IBaseRepository { /// /// 根据优惠券编码取优惠券的信息,并判断是否可用 /// /// /// Task ToInfo(string[] code, bool check = false); /// /// 获取 我的优惠券 /// /// 用户序列 /// 促销序列 /// 优惠券状态编码 /// 页码 /// 数量 Task GetMyCoupon(int userId, int promotionId = 0, string display = "all", int page = 1, int limit = 10); /// /// 根据条件查询分页数据及导航数据 /// /// 判断集合 /// 排序方式 /// 当前页面索引 /// 分布大小 /// /// 是否分页 /// Task> QueryPageMapperAsync( Expression> predicate, Expression> orderByExpression, OrderByType orderByType, bool isToPage = false, int pageIndex = 1, int pageSize = 20); /// /// 重写数据并获取相关 /// /// 判断集合 /// 排序方式 /// /// Task> QueryWithAboutAsync(Expression> predicate); /// /// 重写根据条件查询分页数据 /// /// 判断集合 /// 排序方式 /// 当前页面索引 /// 分布大小 /// /// 是否使用WITH(NOLOCK) /// Task> QueryPageAsync( Expression> predicate, Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false); /// /// 获取 我的优惠券可用数量 /// /// 用户序列 Task GetMyCouponCount(int userId); } }