Ejemplo n.º 1
0
 @RequiresPermissions("ClassifyInfo:edit")
 @RequestMapping(value = "/update/{id}", method = RequestMethod.GET)
 public String preUpdate(@PathVariable Long id, Map<String, Object> map) {
   ClassifyInfo classifyInfo = classifyInfoService.get(id);
   map.put("classifyInfo", classifyInfo);
   mapPutCostsCategoriess(map);
   return UPDATE;
 }
Ejemplo n.º 2
0
 @ModelAttribute("preloadClassifyInfo")
 public ClassifyInfo preload(@RequestParam(value = "id", required = false) Long id) {
   if (id != null) {
     ClassifyInfo classifyInfo = classifyInfoService.get(id);
     return classifyInfo;
   }
   return null;
 }
Ejemplo n.º 3
0
 @RequiresPermissions("ClassifyInfo:view")
 @RequestMapping(
     value = "/view/{id}",
     method = {RequestMethod.GET})
 public String view(@PathVariable Long id, Map<String, Object> map) {
   ClassifyInfo classifyInfo = classifyInfoService.get(id);
   map.put("classifyInfo", classifyInfo);
   return VIEW;
 }
Ejemplo n.º 4
0
  @Log(message = "批量删除了id={0}。")
  @RequiresPermissions("ClassifyInfo:delete")
  @RequestMapping(value = "/delete", method = RequestMethod.POST)
  public @ResponseBody String deleteMany(Long[] ids) {
    for (int i = 0; i < ids.length; i++) {
      ClassifyInfo classifyInfo = classifyInfoService.get(ids[i]);
      classifyInfoService.delete(classifyInfo.getId());
    }

    LogUitls.putArgs(LogMessageObject.newWrite().setObjects(new Object[] {Arrays.toString(ids)}));
    return AjaxObject.newOk("删除成功!").setCallbackType("").toString();
  }