| | |
| | | |
| | | @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); |
| | | } |
| | | |