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 @@