コード例 #1
0
 @RequestMapping(value = "deleteAll", method = RequestMethod.POST)
 public Response deleteAll(@RequestBody MyOrderReq myOrderReq) {
   try {
     messageReceiverService.deleteAll(myOrderReq);
     return Response.buildSuccess(null, "删除成功");
   } catch (Exception e) {
     return Response.getError("请求失败");
   }
 }
コード例 #2
0
 @RequestMapping(value = "batchDelete", method = RequestMethod.POST)
 public Response batchDelete(@RequestBody MyOrderReq myOrderReq) {
   try {
     messageReceiverService.batchDelete(myOrderReq);
     return Response.buildSuccess(null, "删除成功");
   } catch (Exception e) {
     logger.debug("根据ids[]批量删除我的消息出错" + e);
     return Response.getError("请求失败");
   }
 }
コード例 #3
0
 @RequestMapping(value = "getAll", method = RequestMethod.POST)
 public Response getAll(@RequestBody MyOrderReq myOrderReq) {
   //        try{
   Page<Object> mrs = messageReceiverService.findAll(myOrderReq);
   return Response.getSuccess(mrs);
   //        }catch(NullPointerException e){
   //            return Response.buildErrorWithMissing();
   //        }catch(Exception e){
   //            logger.debug("获取我的消息列表出错"+e);
   //            return Response.getError("请求失败");
   //        }
 }
コード例 #4
0
 @RequestMapping(value = "deleteById", method = RequestMethod.POST)
 public Response deleteById(@RequestBody MyOrderReq myOrderReq) {
   try {
     if (null == myOrderReq.getCustomer_id() || null == myOrderReq.getId()) {
       return Response.buildErrorWithMissing();
     }
     messageReceiverService.delete(myOrderReq);
     return Response.buildSuccess(null, "删除成功");
   } catch (Exception e) {
     logger.debug("根据id删除我的消息出错" + e);
     return Response.getError("请求失败");
   }
 }
コード例 #5
0
 @RequestMapping(value = "getById", method = RequestMethod.POST)
 public Response getById(@RequestBody MyOrderReq myOrderReq) {
   try {
     SysMessage sysMessage = messageReceiverService.findById(myOrderReq);
     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     Map<String, String> map = new HashMap<String, String>();
     map.put("id", sysMessage.getId().toString());
     map.put("title", sysMessage.getTitle());
     map.put("create_at", sdf.format(sysMessage.getCreatedAt()));
     map.put("content", sysMessage.getContent());
     return Response.getSuccess(map);
   } catch (NullPointerException e) {
     return Response.buildErrorWithMissing();
   } catch (Exception e) {
     logger.debug("获取我的消息详情出错" + e);
     return Response.getError("请求失败");
   }
 }
コード例 #6
0
 @RequestMapping(value = "getServerDynamic", method = RequestMethod.POST)
 public Response getServerDynamic(@RequestBody MyOrderReq myOrderReq) {
   List<Map<String, Object>> ts = messageReceiverService.getServerDynamic(myOrderReq);
   Response rs = Response.buildSuccess(ts, "");
   return rs;
 }