コード例 #1
0
 @RequestMapping(value = "/delete", method = RequestMethod.POST)
 public @ResponseBody String deleteMany(Long[] ids) {
   evenName = "站内信删除";
   AjaxObject ajaxObject = new AjaxObject(evenName + "成功!");
   try {
     for (Long l : ids) {
       siteMessageService.delete(l);
     }
   } catch (Exception e) {
     ajaxObject = new AjaxObject(evenName + "失败!");
   }
   // 记录日志
   LogUitl.putArgs(LogMessageObject.newWrite().setObjects(new Object[] {Arrays.toString(ids)}));
   ajaxObject.setCallbackType("");
   return ajaxObject.toString();
 }
コード例 #2
0
  @Log(message = "删除了transRecord,ids:{0}。")
  @RequestMapping(value = "/delete", method = RequestMethod.POST)
  public @ResponseBody String deleteMany(Long[] ids) {
    evenName = "transRecord删除";
    AjaxObject ajaxObject = new AjaxObject(evenName + "成功!");
    String[] transRecordTypes = new String[ids.length];
    for (int i = 0; i < ids.length; i++) {
      BizTransRecord transRecord = transRecordService.get(ids[i]);
      transRecordService.delete(transRecord.getId());

      transRecordTypes[i] = transRecord.getId().toString();
    }
    // 记录日志
    LogUitl.putArgs(
        LogMessageObject.newWrite().setObjects(new Object[] {Arrays.toString(transRecordTypes)}));
    ajaxObject.setCallbackType("");
    return ajaxObject.toString();
  }