代码调整

This commit is contained in:
tiger_zhou 2023-09-12 15:56:58 +08:00
parent b59f3fa369
commit becec2764c

View File

@ -16,6 +16,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List; import java.util.List;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -73,11 +75,11 @@ public class AlertRecordController {
} }
@GetMapping("/report/{lineId}") @PostMapping("/report/{lineId}")
@SecurityRequirement(name = "jwt") @SecurityRequirement(name = "jwt")
@Operation(summary = "报警统计") @Operation(summary = "报警统计")
@ApiResponse(description = "报警统计") @ApiResponse(description = "报警统计")
public List<AlertRecordReportResponseDTO> reportStatistics(@PathVariable("lineId") Integer lineId, AlertRecordReportDTO reportDTO) { public List<AlertRecordReportResponseDTO> reportStatistics(@PathVariable("lineId") Integer lineId, @RequestBody AlertRecordReportDTO reportDTO) {
return this.alertRecordService.report(lineId, reportDTO); return this.alertRecordService.report(lineId, reportDTO);
} }
} }