| | |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); |
| | | QueryWrapper<Task> wrapper = pageParam.buildWrapper(true); |
| | | QueryWrapper<Task> wrapper = pageParam.buildWrapper(true, "io_time"); |
| | | if (hasCreateTimeDesc(pageParam.getOrders())) { |
| | | wrapper.last(businessSortService.getOrderBySql(TaskStsType.class, "task_sts")); |
| | | } |
| | |
| | | ExcelUtil.build(ExcelUtil.create(taskService.list(), Task.class), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @OperationLog("Complete Task") |
| | | @GetMapping("/task/complete/{id}") |
| | | public R complete(@PathVariable Long id) { |
| | | return taskService.complete(id, getLoginUserId()) ? R.ok("Complete Success") : R.error("Complete Fail"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @OperationLog("Cancel Task") |
| | | @GetMapping("/task/cancel/{id}") |
| | | public R cancel(@PathVariable Long id) { |
| | | return taskService.cancel(id, getLoginUserId()) ? R.ok("Cancel Success") : R.error("Cancel Fail"); |
| | | } |
| | | |
| | | |
| | | } |