From 3a17201681b4a606c9290dcec578155f72f68804 Mon Sep 17 00:00:00 2001
From: “mitao” <“2763622819@qq.com”>
Date: 星期三, 11 三月 2026 19:04:05 +0800
Subject: [PATCH] bugfix
---
xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml | 9 ++++++---
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java | 15 ++++++++++++---
xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java | 6 ++++++
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java b/xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java
index 29ed6a6..6a91fd4 100644
--- a/xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java
+++ b/xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java
@@ -26,4 +26,10 @@
private String startTime;
@ApiModelProperty(value = "创建结束时间 yyyy-MM-dd HH:mm:ss")
private String endTime;
+
+ @ApiModelProperty(value = "点位经度")
+ private String pointLon;
+
+ @ApiModelProperty(value = "点位纬度")
+ private String pointLat;
}
diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
index de95ceb..ae6b14a 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
+++ b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
@@ -1,6 +1,7 @@
package com.xiaopeng.map.service.serviceimpl;
+import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.dto.operation.PointAddDto;
@@ -46,9 +47,7 @@
import javax.annotation.Resource;
import java.time.LocalTime;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
+import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -379,6 +378,16 @@
@Override
public PageInfo<XpPoint> pageList(PointPageListListQuery query) {
PageInfo<XpPoint> pageInfo = new PageInfo<>(query.getPageNum(),query.getPageSize());
+ if (StringUtils.isNotBlank(query.getPointLonAndLat())) {
+ List<String> lonAndLat = query.getPointLonAndLat().trim().contains(",") ? Arrays.asList(query.getPointLonAndLat().split(",")) :
+ query.getPointLonAndLat().trim().contains(" ") ? Arrays.asList(query.getPointLonAndLat().split(" ")) :
+ Collections.emptyList();
+ if (CollUtil.isNotEmpty(lonAndLat)) {
+ query.setPointLon(lonAndLat.get(0));
+ query.setPointLat(lonAndLat.get(1));
+ }
+ query.setPointLonAndLat(null);
+ }
List<XpPoint> list = this.baseMapper.pageList(pageInfo,query);
pageInfo.setRecords(list);
return pageInfo;
diff --git a/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml b/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
index 945e0fa..eed2d2c 100644
--- a/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
+++ b/xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
@@ -136,10 +136,13 @@
and xp.parking_time_limit = #{query.parkingTimeLimit}
</if>
<if test="query.pointLonAndLat != null and query.pointLonAndLat != ''">
- and #{query.pointLonAndLat} like concat('%',xp.point_lon,'%')
- and #{query.pointLonAndLat} like concat('%',xp.point_lat,'%')
+ and xp.point_lon like concat('%',#{query.pointLonAndLat},'%')
+ or xp.point_lat like concat('%',#{query.pointLonAndLat},'%')
</if>
-
+ <if test="query.pointLon != null and query.pointLon != '' and query.pointLat != null and query.pointLat != ''">
+ and xp.point_lon like concat('%',#{query.pointLon},'%')
+ and xp.point_lat like concat('%',#{query.pointLat},'%')
+ </if>
<if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
and xp.create_time between #{query.startTime} and #{query.endTime}
</if>
--
Gitblit v1.7.1