示例#1
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;
 }
示例#2
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;
 }
示例#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;
 }
示例#4
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.jcin.cms.service.system.IUserService#select(com.jcin.cms.utils.Page)
  */
 @Override
 public Page select(Page page) {
   super.select(page);
   // setOrderByClause("SER_NO  asc , ORG_ID desc");
   UserCriteria userCriteria = new UserCriteria();
   userCriteria.setOrderByClause("id desc");
   userCriteria.setPage(page);
   @SuppressWarnings("rawtypes")
   List list = userMapper.selectByExample(userCriteria);
   page.setRows(list);
   int total = userMapper.countByExample(userCriteria);
   page.setTotal(total);
   return page;
 }
示例#5
0
 // @Override
 @Override
 public Page select(UserCriteria criteria) {
   Page page = new Page();
   if (null != criteria) {
     if (null != criteria.getPage()) {
       page = criteria.getPage();
     }
   }
   @SuppressWarnings("rawtypes")
   List list = userMapper.selectByExample(criteria);
   page.setRows(list);
   int total = userMapper.countByExample(criteria);
   page.setTotal(total);
   return page;
 }