wang-hao-jie
2022-03-17 6dfd2599d2e52507e018fd4c6b35d38873e48cfb
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
@@ -84,6 +84,12 @@
    @RequestMapping(value = "/updateMileage", method = RequestMethod.POST)
    @ApiOperation(value = "添加行车记录")
    public Result<DrivingRecord> updateMileage(String carId,int mileage,String userId,String inDate) {
        if(StrUtil.isEmpty(userId)){
            return ResultUtil.error("参数不完整");
        }
        if(StrUtil.isEmpty(carId)){
            return ResultUtil.error("参数不完整");
        }
        String format = DateUtil.format(new Date(), "yyyy-MM-dd");
        QueryWrapper<DrivingRecord> wrapper = new QueryWrapper<>();
        wrapper.eq("driving_date",format);