| | |
| | | @Transactional |
| | | @Log(title = "老人户籍信息-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody TOldster entity) { |
| | | oldsterService.save(entity); |
| | | public R<Boolean> save(@RequestBody TOldster dto) { |
| | | oldsterService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "老人户籍信息-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody TOldster entity) { |
| | | oldsterService.updateById(entity); |
| | | public R<Boolean> edit(@RequestBody TOldster dto) { |
| | | oldsterService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除老人户籍信息 |
| | | */ |
| | | @Log(title = "老人户籍信息-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "老人户籍信息-删除") |
| | | @DeleteMapping(value = "/delete") |
| | | public R delete(@RequestParam String ids) { |
| | | List<Integer> res = Arrays.stream(ids.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | // 转换成Integer |
| | | oldsterService.removeBatchByIds(res); |
| | | return R.ok(); |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(oldsterService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除老人户籍信息 |
| | | */ |
| | | @Log(title = "老人户籍信息-批量删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "老人户籍信息-批量删除") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(oldsterService.removeByIds(ids)); |
| | | } |
| | | @ApiOperation(value = "导入模板下载") |
| | | @GetMapping("/import-template") |