package xiaozhi.modules.task.controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import xiaozhi.common.utils.Result; import xiaozhi.modules.parent.service.ParentTaskService; import xiaozhi.modules.task.dto.LessonSyncDTO; @Tag(name = "Lesson Sync") @RestController @RequestMapping("/task/lesson-sync") @RequiredArgsConstructor public class LessonSyncController { private final ParentTaskService parentTaskService; @Operation(summary = "xiaozhi-server 请求向设备一次性同步课文 MP3") @PostMapping public Result sync(@RequestBody LessonSyncDTO body) { parentTaskService.syncLessonFromServer(body); return new Result().ok(Boolean.TRUE); } }