@RequestMapping("/thumb/rebuild/count") @ResponseBody public long thumbNeedRebuildCount() { long drinksCount = drinksService.count(); long foodCount = foodService.count(); long restaurantCount = restaurantService.count(); return foodCount + drinksCount + restaurantCount; }
@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; }