コード例 #1
0
 @RequestMapping("/thumb/rebuild/count")
 @ResponseBody
 public long thumbNeedRebuildCount() {
   long drinksCount = drinksService.count();
   long foodCount = foodService.count();
   long restaurantCount = restaurantService.count();
   return foodCount + drinksCount + restaurantCount;
 }
コード例 #2
0
 @ResponseBody
 @RequestMapping("/thumb/rebuild")
 public ResultCode thumbRebuild() {
   try {
     foodService.rebuildThumb(
         appConfigContext.getStorePath(), appConfigContext.getGraphicsMagickHome());
     drinksService.rebuildThumb(
         appConfigContext.getStorePath(), appConfigContext.getGraphicsMagickHome());
     restaurantService.rebuildThumb(
         appConfigContext.getStorePath(), appConfigContext.getGraphicsMagickHome());
   } catch (Exception e) {
     e.printStackTrace();
     return ResultCode.Faild;
   }
   return ResultCode.OK;
 }