From 81af4cff627b7ec1e125b90f4fd57392c6d70588 Mon Sep 17 00:00:00 2001
From: wjli <591616088@qq.com>
Date: 星期三, 10 四月 2024 11:28:03 +0800
Subject: [PATCH] 修改签收出错bug
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
index d0fc4cc..be1df9b 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/face/FaceImgController.java
@@ -25,6 +25,8 @@
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.gson.Gson;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -43,6 +45,7 @@
import java.util.List;
//浜鸿劯姣斿妫�娴嬭溅鍘㈠紓甯稿紑鍚�
@RestController
+@Api(tags = "浜鸿劯姣斿妫�娴嬭溅鍘㈠紓甯稿紑鍚�")
@RequestMapping("/hk")
public class FaceImgController {
@@ -63,7 +66,7 @@
@Autowired
private IEventLogService iEventLogService;
-
+ @ApiOperation(value = "浜鸿劯瀵规瘮鍥剧墖")
@RequestMapping(value = "/faceImg", method = RequestMethod.POST)
public void saveOrUpdate(HttpServletRequest request) throws IOException, ServletException {
OssSetting os = new Gson().fromJson(settingService.get(SettingConstant.LOCAL_OSS).getValue(), OssSetting.class);
@@ -86,9 +89,13 @@
return;
}
- String format = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm");
+ Date date1 = new Date();
+ long time = date1.getTime()-2*60*1000;
+ Date date = new Date(time);
+ String format1 = DateUtil.format(date,"yyyy-MM-dd HH:mm:ss");
+ String format2 = DateUtil.format(date1,"yyyy-MM-dd HH:mm:ss");
QueryWrapper<Alarm> awrapper = new QueryWrapper<>();
- awrapper.between("create_time",format+"00",format+"59");
+ awrapper.between("create_time",format1,format2);
awrapper.eq("car_no",one.getCarNo());
awrapper.eq("type",5);
List<Alarm> list = iAlarmService.list(awrapper);
--
Gitblit v1.9.1