@Override
 public long getTotal(String keyword) throws DaoException {
   try {
     DetachedCriteria criteria = DetachedCriteria.forClass(ExternalApp.class);
     if (StringUtils.isNotEmpty(keyword)) {
       AbstractRestriction ar = new LikeRestriction("appName", keyword);
       criteria.add(ar.getCriterion());
     }
     return externalAppDao.queryCount(criteria);
   } catch (Exception e) {
     LogUtil.error(this, "ExternalAppServiceImpl.getTotal error", e);
     throw new DaoException(e);
   }
 }
 @Override
 public List<ExternalApp> getExternalAppByPage(int pageIndex, int pageSize, String keyword)
     throws DaoException {
   try {
     DetachedCriteria criteria = DetachedCriteria.forClass(ExternalApp.class);
     if (StringUtils.isNotEmpty(keyword)) {
       AbstractRestriction ar = new LikeRestriction("appName", keyword);
       criteria.add(ar.getCriterion());
     }
     return externalAppDao.queryByCriteria(criteria, pageIndex, pageSize);
   } catch (Exception e) {
     LogUtil.error(this, "ExternalAppServiceImpl.getByPage error", e);
     throw new DaoException(e);
   }
 }