| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "MarkEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MarkEntity entity, HttpServletRequest req) { |
| | | try { |
| | |
| | | |
| | | int count = markService.insert(entity); |
| | | |
| | | return success(count); |
| | | return success(count, entity.getId()); |
| | | } catch (Exception ex) { |
| | | return fail(ex, -1); |
| | | } |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "MarkEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MarkEntity> list, HttpServletRequest req) { |
| | | try { |