UserService.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package com.jsh.erp.service;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.baomidou.mybatisplus.extension.service.IService;
  5. import com.jsh.erp.datasource.entities.Role;
  6. import com.jsh.erp.datasource.entities.User;
  7. import com.jsh.erp.datasource.entities.UserEx;
  8. import com.jsh.erp.datasource.vo.SpinnerVO;
  9. import com.jsh.erp.datasource.vo.TreeNodeEx;
  10. import org.springframework.transaction.annotation.Transactional;
  11. import javax.servlet.http.HttpServletRequest;
  12. import java.util.List;
  13. import java.util.Map;
  14. public interface UserService extends IService<User> {
  15. User getUser(long id)throws Exception;
  16. /**
  17. * 生成用户下拉框
  18. * @return
  19. */
  20. List<SpinnerVO> creatorSpinnerList();
  21. List<User> getUserListByIds(String ids)throws Exception;
  22. List<User> getUser(HttpServletRequest request) throws Exception;
  23. List<UserEx> select(String userName, String loginName)throws Exception;
  24. Long countUser(String userName, String loginName)throws Exception;
  25. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  26. int insertUser(JSONObject obj, HttpServletRequest request)throws Exception;
  27. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  28. int updateUser(JSONObject obj, HttpServletRequest request) throws Exception;
  29. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  30. int updateUserByObj(User user) throws Exception;
  31. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  32. int resetPwd(String md5Pwd, Long id) throws Exception;
  33. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  34. int deleteUser(Long id, HttpServletRequest request)throws Exception;
  35. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  36. int batchDeleteUser(String ids, HttpServletRequest request)throws Exception;
  37. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  38. int batDeleteUser(String ids) throws Exception;
  39. void validateCaptcha(String code, String uuid);
  40. Map<String, Object> login(String loginName, String password, HttpServletRequest request) throws Exception;
  41. int validateUser(String loginName, String password) throws Exception;
  42. User getUserByLoginName(String loginName)throws Exception;
  43. int checkIsNameExist(Long id, String name)throws Exception;
  44. User getCurrentUser()throws Exception;
  45. Long getIdByLoginName(String loginName);
  46. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  47. void addUserAndOrgUserRel(UserEx ue, HttpServletRequest request) throws Exception;
  48. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  49. UserEx addUser(UserEx ue) throws Exception;
  50. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  51. void registerUser(UserEx ue, Integer manageRoleId, HttpServletRequest request) throws Exception;
  52. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  53. void updateUserTenant(User user) throws Exception;
  54. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  55. void updateUserAndOrgUserRel(UserEx ue, HttpServletRequest request) throws Exception;
  56. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  57. UserEx updateUser(UserEx ue)throws Exception;
  58. void checkLoginName(UserEx userEx)throws Exception;
  59. List<User> getUserListByloginName(String loginName);
  60. List<TreeNodeEx> getOrganizationUserTree()throws Exception;
  61. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  62. Role getRoleTypeByUserId(long userId) throws Exception;
  63. Long getUserId(HttpServletRequest request) throws Exception;
  64. JSONArray getBtnStrArrById(Long userId) throws Exception;
  65. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  66. int batchSetStatus(Byte status, String ids, HttpServletRequest request)throws Exception;
  67. User getUserByWeixinCode(String weixinCode) throws Exception;
  68. int weixinBind(String loginName, String password, String weixinCode) throws Exception;
  69. }