fix: 修复下载excel接口入参问题

This commit is contained in:
liu.zixi
2025-11-25 12:09:32 +08:00
parent fceb6ac805
commit dd0e10539f

View File

@@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletResponse;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
@@ -105,8 +106,9 @@ public class CaseAiChatApi extends ApiBaseController {
public void downloadConversationExcel(@RequestParam String startTime,
@RequestParam String endTime,
HttpServletResponse response) {
LocalDate startDate = LocalDate.parse(startTime);
LocalDate endDate = LocalDate.parse(endTime);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate startDate = LocalDate.parse(startTime, formatter);
LocalDate endDate = LocalDate.parse(endTime, formatter);
caseAiChatService.getConversationExcel(startDate.atStartOfDay(), endDate.atTime(23, 59, 59), response);
}