From 76e9e8e05cbe7dafeba51a235386f20ebf986e25 Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期一, 27 十二月 2021 11:54:35 +0800
Subject: [PATCH] 违章记录
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java
index 4b104af..54e36f2 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java
@@ -41,9 +41,17 @@
@RequestMapping(value = "/getAll", method = RequestMethod.GET)
@ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁")
- public Result<List<Alarm>> getAll() {
+ public Result<List<Alarm>> getAll(String carId) {
- List<Alarm> list = iAlarmService.list();
+ QueryWrapper<Alarm> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("flag",0);
+ queryWrapper.eq("car_id",carId);
+ List<Alarm> list = iAlarmService.list(queryWrapper);
+
+ for(Alarm a:list){
+ a.setFlag(1);
+ iAlarmService.saveOrUpdate(a);
+ }
return new ResultUtil<List<Alarm>>().setData(list);
}
--
Gitblit v1.9.1