You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserIBLL.cs 8.0 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. 
  2. using System.Collections;
  3. using Learun.Util;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.Organization
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创建人:陈彬彬
  11. /// 日 期:2017.03.06
  12. /// 描 述:用户模块业务类(接口)
  13. /// </summary>
  14. public interface UserIBLL
  15. {
  16. #region 获取数据
  17. /// <summary>
  18. /// 用户列表(根据公司主键)
  19. /// </summary>
  20. /// <param name="companyId">公司主键</param>
  21. /// <returns></returns>
  22. List<UserEntity> GetList(string companyId);
  23. /// <summary>
  24. /// 用户列表(根据公司主键,部门主键)
  25. /// </summary>
  26. /// <param name="companyId">公司主键</param>
  27. /// <param name="departmentId">部门主键</param>
  28. /// <param name="keyword">查询关键词</param>
  29. /// <returns></returns>
  30. List<UserEntity> GetList(string companyId, string departmentId, string keyword);
  31. List<UserEntity> GetListByDepartmentId(string departmentId);
  32. List<UserEntity> GetListByDepartmentIds(string departmentId);
  33. List<UserEntity> GetUserByDepartmentId(string departmentId);
  34. bool GetAny();
  35. bool GetStuAny();
  36. /// <summary>
  37. /// 用户列表(全部)
  38. /// </summary>
  39. /// <returns></returns>
  40. List<UserEntity> GetAllList();
  41. /// <summary>
  42. /// 修改用户信息
  43. /// </summary>
  44. void UpdateEntity(UserEntity entity);
  45. /// <summary>
  46. /// 用户列表(根据部门主键)
  47. /// </summary>
  48. /// <param name="departmentId">部门主键</param>
  49. /// <returns></returns>
  50. /// <summary>
  51. /// 获取分页数据
  52. /// </summary>
  53. /// <param name="companyId">公司主键</param>
  54. /// <param name="departmentId">部门主键</param>
  55. /// <param name="pagination">分页参数</param>
  56. /// <param name="keyword">查询关键词</param>
  57. /// <param name="tp">0 教师 1学生</param>
  58. /// <returns></returns>
  59. List<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp);
  60. /// <summary>
  61. /// 用户列表(导出Excel)
  62. /// </summary>
  63. /// <returns></returns>
  64. void GetExportList();
  65. /// <summary>
  66. /// 用户列表(导出Excel)【学生】
  67. /// </summary>
  68. /// <returns></returns>
  69. void GetExportListOfStudent();
  70. /// <summary>
  71. /// 获取实体,通过用户账号
  72. /// </summary>
  73. /// <param name="account">用户账号</param>
  74. /// <returns></returns>
  75. UserEntity GetEntityByAccount(string account);
  76. /// <summary>
  77. /// 获取实体,通过用户账号
  78. /// </summary>
  79. /// <param name="account">用户账号</param>
  80. /// <returns></returns>
  81. UserEntity GetEntityByIdCard(string account);
  82. /// <summary>
  83. /// 获取实体,通过用户名
  84. /// </summary>
  85. /// <param name="account">用户账号</param>
  86. /// <returns></returns>
  87. UserEntity GetEntityByName(string account);
  88. /// <summary>
  89. /// 获取用户数据
  90. /// </summary>
  91. /// <param name="userId">用户主键</param>
  92. /// <returns></returns>
  93. UserEntity GetEntityByUserId(string userId);
  94. /// <summary>
  95. /// 获取用户数据根据手机号
  96. /// </summary>
  97. /// <param name="mobile"></param>
  98. /// <returns></returns>
  99. UserEntity GetEntityByMobile(string mobile);
  100. /// <summary>
  101. /// 获取用户列表数据
  102. /// </summary>
  103. /// <param name="userIds">用户主键串</param>
  104. /// <returns></returns>
  105. List<UserEntity> GetListByUserIds(string userIds);
  106. /// <summary>
  107. /// 获取映射数据
  108. /// </summary>
  109. /// <returns></returns>
  110. Dictionary<string, UserModel> GetModelMap();
  111. /// <summary>
  112. /// 除学生之外所有用户
  113. /// </summary>
  114. /// <param name=""></param>
  115. /// <returns></returns>
  116. Dictionary<string, UserModel> GetModelMap(string Description);
  117. List<UserEntity> GetSaveClassMap();
  118. #endregion
  119. #region 提交数据
  120. /// <summary>
  121. /// 虚拟删除
  122. /// </summary>
  123. /// <param name="keyValue">主键</param>
  124. void VirtualDelete(string keyValue);
  125. /// <summary>
  126. /// 虚拟删除(批量)
  127. /// </summary>
  128. /// <param name="keyValue">主键</param>
  129. void VirtualDeleteBatch(string keyValue);
  130. /// <summary>
  131. /// 保存用户表单(新增、修改)
  132. /// </summary>
  133. /// <param name="keyValue">主键值</param>
  134. /// <param name="userEntity">用户实体</param>
  135. /// <returns></returns>
  136. void SaveEntity(string keyValue, UserEntity userEntity);
  137. /// <summary>
  138. /// 修改用户登录密码
  139. /// </summary>
  140. /// <param name="newPassword">新密码(MD5 小写)</param>
  141. /// <param name="oldPassword">旧密码(MD5 小写)</param>
  142. bool RevisePassword(string newPassword, string oldPassword);
  143. /// <summary>
  144. /// 重置密码
  145. /// </summary>
  146. /// <param name="keyValue">账号主键</param>
  147. void ResetPassword(string keyValue, string defaultpwd);
  148. /// <summary>
  149. /// 重置密码(八位)
  150. /// </summary>
  151. /// <param name="keyValue">账号主键</param>
  152. void ResetPasswordEight(string keyValue, string defaultpwd);
  153. /// <summary>
  154. /// 修改用户状态
  155. /// </summary>
  156. /// <param name="keyValue">主键值</param>
  157. /// <param name="state">状态:1-启动;0-禁用</param>
  158. void UpdateState(string keyValue, int state);
  159. /// <summary>
  160. /// 保存用户的设备号
  161. /// </summary>
  162. /// <param name="keyValue">主键</param>
  163. /// <param name="deviceId">设备号</param>
  164. void UpdateDeviceId(string keyValue, string deviceId);
  165. /// <summary>
  166. /// 解绑微信
  167. /// </summary>
  168. void DoUnbundWeiXin(string keyValue);
  169. #endregion
  170. #region 验证数据
  171. /// <summary>
  172. /// 账户不能重复
  173. /// </summary>
  174. /// <param name="account">账户值</param>
  175. /// <param name="keyValue">主键</param>
  176. /// <returns></returns>
  177. bool ExistAccount(string account, string keyValue);
  178. #endregion
  179. #region 扩展方法
  180. /// <summary>
  181. /// 验证登录 F_UserOnLine 0 不成功,1成功
  182. /// </summary>
  183. /// <param name="username">账号</param>
  184. /// <param name="password">密码 MD5 32位 小写</param>
  185. /// <returns></returns>
  186. UserEntity CheckLogin(string username, string password);
  187. /// <summary>
  188. /// 获取用户头像
  189. /// </summary>
  190. /// <param name="userId">用户ID</param>
  191. void GetImg(string userId);
  192. void setPassword(string userid, string pwd);
  193. List<UserEntity> GetStudents();
  194. #endregion
  195. UserEntity GetEntityByWeixinOpenId(string openid);
  196. void UpdateWeixinOpenId(string userEntityFUserId, string loginModelOpenid);
  197. void UpdateWeixinOpenIdPC(string userEntityFUserId, string loginModelOpenid);
  198. /// <summary>
  199. /// 获取超级管理员用户列表
  200. /// </summary>
  201. /// <returns></returns>
  202. IEnumerable<UserEntity> GetAdminList();
  203. void UpdateIp(string ip, string id);
  204. void GetImgForDC(string userId);
  205. UserEntity GetEntityByWeixinOpenIdPC(string openId);
  206. /// <summary>
  207. /// 修改用户的允许登录结束时间
  208. /// </summary>
  209. /// <param name="keyValue">主键值</param>
  210. /// <param name="state">状态:1-赋值;0-重置</param>
  211. void UpdateAllowEndTime(string keyValue, int state);
  212. }
  213. }