public Integer deleteByKeys(List<Integer> idList) {
   try {
     return userDao.deleteByKeys(idList);
   } catch (SQLException e) {
     log.error("dao deleteByKeys error. s:" + e.getMessage(), e);
   }
   return -1;
 }
 /**
  * 根据主键更新
  *
  * @return
  */
 public Integer updateUserByKey(User User) {
   try {
     return userDao.updateUserByKey(User);
   } catch (SQLException e) {
     log.error("dao updateUser error.User:" + e.getMessage(), e);
   }
   return -1;
 }
 /**
  * 根据主键删除
  *
  * @return
  */
 public Integer deleteByKey(Integer id) {
   try {
     return userDao.deleteByKey(id);
   } catch (SQLException e) {
     log.error("dao deleteByKey error. :" + e.getMessage(), e);
   }
   return -1;
 }
 /**
  * 插入数据库
  *
  * @return
  */
 public Integer addUser(User user) {
   try {
     return userDao.addUser(user);
   } catch (SQLException e) {
     log.error("dao addUser error.:" + e.getMessage(), e);
   }
   return 0;
 }
 @Transactional(readOnly = true)
 public List<User> getUserByKeys(List<Integer> idList) {
   try {
     return userDao.getUserByKeys(idList);
   } catch (SQLException e) {
     log.error("dao getUsersByKeys erorr." + e.getMessage(), e);
   }
   return null;
 }
 /** 根据主键查找 */
 @Transactional(readOnly = true)
 public User getUserByKey(Integer id) {
   try {
     return userDao.getUserByKey(id);
   } catch (SQLException e) {
     log.error("dao getUserbyKey error.:" + e.getMessage(), e);
   }
   return null;
 }
 @Transactional(readOnly = true)
 public List<User> getUserList(UserQuery UserQuery) {
   try {
     return userDao.getUserList(UserQuery);
   } catch (SQLException e) {
     log.error("get User list error." + e.getMessage(), e);
   }
   return Collections.emptyList();
 }
  @Transactional(readOnly = true)
  public Pagination getUserListWithPage(UserQuery UserQuery) {
    try {
      return userDao.getUserListWithPage(UserQuery);
    } catch (Exception e) {
      log.error("get User pagination error." + e.getMessage(), e);
    }

    return new Pagination();
  }