refactor: 回忆改用独立存储与请求响应 DTO,服务按域拆包
This commit is contained in:
@@ -5,12 +5,15 @@ import com.guo.learningprogresstracker.entity.CommonResult;
|
||||
import com.guo.learningprogresstracker.exception.NotFindEntitiesException;
|
||||
import com.guo.learningprogresstracker.exception.OperationFailedException;
|
||||
import com.guo.learningprogresstracker.service.ExportService;
|
||||
import java.time.LocalDate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 数据导出控制层(导出-01):把学习报告、知识碎片与任务统计导出为 Markdown / JSON。
|
||||
@@ -29,8 +32,7 @@ public class ExportController {
|
||||
*/
|
||||
@GetMapping("/task/{taskNum}")
|
||||
public CommonResult<ExportResult> exportTask(
|
||||
@PathVariable String taskNum,
|
||||
@RequestParam(defaultValue = "markdown") String format)
|
||||
@PathVariable String taskNum, @RequestParam(defaultValue = "markdown") String format)
|
||||
throws NotFindEntitiesException, OperationFailedException {
|
||||
return CommonResult.success(exportService.exportTask(taskNum, format));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user