예제 #1
0
 /**
  * 添加或修改数据
  *
  * @param entity
  * @param request
  * @return
  * @throws Exception
  */
 @RequestMapping(value = "/save", method = RequestMethod.POST)
 @ResponseBody
 public Object save(@RequestBody RefundLogEntity entity, HttpServletRequest request)
     throws Exception {
   Date date = new Date();
   if (entity.getId() == null || StringUtils.isBlank(entity.getId().toString())) {
     entity.setCreateDate(date);
     entity.setModifyDate(date);
     refundLogService.add(entity);
   } else {
     entity.setModifyDate(date);
     refundLogService.update(entity);
   }
   return sendSuccessMessage();
 }
예제 #2
0
 /**
  * 列表数据
  *
  * @param entity
  * @param request
  * @return
  * @throws Exception
  */
 @RequestMapping("/dataList")
 @ResponseBody
 public Object datalist(RefundLogEntity entity, HttpServletRequest request) throws Exception {
   List<RefundLogEntity> dataList = refundLogService.queryByList(entity);
   return returnDataGrid(entity.getPager().getRowCount(), dataList);
 }