From 0200bf21e8c1e724b8dafc94a1ad71fca229fee7 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 06 一月 2025 11:13:54 +0800
Subject: [PATCH] 农户用水日、月、年统计SQL中的一个bug修改
---
pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V1/ComSupportP206V1.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V1/ComSupportP206V1.java b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V1/ComSupportP206V1.java
index 08de40a..7c82e02 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V1/ComSupportP206V1.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V1/ComSupportP206V1.java
@@ -4,6 +4,7 @@
import com.dy.common.mw.protocol.CommandType;
import com.dy.common.mw.protocol.p206V1.ProtocolConstantV206V1;
import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -82,8 +83,13 @@
response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, BaseResponse.class);
} catch (Exception e) {
e.printStackTrace();
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
}
- return response.getBody();
+ if(response == null){
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+ }else{
+ return response.getBody();
+ }
}
/**
@@ -102,8 +108,13 @@
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class);
} catch (Exception e) {
e.printStackTrace();
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
}
- return response.getBody();
+ if(response == null){
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+ }else{
+ return response.getBody();
+ }
}
}
\ No newline at end of file
--
Gitblit v1.8.0