/*********************************************************************** * 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.DTO.Distribution; using CoreCms.Net.Model.ViewModels.UI; using SqlSugar; using static CoreCms.Net.Configuration.GlobalEnumVars; namespace CoreCms.Net.IServices { /// /// 经销商表 服务工厂接口 /// public interface ICoreCmsDistributionServices : IBaseServices { /// /// 获取经销商信息 /// /// 用户id /// 是否检查满足条件 /// Task GetInfo(int userId, bool checkStatus = false); /// /// 添加用户信息 /// /// /// /// Task AddData(CoreCmsDistribution iData, int userId); /// /// 获取我的推广订单 /// /// /// /// /// Task GetMyOrderList(int userId, int page, int limit = 10, int typeId = 0); /// /// 获取店铺信息 /// /// /// /// /// Task GetStore(int userId); /// /// 获取当前用户返佣设置 /// /// /// Task GetGradeAndCommission(int userId); //检查是否可以成为经销商 Task CheckCondition(Dictionary allConfigs, CoreCmsDistribution info, int userId = 0); /// /// 检查当前用户是否可以升级 /// /// /// Task CheckUpdate(int userId); /// /// 获取代理商排行 /// /// 当前页面索引 /// 分布大小 /// Task> QueryRankingPageAsync(int pageIndex = 1, int pageSize = 20); #region 重写根据条件查询分页数据 /// /// 重写根据条件查询分页数据 /// /// 判断集合 /// 排序方式 /// 当前页面索引 /// 分布大小 /// /// 是否使用WITH(NOLOCK) /// Task> QueryPageAsync( Expression> predicate, Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false); #endregion /// /// 统计到当前时间未统计业绩 /// /// /// /// decimal 当前统计金额 /// DateTime 结算时间 /// Task<(decimal,DateTime?, DateTime?)> AchievementTotal(int UserId); /// /// 计算当次结算应该的提成额度 /// /// /// Task AchievementBonus(decimal AttributeTotal); /// /// 结算绩效奖励 /// /// 用户ID /// Task SettledAchievement(int UserId); /// /// 创建一个经销商业绩单 /// /// Task CreateDistributionAchievementOrder(CreateDAOrderInParam Parma); /// /// 结算所有供应商的绩效奖励 /// /// Task SettledAllAchievement(); /// /// 获取经销商推广费 /// /// List QueryAchievement(int UserId); } /// /// 创建经销商订单业绩输出参数 /// public class CreateDAOrderInParam { /// /// 父级ID /// public int UserID { get; set; } /// /// 资源ID /// public string OderId { get; set; } /// /// 资源类型 /// public UserBalanceSourceTypes SourceTypes { get; set; } /// /// 金额 /// public decimal Money { get; set; } } }