| | |
| | | public Result<MenuMapping> get(@PathVariable String id, HttpServletRequest request) { |
| | | return menuMappingService.getMapping(request.getSession(),id); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add", method = RequestMethod.POST) |
| | | public Result<Object> insert(@RequestParam String data, HttpServletRequest request) { |
| | | HttpSession session = request.getSession(); |
| | | boolean inserted =menuMappingService.create(data, session); |
| | | if (inserted) { |
| | | return Result.success("插入成功", null); |
| | | MenuMapping inserted = menuMappingService.create(data, session); |
| | | if (inserted != null) { |
| | | return Result.success(inserted); |
| | | } else { |
| | | return Result.error(CodeMsg.INSERT_ERROR); |
| | | } |