wang-hao-jie
2021-12-03 44c3ba36f865bfff08047a2f265a4e63cb6705da
违章记录
2个文件已修改
15 ■■■■ 已修改文件
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AlarmController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Alarm.java
@@ -43,4 +43,7 @@
    @ApiModelProperty(value = "跟随人id")
    private String followUserId;
    @ApiModelProperty(value = "是否被调用 0:否  1:是")
    private int flag;
}