Пример #1
0
 @Override
 public void addAuthority(Authority authority) {
   int exist = userMapper.getPersonalAuthNum(authority.getUserId(), authority.getName());
   if (exist == 0) {
     userMapper.addAuth(authority);
   }
 }
Пример #2
0
 @Override
 public void addUser(User user) {
   try {
     userMapper.addUser(user);
   } catch (DuplicateKeyException e) {
     throw new OuterException(Status.CONFLICT, "EMAIL_OR_PHONE_CONFILICT");
   }
 }
Пример #3
0
 @Override
 public int findUserNumByCondition(User condition) {
   return userMapper.findUserNumByCondition(condition);
 }
Пример #4
0
 @Override
 public List<User> findUserListByCondition(User condition, int page) {
   int start = (page - 1) * PCpageSize;
   return userMapper.findUsersByCondition(condition, start, PCpageSize);
 }
Пример #5
0
 @Override
 public int findUserNumByPhone(String phone) {
   return userMapper.findUserNumByPhone(phone);
 }
Пример #6
0
 @Override
 public int findUserNumByEmail(String email) {
   return userMapper.findUserNumByEmail(email);
 }
Пример #7
0
 @Override
 public void updateUser(User user) {
   userMapper.updateUser(user);
 }
Пример #8
0
 @Override
 public int addUserByAdmin(User user) {
   return userMapper.addUserByAdmin(user);
 }
Пример #9
0
 @Override
 public User findUserByAccount(String email, String password) {
   User user = userMapper.findUserByAccount(email, password);
   return user;
 }
Пример #10
0
 @Override
 public int findUserNumByEmail(String email, int userId) {
   return userMapper.findUserNumByEmailExceptOne(userId, email);
 }
Пример #11
0
 @Override
 public int findUserNumByPhone(String phone, int userId) {
   return userMapper.findUserNumByPhoneExceptOne(userId, phone);
 }
Пример #12
0
 @Override
 public int updateUserDetail(User user) {
   return userMapper.updateUserDetail(user);
 }
Пример #13
0
 @Override
 public User getUserDetail(int userId) {
   return userMapper.getUserDetail(userId);
 }
Пример #14
0
 @Override
 public String getPersonalUsername(int userId) {
   return userMapper.getUserNameById(userId);
 }
Пример #15
0
 @Override
 public List<Authority> getPersonalAuths(int userId) {
   return userMapper.getPersonalAuth(userId);
 }
Пример #16
0
 @Override
 public void deleteAuthority(int authId) {
   userMapper.deleteAuth(authId);
 }