Esempio n. 1
0
 public long count(AdminAccountQuery query) {
   AdminAccountExample example = new AdminAccountExample();
   Criteria criteria = example.createCriteria();
   criteria.andStatEqualTo(DataStatus.ENABLED);
   if (StringUtils.isNotEmpty(query.getAccountCode())) {
     criteria.andUserNameEqualTo(query.getAccountCode());
   }
   if (StringUtils.isNotEmpty(query.getRoleId())) {
     criteria.andRoleIdEqualTo(query.getRoleId());
   }
   return mapper.countByExample(example);
 }
Esempio n. 2
0
 public long countAll() {
   AdminAccountExample example = new AdminAccountExample();
   Criteria criteria = example.createCriteria();
   criteria.andStatEqualTo(DataStatus.ENABLED);
   return mapper.countByExample(example);
 }