13ad001ae702dbaada812c1e8c9158826d2a05d2.svn-base 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package cn.com.goldenwater.dcproj.service;
  2. import cn.com.goldenwater.core.service.CrudService;
  3. import cn.com.goldenwater.dcproj.dto.UserDto;
  4. import cn.com.goldenwater.dcproj.model.User;
  5. import cn.com.goldenwater.dcproj.param.UserParam;
  6. import cn.com.goldenwater.dcproj.param.UserRoleParam;
  7. import cn.com.goldenwater.dcproj.util.PageListResult;
  8. import com.github.pagehelper.PageInfo;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * @author lune
  13. * @date 2018-2-13
  14. */
  15. public interface UserService extends CrudService<User, UserParam> {
  16. // ------------------------- 自定方法 -------------------------
  17. /**
  18. * 获取当前用户
  19. *
  20. * @return
  21. */
  22. public User getUser();
  23. /**
  24. * 根据用户登录名查询用户信息
  25. *
  26. * @param loginName
  27. * @return
  28. */
  29. public User getByLoginName(String loginName);
  30. /**
  31. * 通过部门ID获取用户列表,仅返回用户id和name(树查询用户时用)
  32. *
  33. * @param officeId
  34. * @return
  35. */
  36. public List<User> findUserByOfficeId(String officeId);
  37. /**
  38. * 根据用户ID查询用户(级联:机构、角色、岗位)
  39. *
  40. * @param id
  41. * @return
  42. */
  43. public UserDto getCascade(String id);
  44. /**
  45. * 根据手机短信登陆系统
  46. *
  47. * @param userMobile
  48. * @param sms
  49. * @param src
  50. * @return
  51. */
  52. public UserDto loginBySms(String userMobile, String sms, String src);
  53. /**
  54. * 分页获取用户列表-不包含分页信息
  55. * @param param
  56. * @return
  57. */
  58. public List<UserDto> findPageDto(UserParam param);
  59. /**
  60. * 分页获取用户列表-包含分页信息
  61. * @param param
  62. * @return
  63. */
  64. public PageInfo<UserDto> findPageInfoDto(UserParam param);
  65. /**
  66. * 分页获取用户列表-包含分页信息
  67. * @param param
  68. * @return
  69. */
  70. public PageListResult<UserDto> findPageInfoList(UserParam param);
  71. /**
  72. * 新增用户,并且关联角色
  73. * @param user
  74. * @param list
  75. */
  76. void insertUser(User user, List<UserRoleParam> list, UserRoleParam param);
  77. /**
  78. * 更新用户,并且关联角色
  79. * @param user
  80. * @param list
  81. */
  82. void updateUser(User user, List<UserRoleParam> list, UserRoleParam param);
  83. /**
  84. * 修改密码
  85. *
  86. * @param id
  87. * @param password
  88. * @param newPassword
  89. * @return
  90. */
  91. public int changePassword(String id, String password, String newPassword);
  92. Map<String, Object> login(String userCode, String userPwd) throws Exception;
  93. }