Example #1
0
 @Override
 public User findByUsername(String username) {
   UserCriteria userCriteria = new UserCriteria();
   userCriteria.createCriteria().andUsernameEqualTo(username);
   List<User> list = userMapper.selectByExample(userCriteria);
   return (null != list && list.size() > 0) ? list.get(0) : null;
 }
Example #2
0
 @Override
 public boolean checkUsernamePassword(String username, String password) {
   UserCriteria userCriteria = new UserCriteria();
   userCriteria.createCriteria().andUsernameEqualTo(username).andPasswordEqualTo(password);
   List<User> list = userMapper.selectByExample(userCriteria);
   return (null != list && list.size() > 0) ? true : false;
 }
Example #3
0
 /*
  * (non-Javadoc)
  *
  * @see com.jcin.cms.service.system.IUserService#deleteBatch(List)
  */
 @Override
 @Transactional(readOnly = false)
 public int deleteBatch(List<String> list) {
   UserCriteria userCriteria = new UserCriteria();
   userCriteria.createCriteria().andIdIn(list);
   int result = userMapper.deleteByExample(userCriteria);
   super.deleteBatch(list);
   return result;
 }