/*********************************************************************** * Project: baifenBinfa * ProjectName: 百分兵法管理系统 * Web: http://chuanyin.com * Author: * Email: * CreateTime: 202403/02 * Description: 暂无 ***********************************************************************/ 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.IServices { /// /// 优惠券表 服务工厂接口 /// public interface ICoreCmsCouponServices : IBaseServices { /// /// 根据优惠券编码取优惠券的信息,并判断是否可用 /// /// /// Task CodeToInfo(string[] code, bool check = false); /// /// 删除核销多个优惠券 /// /// 优惠券码 /// 使用序列 /// Task UsedMultipleCoupon(string[] couponCode, string orderId); /// /// 获取 我的优惠券 /// /// 用户序列 /// 促销序列 /// 优惠券状态编码 /// 页码 /// 数量 /// Task GetMyCoupon(int userId, int promotionId = 0, string display = "all", int page = 1, int limit = 10); /// /// 用户领取优惠券 插入数据 /// /// /// /// /// /// /// Task AddData(int userId, int promotionId, CoreCmsPromotion promotion, int number = 1, string remark = "接口领取"); /// /// 通过优惠券号领取优惠券 /// /// /// /// Task ReceiveCoupon(int userId, string couponCode); /// /// 生成优惠券code 方法 /// /// 定义一个int类型的参数 用来确定生成多少个优惠码 /// 定义一个exclude_codes_array类型的数组 /// 定义一个code_length的参数来确定优惠码的长度 /// List GeneratePromotionCode(int noOfCodes = 1, List excludeCodesArray = null, int codeLength = 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); /// /// 优惠券返还 /// /// 优惠券数组 Task CancelReturnCoupon(string couponCodes); } }