| | |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:query')") |
| | | @GetMapping("page") |
| | | public CommonResult<PageResult<DaPointRespVO>> page(@Valid DaPointPageReqVO reqVO){ |
| | | PageResult<DaPointEntity> page = daPointService.queryPage(reqVO); |
| | | return success(BeanUtils.toBean(page, DaPointRespVO.class)); |
| | | public CommonResult<PageResult<DaPointDTO>> page(@Valid DaPointPageReqVO reqVO){ |
| | | PageResult<DaPointDTO> page = daPointService.queryPage(reqVO); |
| | | return success(page); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:query')") |
| | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:create')") |
| | | @PostMapping("/add") |
| | | @PostMapping("create") |
| | | public CommonResult<Boolean> create(@RequestBody DaPointDTO daPointDTO){ |
| | | String id = UUID.randomUUID().toString(); |
| | | daPointDTO.setId(id); |
| | |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:delete')") |
| | | @DeleteMapping("/delete") |
| | | public CommonResult<Boolean> delete(String[] ids) { |
| | | daPointService.delete(ids); |
| | | public CommonResult<Boolean> delete(String id) { |
| | | daPointService.delete(new String[]{id}); |
| | | return success(true); |
| | | } |
| | | |