UserService.java 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. package jnpf.permission.service;
  2. import jnpf.base.Page;
  3. import jnpf.base.Pagination;
  4. import jnpf.base.service.SuperService;
  5. import jnpf.base.vo.DownloadVO;
  6. import jnpf.model.SystemParamModel;
  7. import jnpf.permission.entity.UserEntity;
  8. import jnpf.permission.model.rolerelaiton.RoleRelationPage;
  9. import jnpf.permission.model.user.UserRelationIds;
  10. import jnpf.permission.model.user.mod.UserConditionModel;
  11. import jnpf.permission.model.user.page.PageUser;
  12. import jnpf.permission.model.user.page.PaginationUser;
  13. import jnpf.permission.model.user.page.UserPagination;
  14. import jnpf.permission.model.user.vo.*;
  15. import java.util.List;
  16. import java.util.Map;
  17. import java.util.Set;
  18. /**
  19. * 用户信息
  20. *
  21. * @author JNPF开发平台组
  22. * @version V3.1.0
  23. * @copyright 引迈信息技术有限公司
  24. * @date 2019年9月26日 上午9:18
  25. */
  26. public interface UserService extends SuperService<UserEntity> {
  27. List<UserEntity> getList(UserPagination pagination);
  28. /*======================get接口========================*/
  29. List<UserEntity> getAdminList();
  30. /**
  31. * 列表
  32. *
  33. * @param pagination 条件
  34. * @param enabledMark
  35. * @param gender
  36. * @return
  37. */
  38. List<UserEntity> getList(PaginationUser pagination, String organizeId, Boolean flag, Boolean filter, Integer enabledMark, String gender);
  39. /**
  40. * 列表
  41. *
  42. * @param pagination 条件
  43. * @param filterCurrentUser
  44. * @return
  45. */
  46. List<UserEntity> getList(PageUser pagination, Boolean filterCurrentUser);
  47. /**
  48. * 通过关键字查询
  49. *
  50. * @param pagination
  51. * @return
  52. */
  53. List<UserEntity> getUserPage(Pagination pagination);
  54. /**
  55. * 通过组织id获取用户列表
  56. *
  57. * @param organizeId 组织id
  58. * @param keyword 关键字
  59. * @return
  60. */
  61. List<UserEntity> getListByOrganizeId(String organizeId, String keyword);
  62. /**
  63. * 列表
  64. *
  65. * @param enabledMark
  66. * @return
  67. */
  68. List<UserEntity> getList(boolean enabledMark);
  69. /**
  70. * 用户名列表(在线开发)
  71. *
  72. * @param idList
  73. * @return
  74. */
  75. List<UserEntity> getUserNameList(List<String> idList);
  76. /**
  77. * 用户名列表(在线开发)
  78. *
  79. * @param idList
  80. * @return
  81. */
  82. List<UserEntity> getUserNameList(Set<String> idList);
  83. /**
  84. * (id : name/account)
  85. *
  86. * @return
  87. */
  88. Map<String, Object> getUserMap();
  89. /**
  90. * ( name/account: id)
  91. *
  92. * @return
  93. */
  94. Map<String, Object> getUserNameAndIdMap();
  95. Map<String, Object> getUserNameAndIdMap(boolean enabledMark);
  96. /**
  97. * 通过名称查询id
  98. *
  99. * @return
  100. */
  101. UserEntity getByRealName(String realName);
  102. /**
  103. * 通过名称查询id
  104. *
  105. * @return
  106. */
  107. UserEntity getByRealName(String realName, String account);
  108. /**
  109. * 列表
  110. *
  111. * @param managerId 主管Id
  112. * @param keyword 关键字
  113. * @return
  114. */
  115. List<UserEntity> getListByManagerId(String managerId, String keyword);
  116. /**
  117. * 信息
  118. *
  119. * @param id 主键值
  120. * @return
  121. */
  122. UserEntity getInfo(String id);
  123. /**
  124. * 信息
  125. *
  126. * @param account 账户
  127. * @return
  128. */
  129. UserEntity getUserByAccount(String account);
  130. /**
  131. * 信息
  132. *
  133. * @param mobile 手机号码
  134. * @return
  135. */
  136. UserEntity getUserByMobile(String mobile);
  137. /*==============================================*/
  138. Boolean setAdminListByIds(List<String> adminIds);
  139. /**
  140. * 验证账户
  141. *
  142. * @param account 账户
  143. * @return
  144. */
  145. boolean isExistByAccount(String account);
  146. /**
  147. * 创建
  148. *
  149. * @param entity 实体对象
  150. */
  151. Boolean create(UserEntity entity) throws Exception;
  152. /**
  153. * 判断用户额度
  154. */
  155. void beforeCheck();
  156. /**
  157. * 更新
  158. *
  159. * @param id 主键值
  160. * @param entity 实体对象
  161. */
  162. Boolean update(String id, UserEntity entity) throws Exception;
  163. /**
  164. * 删除
  165. *
  166. * @param entity 实体对象
  167. */
  168. void delete(UserEntity entity);
  169. /**
  170. * 批量删除用户信息
  171. *
  172. * @param userIdList 用户id列表
  173. */
  174. void batchDelete(List<String> userIdList);
  175. /**
  176. * 修改密码
  177. *
  178. * @param entity 实体对象
  179. */
  180. void updatePassword(UserEntity entity);
  181. /**
  182. * 查询用户名称
  183. *
  184. * @param id 主键值
  185. * @return
  186. */
  187. List<UserEntity> getUserName(List<String> id);
  188. /**
  189. * 查询用户名称
  190. *
  191. * @param id 主键值
  192. * @return
  193. */
  194. List<UserEntity> getUserName(List<String> id, boolean filterEnabledMark);
  195. /**
  196. * 查询用户名称
  197. *
  198. * @param id 主键值
  199. * @return
  200. */
  201. List<UserEntity> getListByUserIds(List<String> id);
  202. /**
  203. * 查询出分页被禁用的账号
  204. *
  205. * @param id 主键值
  206. * @return
  207. */
  208. List<UserEntity> getUserList(List<String> id);
  209. /**
  210. * 通过account返回user实体
  211. *
  212. * @param account 账户
  213. * @return
  214. */
  215. UserEntity getUserEntity(String account);
  216. /**
  217. * 获取用户id
  218. *
  219. * @return
  220. */
  221. List<String> getListId();
  222. /**
  223. * 添加岗位或角色成员
  224. *
  225. * @param entity
  226. */
  227. void update(UserEntity entity, String type);
  228. /**
  229. * 添加岗位或角色成员
  230. *
  231. * @param entity
  232. */
  233. void updateLastTime(UserEntity entity, String type);
  234. /**
  235. * 判断是否为自己的下属
  236. *
  237. * @param id
  238. * @param managerId
  239. * @return
  240. */
  241. boolean isSubordinate(String id, String managerId);
  242. /**
  243. * 导出Excel
  244. *
  245. * @param dataType
  246. * @param selectKey
  247. * @param pagination
  248. * @return
  249. */
  250. DownloadVO exportExcel(String dataType, String selectKey, PaginationUser pagination);
  251. /**
  252. * 导入预览
  253. *
  254. * @param personList
  255. * @return
  256. */
  257. Map<String, Object> importPreview(List<UserExportVO> personList);
  258. /**
  259. * 导入数据
  260. *
  261. * @param dataList 数据源
  262. */
  263. UserImportVO importData(List<UserExportVO> dataList);
  264. /**
  265. * 通过组织id获取上级id集合
  266. *
  267. * @param organizeId
  268. * @param organizeParentIdList
  269. */
  270. void getOrganizeIdTree(String organizeId, StringBuffer organizeParentIdList);
  271. /**
  272. * 导出错误报告
  273. *
  274. * @param dataList
  275. * @return
  276. */
  277. DownloadVO exportExceptionData(List<UserExportExceptionVO> dataList);
  278. /**
  279. * 候选人分页查询
  280. *
  281. * @param id
  282. * @param pagination
  283. * @return
  284. */
  285. List<UserEntity> getUserName(List<String> id, Pagination pagination);
  286. /**
  287. * 候选人分页查询
  288. *
  289. * @param id
  290. * @param pagination
  291. * @param flag 是否过滤自己
  292. * @return
  293. */
  294. List<UserEntity> getUserNames(List<String> id, PaginationUser pagination, Boolean flag, Boolean enabledMark);
  295. /**
  296. * 根据角色ID获取所在组织下的所有成员
  297. *
  298. * @param roleId 角色ID
  299. * @return
  300. */
  301. List<UserEntity> getListByRoleId(String roleId);
  302. /**
  303. * 删除在线的角色用户
  304. */
  305. Boolean delCurRoleUser(String message, List<String> objectIdAll);
  306. /**
  307. * 获取用户信息
  308. *
  309. * @param orgIdList
  310. * @param keyword
  311. * @return
  312. */
  313. List<UserEntity> getList(List<String> orgIdList, String keyword);
  314. public List<UserEntity> getListBySyn(List<String> orgIdList, String keyword);
  315. /**
  316. * 得到用户关系
  317. *
  318. * @param userIds
  319. * @return
  320. */
  321. List<String> getUserIdList(List<String> userIds);
  322. /**
  323. * 得到用户关系
  324. *
  325. * @param userIds
  326. * @return
  327. */
  328. List<BaseInfoVo> getObjList(List<String> userIds, PaginationUser pagination);
  329. /**
  330. * 获取用户下拉框列表
  331. */
  332. List<UserByRoleVO> getListByAuthorize(String organizeId, Page page);
  333. /**
  334. * 查询给定的条件是否有默认当前登录者的默认用户值
  335. *
  336. * @param userConditionModel
  337. * @return
  338. */
  339. String getDefaultCurrentValueUserId(UserConditionModel userConditionModel);
  340. List<UserEntity> getListByRoleIds(List<String> roleIds);
  341. /**
  342. * 通过ids转换数据
  343. *
  344. * @param ids
  345. * @return
  346. */
  347. List<String> getFullNameByIds(List<String> ids);
  348. /**
  349. * 通过ids返回相应的数据
  350. *
  351. * @param ids
  352. * @return
  353. */
  354. List<BaseInfoVo> selectedByIds(List<String> ids);
  355. List<UserEntity> getUserAccount(List<String> ids);
  356. void updateStand(List<String> ids, int standing);
  357. /**
  358. * 删除在线用户(仅提示刷新)
  359. *
  360. * @param message
  361. * @param userIds 用户IDs
  362. * @return 执行结果
  363. */
  364. Boolean delCurUser(String message, List<String> userIds);
  365. /**
  366. * 切换身份刷新其他在线用户(仅提示刷新)
  367. *
  368. * @return 执行结果
  369. */
  370. void majorStandFreshUser();
  371. /**
  372. * 删除在线用户(强制下线)
  373. * 密码修改时用
  374. *
  375. * @param message
  376. * @param userIds 用户IDs
  377. * @return 执行结果
  378. */
  379. Boolean logoutUser(String message, List<String> userIds);
  380. /**
  381. * 根据用户id列表查询用户分页
  382. *
  383. * @return 执行结果
  384. */
  385. List<UserEntity> getPageByIds(RoleRelationPage pagination);
  386. /**
  387. * 获取用户组织角色等数据列表
  388. *
  389. * @param userId
  390. * @return
  391. */
  392. UserRelationIds getUserObjectIdList(String userId);
  393. Map<String, String> getSystemFieldValue(SystemParamModel model);
  394. }