From 207d2721496c48d916a4c1ec2ea0eca577e650dd Mon Sep 17 00:00:00 2001 From: yingsl Date: Fri, 7 Jan 2022 10:42:07 +0800 Subject: [PATCH] =?UTF-8?q?perf=20=E5=BC=80=E5=8F=91=E5=85=AC=E5=8E=95?= =?UTF-8?q?=E7=94=A8=E7=94=B5=E7=94=A8=E6=B0=B4=E8=AE=BE=E5=A4=87=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/modular/api/controller/DeviceDataPushController.java | 5 ++--- .../java/com/example/modular/api/service/DeviceDataPushService.java | 4 ++-- .../example/modular/api/service/impl/DeviceDataPushServiceImpl.java | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/example/modular/api/controller/DeviceDataPushController.java b/src/main/java/com/example/modular/api/controller/DeviceDataPushController.java index 7feae0c..2f53266 100644 --- a/src/main/java/com/example/modular/api/controller/DeviceDataPushController.java +++ b/src/main/java/com/example/modular/api/controller/DeviceDataPushController.java @@ -1,7 +1,6 @@ package com.example.modular.api.controller; import com.example.modular.api.service.DeviceDataPushService; -import com.example.util.Result; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -34,7 +33,7 @@ public class DeviceDataPushController { public String deviceWaterSave (@RequestParam(value = "base64",required = false)String base64, @RequestParam(value = "imgUrl",required = false)String imgUrl, @RequestParam(value = "devId",required = false)String devId, - @RequestParam(value = "devVol",required = false)Integer devVol, + @RequestParam(value = "devVol",required = false)String devVol, @RequestParam(value = "isPointerMeter",required = false,defaultValue = "false")boolean isPointerMeter, @RequestParam(value = "createTime",required = false)String createTime, @RequestParam(value = "result",required = false)String result) { @@ -59,7 +58,7 @@ public class DeviceDataPushController { public String deviceElectricitySave (@RequestParam(value = "base64",required = false)String base64, @RequestParam(value = "imgUrl",required = false)String imgUrl, @RequestParam(value = "devId",required = false)String devId, - @RequestParam(value = "devVol",required = false)Integer devVol, + @RequestParam(value = "devVol",required = false)String devVol, @RequestParam(value = "isPointerMeter",required = false,defaultValue = "false")boolean isPointerMeter, @RequestParam(value = "createTime",required = false)String createTime, @RequestParam(value = "result",required = false)String result) { diff --git a/src/main/java/com/example/modular/api/service/DeviceDataPushService.java b/src/main/java/com/example/modular/api/service/DeviceDataPushService.java index 878c730..502c65e 100644 --- a/src/main/java/com/example/modular/api/service/DeviceDataPushService.java +++ b/src/main/java/com/example/modular/api/service/DeviceDataPushService.java @@ -21,7 +21,7 @@ public interface DeviceDataPushService { * @return * @author ysl */ - String deviceWaterSave(String base64,String imgUrl,String devId,Integer devVol,boolean isPointerMeter,String createTime,String result); + String deviceWaterSave(String base64,String imgUrl,String devId,String devVol,boolean isPointerMeter,String createTime,String result); /** @@ -36,5 +36,5 @@ public interface DeviceDataPushService { * @return * @author ysl */ - String deviceElectricitySave(String base64,String imgUrl,String devId,Integer devVol,boolean isPointerMeter,String createTime,String result); + String deviceElectricitySave(String base64,String imgUrl,String devId,String devVol,boolean isPointerMeter,String createTime,String result); } diff --git a/src/main/java/com/example/modular/api/service/impl/DeviceDataPushServiceImpl.java b/src/main/java/com/example/modular/api/service/impl/DeviceDataPushServiceImpl.java index 34a5028..cae2aa2 100644 --- a/src/main/java/com/example/modular/api/service/impl/DeviceDataPushServiceImpl.java +++ b/src/main/java/com/example/modular/api/service/impl/DeviceDataPushServiceImpl.java @@ -43,7 +43,7 @@ public class DeviceDataPushServiceImpl implements DeviceDataPushService { private IToiletElectricityConsumptionService toiletElectricityConsumptionService; @Override - public String deviceWaterSave(String base64, String imgUrl, String devId, Integer devVol, boolean isPointerMeter, String createTime, String result) { + public String deviceWaterSave(String base64, String imgUrl, String devId, String devVol, boolean isPointerMeter, String createTime, String result) { //校验参数是否正确 if (StringUtils.isBlank(devId) || StringUtils.isBlank(createTime) || StringUtils.isBlank(result)) { return "PARAMS ERROR"; @@ -118,7 +118,7 @@ public class DeviceDataPushServiceImpl implements DeviceDataPushService { } @Override - public String deviceElectricitySave(String base64, String imgUrl, String devId, Integer devVol, boolean isPointerMeter, String createTime, String result) { + public String deviceElectricitySave(String base64, String imgUrl, String devId, String devVol, boolean isPointerMeter, String createTime, String result) { //校验参数是否正确 if (StringUtils.isBlank(devId) || StringUtils.isBlank(createTime) || StringUtils.isBlank(result)) { return "PARAMS ERROR";