From 45b906d816a3e04c6ff7cd59a49334a88dbb4e1c Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Sat, 14 May 2022 11:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=85=A8=E9=83=A8=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hisense/monitormanage/controller/Controller.java | 12 ++++++++---- src/main/resources/mapper/CameraChannelMapper.xml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/hisense/monitormanage/controller/Controller.java b/src/main/java/com/hisense/monitormanage/controller/Controller.java index 14c2202..f600ba1 100644 --- a/src/main/java/com/hisense/monitormanage/controller/Controller.java +++ b/src/main/java/com/hisense/monitormanage/controller/Controller.java @@ -206,10 +206,14 @@ public class Controller { public Result selectAllByGps(String gpsX,String gpsX1,String gpsY,String gpsY1){ List gps = cameraChannelMapper.selectAllByGps(gpsX, gpsX1, gpsY, gpsY1); - - Result success = Result.success(gps); - - return success; + double gpsx = Double.parseDouble(gpsX); + double gpsx1 = Double.parseDouble(gpsX1); + double gpsy = Double.parseDouble(gpsY); + double gpsy1 = Double.parseDouble(gpsY1); + if (gpsx < gpsx1 || gpsy < gpsy1){ + return Result.success(gps); + } + return Result.error("请输入正确的精度范围"); } /** diff --git a/src/main/resources/mapper/CameraChannelMapper.xml b/src/main/resources/mapper/CameraChannelMapper.xml index f82012f..68a9802 100644 --- a/src/main/resources/mapper/CameraChannelMapper.xml +++ b/src/main/resources/mapper/CameraChannelMapper.xml @@ -12,7 +12,7 @@