using System; using System.Collections.Generic; using System.Text; using Song.Entities; using System.Data; using WeiSha.Data; using NPOI.HSSF.UserModel; namespace Song.ServiceInterfaces { /// /// 账户管理 /// public interface IAccounts : WeiSha.Common.IBusinessInterface { #region 事件 /// /// 账户信息变更时 /// event EventHandler Save; event EventHandler Add; event EventHandler Delete; void OnSave(object sender, EventArgs e); void OnAdd(object sender, EventArgs e); void OnDelete(object sender, EventArgs e); #endregion #region 账户管理 /// /// 注册协议 /// /// string RegAgreement(); /// /// 添加账户 /// /// 业务实体 /// 如果已经存在该账户,则返回-1 int AccountsAdd(Accounts entity); /// /// 修改账户 /// /// 业务实体 void AccountsSave(Accounts entity); /// /// 修改账户,按条件修改 /// /// /// /// void AccountsUpdate(Accounts entity, Field[] fiels, object[] objs); /// /// 删除,按主键ID; /// /// 实体的主键 void AccountsDelete(int identify); /// /// 删除账户 /// /// void AccountsDelete(Song.Entities.Accounts entity); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Accounts AccountsSingle(int identify); /// /// 获取单一实体对象,按ygid; /// /// 实体的主键 /// Accounts AccountsYgId(string identify); /// /// 获取单一实体对象,按网站账户名称 /// /// 账户名称 /// 密码 /// 机构id /// Accounts AccountsSingle(string accname, string pw, int orgid); /// /// 通过账号名获取 /// /// 账户名称 /// /// Accounts AccountsSingle(string accname, int orgid); /// /// 通过手机号获取账户 /// /// 手机号 /// 是否通过审核 /// 是否启用 /// Accounts AccountsSingle(string phone, bool? isPass, bool? isUse); /// /// 获取单一实体,通过id与验证码 /// /// 账户Id /// 账户登录时产生随机字符,用于判断同一账号不同人登录的问题 /// Accounts AccountsSingle(int id, string uid); /// /// 通过姓名获取账号 /// /// /// Accounts[] Account4Name(string name); /// /// 通过QQ的openid获取账户 /// /// /// Accounts Account4QQ(string openid); /// /// 通过微信的openid获取账户 /// /// /// Accounts Account4Weixin(string openid); /// /// 通过基础账号的id,获取教师账户 /// /// /// Teacher GetTeacher(int acid, bool? isPass); /// /// 登录验证 /// /// 账号,或身份证,或手机 /// 密码(明文,未经md5加密) /// 是否审核通过 /// Accounts AccountsLogin(string acc, string pw, bool? isPass); /// /// 登录判断 /// /// 账户id /// 密码,md5加密后的 /// 是否审核通过 /// Accounts AccountsLogin(int accid, string pw, bool? isPass); /// /// 判断账号是否存在 /// /// 账号名 /// Accounts IsAccountsExist(string accname); /// /// 判断账号是否存在 /// /// /// Accounts IsAccountsExist(int orgid, string accname); /// /// 当前用帐号是否重名 /// /// 账户帐号 /// 判断类型,默认为账号,1为手机号,2为邮箱 /// Accounts IsAccountsExist(int orgid, string accname, int type); /// /// 判断账户是否已经在存,将判断账号与手机号 /// /// /// /// Accounts IsAccountsExist(int orgid, Accounts enity); /// /// 当前用帐号是否重名 /// /// /// /// 安全问题答案 /// Accounts IsAccountsExist(int orgid, string accname, string answer); /// /// 获取账户 /// /// 机构id /// /// /// Accounts[] AccountsCount(int orgid, bool? isUse, int count); /// /// 获取账户信息 /// /// 机构id /// 是否启用 /// 班组的id,多个id用逗号分隔 /// 取多少条,小于1为所有 /// List AccountsCount(int orgid, bool? isUse, string sts, int count); /// /// 计算有多少账户 /// /// /// /// int AccountsOfCount(int orgid, bool? isUse); /// /// 分页获取所有的网站账户帐号; /// /// 每页显示几条记录 /// 当前第几页 /// 记录总数 /// Accounts[] AccountsPager(int orgid, int size, int index, out int countSum); /// /// 分页获取某账户组,所有的网站账户帐号; /// /// 机构id /// 学员分组id /// /// 账户名称 /// 姓名或昵称 /// 手机号 /// /// /// /// Accounts[] AccountsPager(int orgid, int sortid, bool? isUse, string acc,string name, string phone, int size, int index, out int countSum); /// /// 分页获取某账户组,所有的网站账户帐号; /// /// 机构id /// 学员分组id /// 推荐人id /// /// 账户名称 /// 姓名或昵称 /// 手机号 /// /// /// /// Accounts[] AccountsPager(int orgid, int sortid, int pid, bool? isUse, string acc, string name, string phone, int size, int index, out int countSum); Accounts[] AccountsPager2(int orgid, int sortid, bool? isUse, string acc, string name, string phone,string qyName, int size, int index, out int countSum); /// /// 学员账号信息导出 /// /// 导出文件的路径(服务器端) /// 机构id /// 学员分组id,用逗号分隔 /// string AccountsExport4Excel(string path, int orgid, string sorts); /// /// 学员账户号导出 /// /// 导出文件的路径(服务器端) /// 机构id,用逗号分隔 /// string AccountsExport4Excel(string path, string orgs); #endregion #region 下级账户,上级账户 /// /// 下级会员数据 /// /// 当前账号ID /// 是否包括所有下级,true是所有,false只取直接下级 /// int SubordinatesCount(int acid, bool isAll); /// /// 下级会员分页获取 /// /// 当前账号id /// 是否启用 /// /// /// /// /// /// /// Accounts[] SubordinatesPager(int acid, bool? isUse, string acc, string name, string phone, int size, int index, out int countSum); /// /// 当前账户的所有父级账户,依次向上 /// /// 当前账户id /// Accounts[] Parents(int accid); Accounts[] Parents(Accounts acc); #endregion #region 积分管理 /// /// 收入 /// /// 业务实体 PointAccount PointAdd(PointAccount entity); /// /// 增加登录积分 /// /// 学员账户 /// /// 此次登录所增加的积分数 int PointAdd4Login(Accounts acc); /// /// 增加登录积分 /// /// 学员账户 /// 来源信息 /// 信息 /// 备注 /// 此次登录所增加的积分数 int PointAdd4Login(Accounts acc,string source,string info,string remark); /// /// 增加分享链接的访问积分 /// /// /// int PointAdd4Share(Accounts acc); /// /// 增加分享链接的注册积分 /// /// /// int PointAdd4Register(Accounts acc); /// /// 支出 /// /// 业务实体 PointAccount PointPay(PointAccount entity); /// /// 删除流水 /// /// 业务实体 void PointDelete(PointAccount entity); /// /// 删除,按主键ID; /// /// 实体的主键 void PointDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// PointAccount PointSingle(int identify); /// /// 获取单一实体对象,按流水号 /// /// /// PointAccount PointSingle(string serial); /// /// 修改流水信息 /// /// void PointSave(PointAccount entity); /// /// 获取指定个数的记录 /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// /// PointAccount[] PointCount(int orgid, int stid, int type, int count); /// /// 计算某一个时间区间的积分 /// /// 学员账户 /// 来源分类,1登录,2分享访问;3分享注册;4兑换; /// /// /// int PointClac(int acid, int formType, DateTime? start, DateTime? end); /// /// 分页获取所有的公告; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// /// /// /// PointAccount[] PointPager(int orgid, int stid, int type, int size, int index, out int countSum); /// /// 分页获取所有的公告; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// 按信息检索 /// /// /// /// /// /// PointAccount[] PointPager(int orgid, int st, int type, string searTxt, DateTime? start, DateTime? end, int size, int index, out int countSum); #endregion #region 卡券管理 /// /// 收入 /// /// 业务实体 CouponAccount CouponAdd(CouponAccount entity); /// /// 支出 /// /// 业务实体 CouponAccount CouponPay(CouponAccount entity); /// /// 积分兑换卡券 /// /// 学员id /// 要兑换的卡券数量 /// void CouponExchange(int accid,int coupon); /// /// 积分兑换卡券 /// /// 学员 /// 要兑换的卡券数量 void CouponExchange(Accounts acc, int coupon); /// /// 删除流水 /// /// 业务实体 void CouponDelete(CouponAccount entity); /// /// 删除,按主键ID; /// /// 实体的主键 void CouponDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// CouponAccount CouponSingle(int identify); /// /// 获取单一实体对象,按流水号 /// /// /// CouponAccount CouponSingle(string serial); /// /// 修改流水信息 /// /// void CouponSave(CouponAccount entity); /// /// 获取指定个数的记录 /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// /// CouponAccount[] CouponCount(int orgid, int stid, int type, int count); /// /// 计算某一个时间区间的积分 /// /// 学员账户 /// 来源分类,1兑换,2消费支出;5分润;4管理员充值; /// /// /// int CouponClac(int acid, int formType, DateTime? start, DateTime? end); /// /// 分页获取所有的公告; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// /// /// /// CouponAccount[] CouponPager(int orgid, int stid, int type, int size, int index, out int countSum); CouponAccount[] CouponPager(int orgid, int stid, int type, DateTime? start, DateTime? end,int size, int index, out int countSum); /// /// 分页获取所有的公告; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// 按信息检索 /// /// /// /// CouponAccount[] CouponPager(int orgid, int st, int type, string searTxt, int size, int index, out int countSum); #endregion #region 资金管理 /// /// 收入 /// /// 业务实体 MoneyAccount MoneyIncome(MoneyAccount entity); /// /// 支出 /// /// 业务实体 MoneyAccount MoneyPay(MoneyAccount entity); /// /// 通过流水号进行资金支出或收入的确认操作 /// /// 流水号 /// MoneyAccount MoneyConfirm(string serial); /// /// 通过交易记录的对象,进行资金支出或收入的确认操作 /// /// /// MoneyAccount MoneyConfirm(MoneyAccount ma); /// /// 删除流水 /// /// 业务实体 void MoneyDelete(MoneyAccount entity); /// /// 删除,按主键ID; /// /// 实体的主键 void MoneyDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// MoneyAccount MoneySingle(int identify); /// /// 获取单一实体对象,按流水号 /// /// /// MoneyAccount MoneySingle(string serial); /// /// 计算资金收益 /// /// 账号id /// 1支出,2收入(包括充值、分润等) /// 类型,来源,1为管理员操作,2为充值码充值;3这在线支付;4购买课程,5分润 /// decimal MoneySum(int accid, int type, int from); /// /// 修改流水信息 /// /// void MoneySave(MoneyAccount entity); /// /// 获取指定个数的记录 /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// 是否操作成功 /// /// MoneyAccount[] MoneyCount(int orgid, int stid, int type, bool? isSuccess, int count); /// /// 计算某一个时间区间的现金 /// /// 学员账户 /// 1为管理员操作,2为充值码充值;3在线支付;4购买课程,5分润 /// /// /// int MoneyClac(int acid, int formType, DateTime? start, DateTime? end); /// /// 分页获取资金流水; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// /// /// /// MoneyAccount[] MoneyPager(int orgid, int stid, int type, int size, int index, out int countSum); /// /// 分页获取资金流水; /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// 按信息检索 /// /// /// /// MoneyAccount[] MoneyPager(int orgid, int st, int type, string searTxt, int size, int index, out int countSum); /// /// 分页获取资金流水; /// /// /// 机构id /// 学员id /// 类型,支出为1,转入2 /// 来源,1为管理员,2为充值码,3为在线支付 /// 按信息检索 /// 按时间检索区间,此为开始时间 /// 按时间检索区间,此为结束时间 /// /// /// /// MoneyAccount[] MoneyPager(int orgid, int st, int type, int from, string searTxt, DateTime? start, DateTime? end, int size, int index, out int countSum); #endregion } }