| | |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Segment, BaseParam> pageParam = new PageParam<>(baseParam, Segment.class); |
| | | return R.ok().add(segmentService.page(pageParam, pageParam.buildWrapper(true))); |
| | | return R.ok().add(segmentService.page(pageParam, pageParam.buildWrapper(false, "update_time"))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:segment:list')") |
| | |
| | | ExcelUtil.build(ExcelUtil.create(segmentService.list(), Segment.class), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:segment:update')") |
| | | @OperationLog("Cancel Segment") |
| | | @GetMapping("/segment/cancel/{id}") |
| | | public R cancel(@PathVariable Long id) { |
| | | return segmentService.cancel(id, getLoginUserId()) ? R.ok("Cancel Success") : R.error("Cancel Fail"); |
| | | } |
| | | |
| | | } |