From e8a0f05f99f33fa05085536541da6bc27e66a644 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期五, 14 四月 2023 14:57:55 +0800 Subject: [PATCH] bug修改 --- ycl-common/src/main/java/com/ycl/controller/FileController.java | 1 + ycl-platform/src/main/java/com/ycl/controller/platformApi/AlarmController.java | 3 ++- ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ycl-common/src/main/java/com/ycl/controller/FileController.java b/ycl-common/src/main/java/com/ycl/controller/FileController.java index 3a78fd1..6f4c2f7 100644 --- a/ycl-common/src/main/java/com/ycl/controller/FileController.java +++ b/ycl-common/src/main/java/com/ycl/controller/FileController.java @@ -61,6 +61,7 @@ @PostMapping("/medias") public CommonResult<String> uploadImages(MultipartFile file) { String url = ossService.uploadImages(file); + // String url = "https://xshcs.com/img/ercode.7a421889.png?v=1"; return CommonResult.success(url, "ok"); } diff --git a/ycl-platform/src/main/java/com/ycl/controller/platformApi/AlarmController.java b/ycl-platform/src/main/java/com/ycl/controller/platformApi/AlarmController.java index 5abc6b7..35b62d9 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/platformApi/AlarmController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/platformApi/AlarmController.java @@ -72,7 +72,8 @@ // @GetMapping(value = "/img") @ResponseBody public byte[] getImages(HttpServletRequest request, HttpServletResponse response, - @RequestParam String fileUrl, @RequestParam String OSSAccessKeyId, @RequestParam String Signature) { + @RequestParam String fileUrl, @RequestParam(required = false) String OSSAccessKeyId, + @RequestParam(required = false) String Signature) { String sessionId = request.getSession().getId(); sessionDic.put(sessionId, 0); return getBytes(fileUrl, OSSAccessKeyId, Signature, sessionId); diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java index 8794a56..5f0476c 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java +++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ycl.common.util.UtilNumber; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.entity.caseHandler.EventSource; import com.ycl.entity.caseHandler.QuestionCategory; @@ -43,6 +44,9 @@ BaseCaseMapper baseCaseMapper; @Autowired + UtilNumber utilNumber; + + @Autowired public void setVideoPointService(IVideoPointService videoPointService) { this.videoPointService = videoPointService; } @@ -69,7 +73,7 @@ videoPoint = pointList.get(0); } BaseCase baseCase = BaseCase.builder().eventSource(EventSource.VIDEO.getCode()).category(QuestionCategory.VIOLATION.getCode()) - .createTime(LocalDateTime.now()).createUser(0L).state(1).alarmTime(videoAlarmReport.getAlarmTime()).build(); + .code(utilNumber.createCaseCode()).createTime(LocalDateTime.now()).createUser(0L).state(1).alarmTime(videoAlarmReport.getAlarmTime()).build(); Violations violations = new Violations(); if (videoPoint != null) { baseCase.setLatitude(videoPoint.getLatitude()); -- Gitblit v1.8.0