From 6dfd2599d2e52507e018fd4c6b35d38873e48cfb Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期四, 17 三月 2022 15:52:51 +0800
Subject: [PATCH] 最新版本
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
index d7453ef..569d7af 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/DrivingRecordController.java
+++ b/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);
--
Gitblit v1.9.1