예제 #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);
 }