@RequestMapping public @ResponseBody JsonMessage get(@RequestParam("id") Long id) { JsonMessage message = new JsonMessage(); try { LocalTransaction lt = localTransactionManager.load(id); Map<String, Object> map = lt.toMap(null, null); message.setMessage(map); } catch (PlatformException e) { e.printStackTrace(); message.setSuccess(Boolean.FALSE); message.setMessage(e.getMessage()); } catch (Exception e) { e.printStackTrace(); message.setSuccess(Boolean.FALSE); message.setMessage(e.getMessage()); } return message; }
@RequestMapping public @ResponseBody JsonMessage checkCardOptFinish(HttpServletRequest request) { JsonMessage message = new JsonMessage(); try { String sessionId = ServletRequestUtils.getStringParameter(request, "sessionId"); boolean flag = localTransactionManager.checkCardOptFinish(sessionId); if (!flag) { message.setSuccess(flag); } } catch (PlatformException e) { e.printStackTrace(); message.setSuccess(Boolean.FALSE); message.setMessage(e.getMessage()); } catch (Exception e) { e.printStackTrace(); message.setSuccess(Boolean.FALSE); message.setMessage(e.getMessage()); } return message; }