using System; using System.Collections.Generic; using System.Text; using Song.Entities; using System.Data; using WeiSha.Data; namespace Song.ServiceInterfaces { /// /// 学员的管理 /// public interface IStudent : WeiSha.Common.IBusinessInterface { #region 学员分类管理 /// /// 添加学员分类 /// /// 业务实体 void SortAdd(StudentSort entity); /// /// 修改学员分类 /// /// 业务实体 void SortSave(StudentSort entity); /// /// 删除,按主键ID; /// /// 实体的主键 /// 如果删除成功,返回0;如果组包括学员,返回-1;如果是默认组,返回-2 int SortDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// StudentSort SortSingle(int identify); /// /// 获取默认学员组 /// /// 机构id /// StudentSort SortDefault(int orgid); /// /// 设置默认学员分类 /// /// /// /// void SortSetDefault(int orgid, int identify); /// /// 获取对象;即所有学员组; /// /// StudentSort[] SortAll(int orgid, bool? isUse); /// /// 获取指定个数的对象 /// /// /// /// /// StudentSort[] SortCount(int orgid, bool? isUse, int count); /// /// 获取某网站学员所属的组; /// /// 网站学员id /// StudentSort Sort4Student(int studentId); /// /// 获取某个组的所有网站学员 /// /// 分类id /// Accounts[] Student4Sort(int sortid, bool? isUse); /// /// 当前对象名称是否重名 /// /// 实体 /// bool SortIsExist(StudentSort entity); /// /// 将当前项目向上移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool SortRemoveUp(int orgid, int id); /// /// 将当前项目向下移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool SortRemoveDown(int orgid, int id); /// /// 分页获取学员组 /// /// 机构id /// /// 分组名称 /// /// /// /// StudentSort[] SortPager(int orgid, bool? isUse, string name, int size, int index, out int countSum); #endregion //#region 学员管理 ///// ///// 添加学员 ///// ///// 业务实体 ///// 如果已经存在该学员,则返回-1 //int StudentAdd(Student entity); ///// ///// 修改学员 ///// ///// 业务实体 //void StudentSave(Student entity); ///// ///// 删除,按主键ID; ///// ///// 实体的主键 //void StudentDelete(int identify); ///// ///// 删除,按网站学员帐号名 ///// ///// 网站学员账号 ///// //void StudentDelete(string accname, int orgid); ///// ///// 删除学员 ///// ///// //void StudentDelete(Song.Entities.Student entity); ///// ///// 删除学员 ///// ///// ///// //void StudentDelete(Song.Entities.Student entity, DbTrans tran); ///// ///// 获取单一实体对象,按主键ID; ///// ///// 实体的主键 ///// //Student StudentSingle(int identify); ///// ///// 获取单一实体,按账号 ///// ///// ///// ///// //Student StudentSingle(string accname, int orgid); ///// ///// 获取单一实体对象,按网站学员名称 ///// ///// 帐号名称 ///// //Student StudentSingle(string accname, string pw, int orgid); ///// ///// 获取单一实体,通过id与验证码 ///// ///// 学员Id ///// 学员登录时产生随机字符,用于判断同一账号不同人登录的问题 ///// //Student StudentSingle(int id, string uid); ///// ///// 登录验证 ///// ///// 账号,或身份证,或手机 ///// 密码(明文,未经md5加密) ///// ///// //Student StudentLogin(string acc, string pw, int orgid, bool? isPass); ///// ///// 登录判断 ///// ///// 学员id ///// 密码,md5加密后的 ///// ///// ///// //Student StudentLogin(int accid, string pw, int orgid, bool? isPass); ///// ///// 当前用帐号是否重名 ///// ///// 学员帐号 ///// //bool IsStudentExist(int orgid, string accname); ///// ///// 判断学员是否已经在存,将判断账号与手机号 ///// ///// ///// ///// //bool IsStudentExist(int orgid, Student enity); ///// ///// 当前用帐号是否重名 ///// ///// ///// ///// 安全问题答案 ///// //bool IsStudentExist(int orgid, string accname, string answer); ///// ///// 获取对象;即所有网站学员; ///// ///// //Student[] StudentAll(int orgid, bool? isUse); ///// ///// 获取学员 ///// ///// 机构id ///// ///// ///// //Student[] StudentCount(int orgid, bool? isUse, int count); ///// ///// 计算有多少学员 ///// ///// ///// ///// //int StudentOfCount(int orgid, bool? isUse); ///// ///// 导出Excel格式的学员信息 ///// ///// 导出文件的路径(服务器端) ///// 机构id ///// 学员分组id,小于0为全部 ///// //string StudentExport4Excel(string path, int orgid, int sortid); ///// ///// 分页获取所有的网站学员帐号; ///// ///// 每页显示几条记录 ///// 当前第几页 ///// 记录总数 ///// //Student[] StudentPager(int orgid, int size, int index, out int countSum); ///// ///// 分页获取某学员组,所有的网站学员帐号; ///// ///// 机构id ///// 学员分类id ///// ///// 学员名称 ///// 学员账号 ///// ///// ///// ///// //Student[] StudentPager(int orgid, int? sortid, bool? isUse, string name, string phone, int size, int index, out int countSum); //#endregion #region 学员登录与在线记录 /// /// 添加登录记录 /// /// void LogForLoginAdd(Accounts st); /// /// 修改登录记,刷新一下登录信息,例如在线时间 /// /// 数据提交的间隔时间,也是每次提交的增加的在线时间数,单位秒 /// 设备名称,PC为电脑端,Mobi为手机端 void LogForLoginFresh(int interval, string plat); /// /// 退出登录之前的记录更新 /// /// 设备名称,PC为电脑端,Mobi为手机端 void LogForLoginOut(string plat); /// /// 根据学员id与登录时生成的Uid返回实体 /// /// 学员Id /// 登录时生成的随机字符串,全局唯一 /// 设备名称,PC为电脑端,Mobi为手机端 /// LogForStudentOnline LogForLoginSingle(int stid, string stuid, string plat); /// /// 返回记录 /// /// 记录ID /// LogForStudentOnline LogForLoginSingle(int identify); /// /// 删除学员在线记录 /// /// void StudentOnlineDelete(int identify); /// /// 分页获取 /// /// 机构Id /// 学员Id /// 学员文章平台,PC或Mobi /// 统计的开始时间 /// 统计的结束时间 /// /// /// /// LogForStudentOnline[] LogForLoginPager(int orgid, int stid, string platform, DateTime? start, DateTime? end, int size, int index, out int countSum); /// /// 分页获取 /// /// /// /// /// /// /// 学员名称 /// 学员手机号 /// /// /// /// LogForStudentOnline[] LogForLoginPager(int orgid, int stid, string platform, DateTime? start, DateTime? end, string stname, string stmobi, int size, int index, out int countSum); #endregion #region 学员在线学习的记录 /// /// 记录学员学习时间 /// /// /// 章节id /// 学员账户 /// 播放进度 /// 学习时间,此为时间间隔,每次提交学习时间加这个数 /// 视频总长度 void LogForStudyFresh(int couid, int olid, Accounts st, int playTime, int studyInterval, int totalTime); /// /// 记录学员学习时间 /// /// /// 章节id /// 学员账户 /// 播放进度 /// 学习时间,此为累计时间 /// 视频总长度 /// 学习进度百分比(相对于总时长),如果为-1,则表示失败 double LogForStudyUpdate(int couid, int olid, Accounts st, int playTime, int studyTime, int totalTime); /// /// 根据学员id与登录时生成的Uid返回实体 /// /// 学员Id /// 章节id /// LogForStudentStudy LogForStudySingle(int stid, int olid); /// /// 返回记录 /// /// 记录ID /// LogForStudentStudy LogForStudySingle(int identify); /// /// 返回学习记录 /// /// 机构id /// 课程id /// 章节id /// 学员id /// 平台,PC或Mobi /// /// LogForStudentStudy[] LogForStudyCount(int orgid, int couid, int olid, int stid, string platform, int count); /// /// 分页获取 /// /// 机构Id /// 学员Id /// 学员文章平台,PC或Mobi /// 统计的开始时间 /// 统计的结束时间 /// /// /// /// LogForStudentStudy[] LogForStudyPager(int orgid, int couid, int olid, int stid, string platform, int size, int index, out int countSum); /// /// 学员所有学习课程的记录 /// /// /// datatable中LastTime列为学习时间;studyTime:学习时间 DataTable StudentStudyCourseLog(int stid); /// /// 学员指定学习课程的记录 /// /// /// 课程id,逗号分隔 /// DataTable StudentStudyCourseLog(int stid,string couids); /// /// 学员所有学习某一课程的记录 /// /// 学员id /// 课程id /// DataTable StudentStudyCourseLog(int stid,int couid); /// /// 学员学习某一课程下所有章节的记录 /// /// 课程id /// 学员账户id /// datatable中,LastTime:最后学习时间;totalTime:视频时间长;playTime:播放进度;studyTime:学习时间,complete:完成度百分比 DataTable StudentStudyOutlineLog(int couid, int stid); #endregion #region 学员的错题回顾 /// /// 添加添加学员的错题 /// /// 业务实体 void QuesAdd(Student_Ques entity); /// /// 修改学员的错题 /// /// 业务实体 void QuesSave(Student_Ques entity); /// /// 删除,按主键ID; /// /// 实体的主键 /// void QuesDelete(int identify); /// /// 删除,按试题id与试题id /// /// 试题id /// 学员id void QuesDelete(int quesid, int stid); /// /// 清空错题 /// /// 课程id /// 学员id void QuesClear(int couid, int stid); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Student_Ques QuesSingle(int identify); /// /// 当前学员的所有错题 /// /// 学员id /// 学科id /// 试题类型 /// Questions[] QuesAll(int stid, int sbjid, int couid, int type); /// /// 获取指定个数的对象 /// /// 学员id /// 学科id /// 试题类型 /// Questions[] QuesCount(int stid, int sbjid, int couid, int type, int count); /// /// 高频错题 /// /// 课程ID /// 题型 /// 取多少条 /// 试题的完整结构+count列,取试题的错误次数 Questions[] QuesOftenwrong(int couid, int type, int count); /// /// 分页获取学员的错误试题 /// /// 学员id /// 学科id /// 试题类型 /// 难易度 /// /// /// /// Questions[] QuesPager(int stid, int sbjid, int couid, int type, int diff, int size, int index, out int countSum); #endregion #region 学员的收藏 /// /// 添加添加学员收藏的试题 /// /// 业务实体 void CollectAdd(Student_Collect entity); /// /// 修改学员收藏的试题 /// /// 业务实体 void CollectSave(Student_Collect entity); /// /// 删除,按主键ID; /// /// 实体的主键 /// void CollectDelete(int identify); /// /// 删除,按试题id与试题id /// /// /// void CollectDelete(int quesid, int stid); /// /// 清空错题 /// /// 课程id /// 学员id void CollectClear(int couid, int stid); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Student_Collect CollectSingle(int identify); /// /// 当前学员收藏的试题 /// /// 学员id /// 学科id /// 课程id /// 试题类型 /// Questions[] CollectAll4Ques(int stid, int sbjid, int couid, int type); Student_Collect[] CollectAll(int stid, int sbjid, int couid, int type); /// /// 获取指定个数的对象 /// /// 学员id /// 学科id /// 课程id /// 试题类型 /// Questions[] CollectCount(int stid, int sbjid, int couid, int type, int count); /// /// 分页获取学员的错误试题 /// /// 学员id /// 学科id /// 课程id /// 试题类型 /// 难易度 /// /// /// /// Questions[] CollectPager(int stid, int sbjid, int couid, int type, int diff, int size, int index, out int countSum); #endregion #region 学员的笔记 /// /// 添加添加学员的笔记 /// /// 业务实体 void NotesAdd(Student_Notes entity); /// /// 修改学员的笔记 /// /// 业务实体 void NotesSave(Student_Notes entity); /// /// 删除,按主键ID; /// /// 实体的主键 /// void NotesDelete(int identify); /// /// 删除,按试题id与试题id /// /// /// void NotesDelete(int quesid, int stid); /// /// 清空试题 /// /// 课程id /// 学员id void NotesClear(int couid, int stid); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Student_Notes NotesSingle(int identify); /// /// 获取单一实体对象,按试题id、学员id /// /// 试题id /// 学员id /// Student_Notes NotesSingle(int quesid, int stid); /// /// 当前学员的所有笔记 /// /// 学员id /// 试题类型 /// Student_Notes[] NotesAll(int stid, int type); /// /// 取当前学员的笔记 /// /// /// /// /// /// Questions[] NotesCount(int stid, int couid, int type, int count); /// /// 获取指定个数的对象 /// /// 学员id /// 试题类型 /// 数量 /// Questions[] NotesCount(int stid, int type, int count); /// /// 分页获取学员的错误试题 /// /// 学员id /// 试题id /// /// /// /// Student_Notes[] NotesPager(int stid, int quesid, string searTxt, int size, int index, out int countSum); #endregion } }