/**
  * 查询店铺授权
  *
  * @param shopAuth
  * @return
  */
 @Transactional(readOnly = true)
 public List<ShopAuth> getShopAuth(ShopAuth shopAuth) {
   if (logger.isInfoEnabled()) {
     logger.info("getShop方法参数为shop[{}]", shopAuth);
   }
   Search search = new Search(ShopAuth.class);
   if (shopAuth != null) {
     if (!NumberUtil.isNullOrZero(shopAuth.getId())) {
       search.addFilterEqual("id", shopAuth.getId());
     }
   }
   search.addFilterEqual("isDelete", false);
   return generalDAO.search(search);
 }
  /**
   * 根据条件查询唯一的授权信息
   *
   * @param shopAuth
   * @return
   */
  public ShopAuth getShopAuthByCondition(ShopAuth shopAuth) {
    if (logger.isInfoEnabled()) {
      logger.info("getShop方法参数为shop[{}]", shopAuth);
    }
    Search search = new Search(ShopAuth.class);
    if (shopAuth != null) {
      if (!NumberUtil.isNullOrZero(shopAuth.getId())) {
        search.addFilterEqual("id", shopAuth.getId());
      }
    }
    search.addFilterEqual("isDelete", false);

    List<ShopAuth> shopAuthList = generalDAO.search(search);
    return CollectionUtils.isNotEmpty(shopAuthList) ? shopAuthList.get(0) : null;
  }