Package com.eatle.persistent.pojo.merchant

Examples of com.eatle.persistent.pojo.merchant.Restaurant


  private static IRestaurantService restaurantService = (IRestaurantService) ctx.getBean("restaurantService");

  @Test
  public void test()
  {
    Restaurant r = new Restaurant();
    r.setName("肯德基观音桥分店");
    r.setAddress("江北区观音桥北城天街");

    System.out.println(restaurantService.add(r));

    System.out.println(restaurantService.findAll().size());
  }
View Full Code Here


  }

  @Override
  public Restaurant findById(long id)
  {
    Restaurant restaurant = restaurantMapper.selectByPrimaryKey(id);
    // 设置主营类型
    restaurant.setShopTypeStr(shopTypeService.
        findByIdentify(restaurant.getShopType()).getTypeName());
    // 设置所属商家
    restaurant.setMerchantName(merchantService.
        findById(restaurant.getMerchantId()).getMerchantName());
    return restaurant;
  }
View Full Code Here

          // 保存文件
          String saveName = ServletActionContext.getServletContext()
              .getRealPath(path) + File.separator + uuidName;
          ImageUtil.thumbnails(logo[i], new File(saveName), 70);
          // 更新餐厅LogoUrl
          Restaurant restaurant = restaurantService.findById(id);
          String oldLogoPath = ServletActionContext.getServletContext()
              .getRealPath(restaurant.getLogoUrl());
          File oldLogoFile = new File(oldLogoPath == null ? "" : oldLogoPath);
          if (oldLogoFile.exists())
          {
            oldLogoFile.delete();
          }
          restaurant.setLogoUrl(path + "/" + uuidName);
          restaurantService.update(restaurant);
        }
      }
      else
      {
View Full Code Here

TOP

Related Classes of com.eatle.persistent.pojo.merchant.Restaurant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.